Skip to content

Commit

Permalink
Merge pull request #13 from isaki/2019-06
Browse files Browse the repository at this point in the history
Build settings and rebuild to address 2019-06
  • Loading branch information
isaki authored Jul 8, 2019
2 parents e2be06b + 85aa5cb commit 54186d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Manifest-Version: 1.0
Bundle-SymbolicName: OldJavaFormatter;singleton:=true
Bundle-Name: OldJavaFormatter
Bundle-Version: 1.3.1
Bundle-Version: 1.4.1
Require-Bundle: org.eclipse.jdt.core;bundle-version="[3.17.0,4.0.0)",
org.eclipse.jface.text;bundle-version="[3.15.0,4.0.0)",
org.eclipse.core.runtime
org.eclipse.core.runtime;bundle-version="[3.15.0,4.0.0)"
Bundle-ManifestVersion: 2
Bundle-RequiredExecutionEnvironment: JavaSE-1.8,
JavaSE-9
JavaSE-11
Automatic-Module-Name: OldJavaFormatter

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ Original plugin can be found [here](http://eclipse-n-mati.blogspot.com.es/2015/0
* For Eclipse Mars (4.5) to 2018-09: Please use version 1.1.5 of this plugin.
* For Eclipse 2018-12: Please use version 1.2.0 of this plugin.
* For Eclipse 2019-03: Please use version 1.3.1 of this plugin.
* For Eclipse 2019-06: Please use version 1.4.1 of this plugin.
* Please note that this may not work well with the new arrow based switch statements (if at all).
4 changes: 3 additions & 1 deletion src/org/eclipse/jdt/luna/formatter/CodeFormatterVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,8 @@ public TextEdit format(String string, CompilationUnitDeclaration compilationUnit
try {
compilationUnitDeclaration.traverse(this, compilationUnitDeclaration.scope);
} catch(AbortFormatting e){
if (DEBUG)
e.printStackTrace(System.out);
return failedToFormat();
}
if (DEBUG){
Expand Down Expand Up @@ -2117,7 +2119,7 @@ private void formatStatements(BlockScope scope, final Statement[] statements, bo
this.scribe.printNewLine();
}
statement.traverse(this, scope);
if (statement instanceof Expression) {
if (statement instanceof Expression && !(statement instanceof SwitchStatement)) {
this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.BASIC_TRAILING_COMMENT);
if (i != statementsLength - 1) {
Expand Down

0 comments on commit 54186d4

Please sign in to comment.