Skip to content

Commit c78b24e

Browse files
committed
Use IntelliJ reformat
1 parent 4c64b0a commit c78b24e

File tree

1,193 files changed

+22076
-18007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,193 files changed

+22076
-18007
lines changed

jabgui/src/main/java/org/jabref/Launcher.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@
4444
public class Launcher {
4545
private static Logger LOGGER;
4646

47-
public enum MultipleInstanceAction {
48-
CONTINUE,
49-
SHUTDOWN,
50-
FOCUS
51-
}
52-
5347
public static void main(String[] args) {
5448
initLogging(args);
5549

@@ -193,4 +187,10 @@ private static void configureProxy(ProxyPreferences proxyPreferences) {
193187
private static void configureSSL(SSLPreferences sslPreferences) {
194188
TrustStoreManager.createTruststoreFileIfNotExist(Path.of(sslPreferences.getTruststorePath()));
195189
}
190+
191+
public enum MultipleInstanceAction {
192+
CONTINUE,
193+
SHUTDOWN,
194+
FOCUS
195+
}
196196
}

jabgui/src/main/java/org/jabref/cli/ArgumentProcessor.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,12 @@
1717

1818
public class ArgumentProcessor {
1919
private static final Logger LOGGER = LoggerFactory.getLogger(ArgumentProcessor.class);
20-
21-
public enum Mode { INITIAL_START, REMOTE_START }
22-
2320
private final Mode startupMode;
2421
private final GuiPreferences preferences;
2522
private final GuiCommandLine guiCli;
2623
private final CommandLine cli;
27-
2824
private final List<UiCommand> uiCommands = new ArrayList<>();
2925
private boolean guiNeeded = true;
30-
3126
public ArgumentProcessor(String[] args,
3227
Mode startupMode,
3328
GuiPreferences preferences) {
@@ -106,4 +101,6 @@ public boolean shouldShutDown() {
106101
public GuiCommandLine getGuiCli() {
107102
return guiCli;
108103
}
104+
105+
public enum Mode { INITIAL_START, REMOTE_START }
109106
}

jabgui/src/main/java/org/jabref/cli/CliImportHelper.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public class CliImportHelper {
3030
* @param location URL or file path to import
3131
*/
3232
public static Optional<ParserResult> importFile(String location,
33-
CliPreferences cliPreferences,
34-
boolean porcelain) {
33+
CliPreferences cliPreferences,
34+
boolean porcelain) {
3535
LOGGER.debug("Importing file from locaiton {}", location);
3636
String[] data = location.split(",");
3737

@@ -42,7 +42,7 @@ public static Optional<ParserResult> importFile(String location,
4242
try {
4343
file = new URLDownload(address).toTemporaryFile();
4444
} catch (FetcherException |
45-
MalformedURLException e) {
45+
MalformedURLException e) {
4646
System.err.println(Localization.lang("Problem downloading from %0: %1", address, e.getLocalizedMessage()));
4747
return Optional.empty();
4848
}
@@ -63,9 +63,9 @@ public static Optional<ParserResult> importFile(String location,
6363
return importResult;
6464
}
6565

66-
public static Optional<ParserResult> importFile(Path file,
67-
CliPreferences cliPreferences,
68-
boolean porcelain) {
66+
public static Optional<ParserResult> importFile(Path file,
67+
CliPreferences cliPreferences,
68+
boolean porcelain) {
6969
try {
7070
ImportFormatReader importFormatReader = new ImportFormatReader(
7171
cliPreferences.getImporterPreferences(),

jabgui/src/main/java/org/jabref/gui/CoreGuiPreferences.java

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,83 +36,83 @@ public double getPositionX() {
3636
return positionX.get();
3737
}
3838

39-
public DoubleProperty positionXProperty() {
40-
return positionX;
41-
}
42-
4339
public void setPositionX(double positionX) {
4440
this.positionX.set(positionX);
4541
}
4642

47-
public double getPositionY() {
48-
return positionY.get();
43+
public DoubleProperty positionXProperty() {
44+
return positionX;
4945
}
5046

51-
public DoubleProperty positionYProperty() {
52-
return positionY;
47+
public double getPositionY() {
48+
return positionY.get();
5349
}
5450

5551
public void setPositionY(double positionY) {
5652
this.positionY.set(positionY);
5753
}
5854

59-
public double getSizeX() {
60-
return sizeX.get();
55+
public DoubleProperty positionYProperty() {
56+
return positionY;
6157
}
6258

63-
public DoubleProperty sizeXProperty() {
64-
return sizeX;
59+
public double getSizeX() {
60+
return sizeX.get();
6561
}
6662

6763
public void setSizeX(double sizeX) {
6864
this.sizeX.set(sizeX);
6965
}
7066

71-
public double getSizeY() {
72-
return sizeY.get();
67+
public DoubleProperty sizeXProperty() {
68+
return sizeX;
7369
}
7470

75-
public DoubleProperty sizeYProperty() {
76-
return sizeY;
71+
public double getSizeY() {
72+
return sizeY.get();
7773
}
7874

7975
public void setSizeY(double sizeY) {
8076
this.sizeY.set(sizeY);
8177
}
8278

83-
public boolean isWindowMaximised() {
84-
return windowMaximised.get();
79+
public DoubleProperty sizeYProperty() {
80+
return sizeY;
8581
}
8682

87-
public BooleanProperty windowMaximisedProperty() {
88-
return windowMaximised;
83+
public boolean isWindowMaximised() {
84+
return windowMaximised.get();
8985
}
9086

9187
public void setWindowMaximised(boolean windowMaximised) {
9288
this.windowMaximised.set(windowMaximised);
9389
}
9490

95-
public double getHorizontalDividerPosition() {
96-
return horizontalDividerPosition.get();
91+
public BooleanProperty windowMaximisedProperty() {
92+
return windowMaximised;
9793
}
9894

99-
public DoubleProperty horizontalDividerPositionProperty() {
100-
return horizontalDividerPosition;
95+
public double getHorizontalDividerPosition() {
96+
return horizontalDividerPosition.get();
10197
}
10298

10399
public void setHorizontalDividerPosition(double horizontalDividerPosition) {
104100
this.horizontalDividerPosition.set(horizontalDividerPosition);
105101
}
106102

107-
public double getVerticalDividerPosition() {
108-
return verticalDividerPosition.get();
103+
public DoubleProperty horizontalDividerPositionProperty() {
104+
return horizontalDividerPosition;
109105
}
110106

111-
public DoubleProperty getVerticalDividerPositionProperty() {
112-
return verticalDividerPosition;
107+
public double getVerticalDividerPosition() {
108+
return verticalDividerPosition.get();
113109
}
114110

115111
public void setVerticalDividerPosition(double dividerPosition) {
116112
this.verticalDividerPosition.set(dividerPosition);
117113
}
114+
115+
public DoubleProperty getVerticalDividerPositionProperty() {
116+
return verticalDividerPosition;
117+
}
118118
}

jabgui/src/main/java/org/jabref/gui/JabRefDialogService.java

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ public JabRefDialogService(Window mainWindow) {
8686
this.mainWindow = mainWindow;
8787
}
8888

89+
public static String shortenDialogMessage(String dialogMessage) {
90+
if (dialogMessage.length() < JabRefDialogService.DIALOG_SIZE_LIMIT) {
91+
return dialogMessage.trim();
92+
}
93+
return (dialogMessage.substring(0, JabRefDialogService.DIALOG_SIZE_LIMIT) + "...").trim();
94+
}
95+
8996
private FXDialog createDialog(AlertType type, String title, String content) {
9097
FXDialog alert = new FXDialog(type, title, true);
9198
alert.setHeaderText(null);
@@ -132,13 +139,6 @@ protected Node createDetailsButton() {
132139
return alert;
133140
}
134141

135-
public static String shortenDialogMessage(String dialogMessage) {
136-
if (dialogMessage.length() < JabRefDialogService.DIALOG_SIZE_LIMIT) {
137-
return dialogMessage.trim();
138-
}
139-
return (dialogMessage.substring(0, JabRefDialogService.DIALOG_SIZE_LIMIT) + "...").trim();
140-
}
141-
142142
private <T> ChoiceDialog<T> createChoiceDialog(String title, String content, String okButtonLabel, T defaultChoice, Collection<T> choices) {
143143
ChoiceDialog<T> choiceDialog = new ChoiceDialog<>(defaultChoice, choices);
144144
((Stage) choiceDialog.getDialogPane().getScene().getWindow()).getIcons().add(IconTheme.getJabRefImage());
@@ -446,23 +446,23 @@ public void notify(String message) {
446446
LOGGER.info(message);
447447

448448
UiTaskExecutor.runInJavaFXThread(() ->
449-
Notifications.create()
450-
.text(message)
451-
.position(Pos.BOTTOM_CENTER)
452-
.hideAfter(TOAST_MESSAGE_DISPLAY_TIME)
453-
.owner(mainWindow)
454-
.threshold(5,
455-
Notifications.create()
456-
.title(Localization.lang("Last notification"))
457-
.text(
458-
"(" + Localization.lang("Check the event log to see all notifications") + ")"
459-
+ "\n\n" + message)
460-
.onAction(e -> {
461-
ErrorConsoleAction ec = new ErrorConsoleAction();
462-
ec.execute();
463-
}))
464-
.hideCloseButton()
465-
.show());
449+
Notifications.create()
450+
.text(message)
451+
.position(Pos.BOTTOM_CENTER)
452+
.hideAfter(TOAST_MESSAGE_DISPLAY_TIME)
453+
.owner(mainWindow)
454+
.threshold(5,
455+
Notifications.create()
456+
.title(Localization.lang("Last notification"))
457+
.text(
458+
"(" + Localization.lang("Check the event log to see all notifications") + ")"
459+
+ "\n\n" + message)
460+
.onAction(e -> {
461+
ErrorConsoleAction ec = new ErrorConsoleAction();
462+
ec.execute();
463+
}))
464+
.hideCloseButton()
465+
.show());
466466
}
467467

468468
@Override

jabgui/src/main/java/org/jabref/gui/JabRefGUI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ public void onShowing(WindowEvent event) {
326326

327327
// Open last edited databases
328328
if (uiCommands.stream().noneMatch(UiCommand.BlankWorkspace.class::isInstance)
329-
&& preferences.getWorkspacePreferences().shouldOpenLastEdited()) {
329+
&& preferences.getWorkspacePreferences().shouldOpenLastEdited()) {
330330
mainFrame.openLastEditedDatabases();
331331
}
332332

jabgui/src/main/java/org/jabref/gui/JabRefGuiStateManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,12 @@ public BooleanProperty getEditorShowing() {
299299
}
300300

301301
@Override
302-
public void setActiveWalkthrough(Walkthrough walkthrough) {
303-
activeWalkthrough.set(Optional.ofNullable(walkthrough));
302+
public Optional<Walkthrough> getActiveWalkthrough() {
303+
return activeWalkthrough.get();
304304
}
305305

306306
@Override
307-
public Optional<Walkthrough> getActiveWalkthrough() {
308-
return activeWalkthrough.get();
307+
public void setActiveWalkthrough(Walkthrough walkthrough) {
308+
activeWalkthrough.set(Optional.ofNullable(walkthrough));
309309
}
310310
}

0 commit comments

Comments
 (0)