Skip to content

Commit ddd9fdb

Browse files
authored
Merge pull request #192 from funfried/release/1.14.x
Release/1.14.x
2 parents 0c21c09 + 36894a3 commit ddd9fdb

6 files changed

Lines changed: 19 additions & 16 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,4 @@ The history of this project
107107
Support
108108
---------
109109
Keep this project alive by supporting it: one-time [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=926F5XBCTK2LQ&source=url) or [![Patreon!](/src/site/resources/imgs/logos/become_a_patron_button.png)](https://www.patreon.com/funfried) or just [![Buy me a drink](https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20drink&emoji=%F0%9F%A5%83&slug=funfried&button_colour=5F7FFF&font_colour=ffffff&font_family=Cookie&outline_colour=000000&coffee_colour=FFDD00)](https://www.buymeacoffee.com/funfried)
110+
If you can't or don't want to spend money you can also [![say thanks](https://img.shields.io/static/v1?label=say&message=thanks&color=green&style=for-the-badge&logo=handshake)](https://saythanks.io/to/funfried)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<groupId>de.funfried.netbeans.plugins</groupId>
1919
<artifactId>externalcodeformatter</artifactId>
20-
<version>1.14.3</version>
20+
<version>1.14.4-SNAPSHOT</version>
2121
<packaging>nbm</packaging>
2222

2323
<developers>

src/changes/changes.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
</properties>
99

1010
<body>
11+
<release version="1.14.4-SNAPSHOT" date="N/A" description="Bug fix release">
12+
<action dev="bahlef" type="fix" issue="191">
13+
Erroneous formatting with Eclipse when "Override Tab Size" is active
14+
</action>
15+
</release>
16+
1117
<release version="1.14.3" date="2022-01-22" description="Bug fix release">
1218
<action dev="bahlef" type="fix" issue="152">
1319
Erroneous formatting with Eclipse

src/main/java/de/funfried/netbeans/plugins/external/formatter/java/eclipse/EclipseJavaFormatterService.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,14 @@ public Integer getIndentSize(Document document) {
117117

118118
Preferences preferences = Settings.getActivePreferences(document);
119119
if (isUseFormatterIndentationSettings(preferences)) {
120-
String value;
121-
122120
String tabChar = getEclipseFormatterProperty(preferences, document, "org.eclipse.jdt.core.formatter.tabulation.char");
123121
if (Objects.equals(tabChar, "mixed")) {
124-
value = getEclipseFormatterProperty(preferences, document, "org.eclipse.jdt.core.formatter.indentation.size");
122+
String value = getEclipseFormatterProperty(preferences, document, "org.eclipse.jdt.core.formatter.indentation.size");
123+
if (value != null) {
124+
ret = Integer.valueOf(value);
125+
}
125126
} else {
126-
value = getEclipseFormatterProperty(preferences, document, "org.eclipse.jdt.core.formatter.tabulation.size");
127-
}
128-
129-
if (value != null) {
130-
ret = Integer.valueOf(value);
127+
ret = getSpacesPerTab(document);
131128
}
132129
}
133130

src/main/java/de/funfried/netbeans/plugins/external/formatter/javascript/eclipse/EclipseJavascriptFormatterService.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,16 @@ public Integer getIndentSize(Document document) {
115115

116116
Preferences preferences = Settings.getActivePreferences(document);
117117
if (isUseFormatterIndentationSettings(preferences)) {
118-
String value;
119-
120118
String tabChar = getEclipseFormatterProperty(preferences, document, "org.eclipse.wst.jsdt.core.formatter.tabulation.char");
121119
if (Objects.equals(tabChar, "mixed")) {
122-
value = getEclipseFormatterProperty(preferences, document, "org.eclipse.wst.jsdt.core.formatter.indentation.size");
120+
String value = getEclipseFormatterProperty(preferences, document, "org.eclipse.wst.jsdt.core.formatter.indentation.size");
121+
if (value != null) {
122+
ret = Integer.valueOf(value);
123+
}
123124
} else {
124-
value = getEclipseFormatterProperty(preferences, document, "org.eclipse.wst.jsdt.core.formatter.tabulation.size");
125+
ret = getSpacesPerTab(document);
125126
}
126127

127-
if (value != null) {
128-
ret = Integer.valueOf(value);
129-
}
130128
}
131129

132130
return ret;

src/site/site.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
<logo name="Donate via PayPal" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=926F5XBCTK2LQ&amp;source=url" img="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" />
5656
<logo name="Become a Patron!" href="https://www.patreon.com/funfried" img="imgs/logos/become_a_patron_button.png" />
5757
<logo name="Buy me a drink" href="https://www.buymeacoffee.com/funfried" img="https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20drink&amp;emoji=%F0%9F%A5%83&amp;slug=funfried&amp;button_colour=5F7FFF&amp;font_colour=ffffff&amp;font_family=Cookie&amp;outline_colour=000000&amp;coffee_colour=FFDD00" />
58+
<logo name="Say Thanks" href="https://saythanks.io/to/funfried" img="https://img.shields.io/static/v1?label=say&amp;message=thanks&amp;color=green&amp;style=for-the-badge&amp;logo=handshake" />
5859
</poweredBy>
5960

6061
<body>

0 commit comments

Comments
 (0)