-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to Eclipse 2021-09 and support Eclipse 2021-03
Restructure codebase to support Eclipse 2021-03 (compatible with Java 8) and Eclipse 2021-09 (requires Java 11) simultaneously. By default the Eclipse 2021-09 formatter is used. This commit changes the default Java baseline of the formatter to Java 11, however, Java 8 is still supported if a custom `.springjavaformatconfig` is defined with a `java-baseline` property of `8`. Closes gh-277
- Loading branch information
Showing
98 changed files
with
2,082 additions
and
722 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...at.eclipse/src/io/spring/javaformat/eclipse/formatter/SpringCodeFormatterJdk11Spaces.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright 2017-2021 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.spring.javaformat.eclipse.formatter; | ||
|
||
import org.eclipse.jdt.core.formatter.CodeFormatter; | ||
|
||
import io.spring.javaformat.config.IndentationStyle; | ||
import io.spring.javaformat.config.JavaBaseline; | ||
import io.spring.javaformat.config.JavaFormatConfig; | ||
|
||
/** | ||
* Eclipse {@link CodeFormatter} for Spring formatting with spaces. | ||
* | ||
* @author Phillip Webb | ||
*/ | ||
public class SpringCodeFormatterJdk11Spaces extends SpringCodeFormatter { | ||
|
||
public SpringCodeFormatterJdk11Spaces() { | ||
super(JavaFormatConfig.of(JavaBaseline.V11, IndentationStyle.SPACES)); | ||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
...rmat.eclipse/src/io/spring/javaformat/eclipse/formatter/SpringCodeFormatterJdk11Tabs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright 2017-2021 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.spring.javaformat.eclipse.formatter; | ||
|
||
import org.eclipse.jdt.core.formatter.CodeFormatter; | ||
|
||
import io.spring.javaformat.config.IndentationStyle; | ||
import io.spring.javaformat.config.JavaBaseline; | ||
import io.spring.javaformat.config.JavaFormatConfig; | ||
|
||
/** | ||
* Eclipse {@link CodeFormatter} for Spring formatting with tabs. | ||
* | ||
* @author Phillip Webb | ||
*/ | ||
public class SpringCodeFormatterJdk11Tabs extends SpringCodeFormatter { | ||
|
||
public SpringCodeFormatterJdk11Tabs() { | ||
super(JavaFormatConfig.of(JavaBaseline.V11, IndentationStyle.SPACES)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.