Rename style from palantir to ojf · openjavaformat/open-java-format@b59c522 · GitHub
Skip to content

Commit b59c522

Browse files
committed
Rename style from palantir to ojf
1 parent 7398c9a commit b59c522

17 files changed

Lines changed: 50 additions & 50 deletions

File tree

‎gradle-open-java-format/src/main/java/com/palantir/javaformat/gradle/spotless/NativePalantirJavaFormatStep.java‎

Lines changed: 1 addition & 1 deletion

‎gradle-open-java-format/src/test/java/com/palantir/javaformat/gradle/ConfigureJavaFormatterXmlTest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class ConfigureJavaFormatterXmlTest {
5454
private static final String MISSING_CLASS_PATH = """
5555
<root>
5656
<component name="PalantirJavaFormatSettings">
57-
<option name="style" value="PALANTIR"/>
57+
<option name="style" value="OJF"/>
5858
</component>
5959
</root>
6060
""";
@@ -120,7 +120,7 @@ void configure_missingClassPath_added() {
120120
String expected = """
121121
<root>
122122
<component name="PalantirJavaFormatSettings">
123-
<option name="style" value="PALANTIR"/>
123+
<option name="style" value="OJF"/>
124124
<option name="enabled" value="true"/>
125125
<option name="implementationClassPath">
126126
<list>

‎open-java-format-benchmarks/src/jmh/java/com/palantir/javaformat/BenchmarkMultiFiles.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public final void runNativeImage(BenchmarkState state) throws InterruptedExcepti
8686
ProcessBuilder p = new ProcessBuilder();
8787
p.command(Stream.concat(
8888
Stream.of(
89-
Path.of(System.getenv("NATIVE_IMAGE_CLASSPATH")).toString(), "-i", "--palantir"),
89+
Path.of(System.getenv("NATIVE_IMAGE_CLASSPATH")).toString(), "-i", "--ojf"),
9090
state.filesToFormat.stream())
9191
.collect(Collectors.toList()));
9292
Process process = p.inheritIO().start();
@@ -99,7 +99,7 @@ public final void runNativeImage(BenchmarkState state) throws InterruptedExcepti
9999
public final void runNestedLevel(MultiLevelStates state) throws InterruptedException, IOException {
100100
ProcessBuilder p = new ProcessBuilder();
101101
p.command(List.of(
102-
Path.of(System.getenv("NATIVE_IMAGE_CLASSPATH")).toString(), "-i", "--palantir", state.fileToFormat));
102+
Path.of(System.getenv("NATIVE_IMAGE_CLASSPATH")).toString(), "-i", "--ojf", state.fileToFormat));
103103
Process process = p.inheritIO().start();
104104
assertThat(process.waitFor()).isEqualTo(0);
105105
}
@@ -121,7 +121,7 @@ public final void runJar(BenchmarkState state) throws InterruptedException, IOEx
121121
"--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
122122
"com.palantir.javaformat.java.Main",
123123
"-i",
124-
"--palantir"),
124+
"--ojf"),
125125
state.filesToFormat.stream())
126126
.collect(Collectors.toList()));
127127
Process process = p.inheritIO().start();

‎open-java-format-eclipse-plugin/src/main/java/com/palantir/javaformat/java/SnippetFormatter.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void closeBraces(int initialIndent) {
6262

6363
private static final int INDENTATION_SIZE = 4;
6464
private final Formatter formatter = Formatter.createFormatter(
65-
JavaFormatterOptions.builder().style(Style.PALANTIR).build());
65+
JavaFormatterOptions.builder().style(Style.OJF).build());
6666
private static final CharMatcher NOT_WHITESPACE = CharMatcher.whitespace().negate();
6767

6868
public String createIndentationString(int indentationLevel) {

‎open-java-format-idea-plugin/src/main/java/com/palantir/javaformat/intellij/PalantirJavaFormatSettings.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static class State {
148148
private Optional<List<URI>> implementationClassPath = Optional.empty();
149149
private Optional<URI> nativeImageClassPath = Optional.empty();
150150

151-
public JavaFormatterOptions.Style style = JavaFormatterOptions.Style.PALANTIR;
151+
public JavaFormatterOptions.Style style = JavaFormatterOptions.Style.OJF;
152152

153153
public void setImplementationClassPath(@Nullable List<String> value) {
154154
implementationClassPath = Optional.ofNullable(value)

‎open-java-format-idea-plugin/src/main/java/com/palantir/javaformat/intellij/UiFormatterStyle.java‎

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

2424
/** Configuration options for the formatting style. */
2525
enum UiFormatterStyle {
26-
PALANTIR("Default Palantir Java style", Style.PALANTIR),
26+
OJF("Default Open Java Format style", Style.OJF),
2727
;
2828

2929
private final String description;

‎open-java-format-jdk-bootstrap/src/main/java/com/palantir/javaformat/bootstrap/BootstrappingFormatterService.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ default List<String> toArgs() {
139139
}
140140

141141
return args
142-
// Use palantir style
143-
.add("--palantir")
142+
// Use the open-java-format style
143+
.add("--ojf")
144144
// Trailing "-" enables formatting stdin -> stdout
145145
.add("-")
146146
.build();

‎open-java-format-jdk-bootstrap/src/main/java/com/palantir/javaformat/bootstrap/NativeImageFormatterService.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ default List<String> toArgs() {
115115
}
116116

117117
return args
118-
// Use palantir style
119-
.add("--palantir")
118+
// Use the open-java-format style
119+
.add("--ojf")
120120
// Trailing "-" enables formatting stdin -> stdout
121121
.add("-")
122122
.build();

‎open-java-format-spi/src/main/java/com/palantir/javaformat/java/JavaFormatterOptions.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
public final class JavaFormatterOptions {
3030

3131
public enum Style {
32-
/** The default Palantir Java Style configuration. */
33-
PALANTIR(2, 120),
32+
/** The default Open Java Format Style configuration. */
33+
OJF(2, 120),
3434

3535
/** The default Google Java Style configuration. */
3636
GOOGLE(1, 100),

‎open-java-format/src/main/java/com/palantir/javaformat/java/CommandLineOptions.java‎

Lines changed: 20 additions & 20 deletions

0 commit comments

Comments
 (0)