Skip to content

Commit 440db88

Browse files
Merge branch 'master' of github.com:JabRef/jabref into fix-for-issue-6224
2 parents 3b910f6 + 16d4938 commit 440db88

File tree

547 files changed

+4211
-3166
lines changed

Some content is hidden

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

547 files changed

+4211
-3166
lines changed

.mailmap

+1
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,4 @@ Christoph Treude <[email protected]>
193193
Goutam Lavudiya <[email protected]>
194194
Shikun Xiong <[email protected]>
195195
Fabiani Giovanni <[email protected]>
196+
Dimitra Karadima <[email protected]>

AUTHORS

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Ayachi Nene
4141
Bartosz J. Kaczkowski
4242
Bartłomiej Dach
4343
Behrouz Javanmardi
44+
Benedikt Tutzer
4445
Benjamin Köhler
4546
Berk Gureken
4647
Bernd Kalbfuss
@@ -88,6 +89,7 @@ Dennis Tschechlov
8889
DevSiroukane
8990
Dilan Coss
9091
dima
92+
Dimitra Karadima
9193
Domenico Cufalo
9294
Dominik Schrempf
9395
Dominik Traczyk
@@ -135,6 +137,7 @@ Guillaume Gardey
135137
Hakan Duran
136138
Hannes Restel
137139
Harinda Samarasekara
140+
Hussain Arif
138141
Igor Chernyavsky
139142
Igor Steinmacher
140143
Illes Solt
@@ -213,6 +216,7 @@ Martin Stolle
213216
Martina Catizone
214217
Mathias Walter
215218
Matthias Geiger
219+
Matthias Mayr
216220
Matthias Mueller
217221
Mattia Bunel
218222
Mattias Ulbrich

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
2121
- We implemented an option to download fulltext files while importing. [#6381](https://github.com/JabRef/jabref/pull/6381)
2222
- We added a progress-indicator showing the average progress of background tasks to the toolbar. Clicking it reveals a pop-over with a list of running background tasks. [6443](https://github.com/JabRef/jabref/pull/6443)
2323
- We fixed the bug when strike the delete key in the text field. [#6421](https://github.com/JabRef/jabref/issues/6421)
24+
- We added a BibTex key modifier for truncating strings. [#3915](https://github.com/JabRef/jabref/issues/3915)
2425
- We added support for jumping to target entry when typing letter/digit after sorting a column in maintable [#6146](https://github.com/JabRef/jabref/issues/6146)
2526

2627
### Changed
@@ -57,6 +58,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
5758
- We fixed an issue where JabRef switched to discrete graphics under macOS [#5935](https://github.com/JabRef/jabref/issues/5935)
5859
- We fixed an issue where the Preferences entry preview will be unexpected modified leads to Value too long exception [#6198](https://github.com/JabRef/jabref/issues/6198)
5960
- We fixed an issue where custom jstyles for Open/LibreOffice would only be valid if a layout line for the entry type `default` was at the end of the layout section [#6303](https://github.com/JabRef/jabref/issues/6303)
61+
- We fixed an issue where long directory names created from patterns could create an exception. [#3915](https://github.com/JabRef/jabref/issues/3915)
62+
6063
- We fixed an issue where sort on numeric cases was broken. [#6349](https://github.com/JabRef/jabref/issues/6349)
6164
- We fixed an issue where year and month fields were not cleared when converting to biblatex [#6224](https://github.com/JabRef/jabref/issues/6224)
6265
- We fixed an issue where an "Not on FX thread" exception occured when saving on linux [#6453](https://github.com/JabRef/jabref/issues/6453)

config/IntelliJ Code Style.xml

+28-27
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
1-
<code_scheme name="JabRef">
2-
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
3-
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
4-
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
5-
<value />
6-
</option>
7-
<option name="IMPORT_LAYOUT_TABLE">
8-
<value>
9-
<package name="java" withSubpackages="true" static="false" />
10-
<emptyLine />
11-
<package name="javax" withSubpackages="true" static="false" />
12-
<emptyLine />
13-
<package name="javafx" withSubpackages="true" static="false" />
14-
<emptyLine />
15-
<package name="org.jabref" withSubpackages="true" static="false" />
16-
<emptyLine />
17-
<package name="" withSubpackages="true" static="false" />
18-
<emptyLine />
19-
<package name="" withSubpackages="true" static="true" />
20-
</value>
21-
</option>
22-
<option name="JD_P_AT_EMPTY_LINES" value="false" />
23-
<option name="JD_KEEP_EMPTY_PARAMETER" value="false" />
24-
<option name="JD_KEEP_EMPTY_EXCEPTION" value="false" />
25-
<option name="JD_KEEP_EMPTY_RETURN" value="false" />
26-
<option name="WRAP_COMMENTS" value="true" />
1+
<code_scheme name="JabRef" version="173">
2+
<option name="RIGHT_MARGIN" value="0" />
3+
<option name="SOFT_MARGINS" value="120" />
274
<JavaCodeStyleSettings>
285
<option name="DO_NOT_WRAP_AFTER_SINGLE_ANNOTATION" value="true" />
6+
<option name="SPACE_INSIDE_ONE_LINE_ENUM_BRACES" value="true" />
7+
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
8+
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
9+
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
10+
<value />
11+
</option>
12+
<option name="IMPORT_LAYOUT_TABLE">
13+
<value>
14+
<package name="java" withSubpackages="true" static="false" />
15+
<emptyLine />
16+
<package name="javax" withSubpackages="true" static="false" />
17+
<emptyLine />
18+
<package name="javafx" withSubpackages="true" static="false" />
19+
<emptyLine />
20+
<package name="org.jabref" withSubpackages="true" static="false" />
21+
<emptyLine />
22+
<package name="" withSubpackages="true" static="false" />
23+
<emptyLine />
24+
<package name="" withSubpackages="true" static="true" />
25+
</value>
26+
</option>
2927
</JavaCodeStyleSettings>
3028
<codeStyleSettings language="JAVA">
29+
<option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
3130
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
3231
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
3332
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
3433
<option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" />
34+
<option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
35+
<option name="WRAP_COMMENTS" value="true" />
3536
<arrangement>
3637
<rules>
3738
<section>
@@ -292,4 +293,4 @@
292293
</rules>
293294
</arrangement>
294295
</codeStyleSettings>
295-
</code_scheme>
296+
</code_scheme>

config/checkstyle/checkstyle.xml

+19-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
<module name="FileTabCharacter"/>
2727
<module name="NewlineAtEndOfFile"/>
2828

29+
<!-- Checks for size violations: https://checkstyle.sourceforge.io/config_sizes.html -->
30+
31+
<!-- LineLength not in place as PreviewerViewer and RelatedArticlesTab have line length with more than 500 charachters -->
32+
2933
<module name="TreeWalker">
3034
<!-- Checks for Javadoc comments: https://checkstyle.org/config_javadoc.html -->
3135
<module name="InvalidJavadocPosition"/>
@@ -35,6 +39,7 @@
3539
</module>
3640

3741
<!-- Checks for imports: https://checkstyle.org/config_import.html -->
42+
3843
<module name="UnusedImports"/>
3944
<module name="RedundantImport"/>
4045
<module name="AvoidStarImport"/>
@@ -85,6 +90,9 @@
8590
</module>
8691

8792
<!-- Checks for blocks: https://checkstyle.org/config_blocks.html -->
93+
94+
<module name="AvoidNestedBlocks"/>
95+
8896
<module name="NeedBraces"/>
8997

9098
<module name="EmptyBlock">
@@ -99,16 +107,25 @@
99107
100108
public String getTabName() { return Localization.lang("XMP metadata"); }
101109
102-
Since it is too much effort to reformat all code, it is currently not enabled -->
103-
<!-- <module name="LeftCurly"/> -->
110+
-->
111+
<module name="LeftCurly"/>
104112

105113
<module name="RightCurly"/>
114+
106115
<!-- coding - https://checkstyle.sourceforge.io/config_coding.html -->
107116

108117
<module name="AvoidDoubleBraceInitialization"/>
109118

110119
<module name="CovariantEquals"/>
111120

121+
<module name="MultipleVariableDeclarations"/>
122+
123+
<module name="OneStatementPerLine">
124+
<property name="treatTryResourcesAsStatement" value="true"/>
125+
</module>
126+
127+
<module name="UnnecessarySemicolonInTryWithResources"/>
128+
112129
<!-- Checks for common coding problems: https://checkstyle.org/config_coding.html -->
113130

114131
<module name="DeclarationOrder"/>

docs/guidelines-for-setting-up-a-local-workspace.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,10 @@ Contributions to JabRef's source code need to have a code formatting that is con
170170
4. Check "Store relative to project location"
171171
5. Click "Next" and "Finish"
172172
6. Activate the CheckStyle configuration file by ticking it in the list
173-
7. Ensure that CheckStyle version 8.31 (or higher) is selected
174-
8. Save settings by clicking "OK"
175-
9. Your configuration should now look like this:
173+
7. Ensure that the latest CheckStyle version is selected (8.32 or higher)
174+
8. Set the "Scan Scope" to "Only Java sources (including tests)
175+
9. Save settings by clicking "OK"
176+
10. Your configuration should now look like this:
176177
![checkstyle settings](images/intellij-checkstyle-settings.png)
177178

178179
#### Troubleshooting when using both IDEA and Eclipse
3.77 KB
Loading

src/main/java/org/jabref/Globals.java

+2
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ public class Globals {
5959

6060
/**
6161
* This field is initialized upon startup.
62+
* <p>
6263
* Only GUI code is allowed to access it, logic code should use dependency injection.
6364
*/
6465
public static JournalAbbreviationRepository journalAbbreviationRepository;
6566

6667
/**
6768
* This field is initialized upon startup.
69+
* <p>
6870
* Only GUI code is allowed to access it, logic code should use dependency injection.
6971
*/
7072
public static ProtectedTermsLoader protectedTermsLoader;

src/main/java/org/jabref/JabRefException.java

-1
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,4 @@ public String getLocalizedMessage() {
3939
return localizedMessage;
4040
}
4141
}
42-
4342
}

src/main/java/org/jabref/JabRefExecutorService.java

-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public class JabRefExecutorService {
2828
thread.setName("JabRef CachedThreadPool");
2929
thread.setUncaughtExceptionHandler(new FallbackExceptionHandler());
3030
return thread;
31-
3231
});
3332
private final ExecutorService lowPriorityExecutorService = Executors.newCachedThreadPool(r -> {
3433
Thread thread = new Thread(r);
@@ -165,5 +164,4 @@ public void run() {
165164
}
166165
}
167166
}
168-
169167
}

src/main/java/org/jabref/JabRefMain.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ private static void ensureCorrectJavaVersion() {
114114

115115
if (java9Fail || versionFail) {
116116
StringBuilder versionError = new StringBuilder(
117-
Localization.lang("Your current Java version (%0) is not supported. Please install version %1 or higher.",
118-
checker.getJavaVersion(),
119-
buildInfo.minRequiredJavaVersion));
117+
Localization.lang("Your current Java version (%0) is not supported. Please install version %1 or higher.",
118+
checker.getJavaVersion(),
119+
buildInfo.minRequiredJavaVersion));
120120

121121
versionError.append("\n");
122122
versionError.append(Localization.lang("Your Java Runtime Environment is located at %0.", checker.getJavaInstallationDirectory()));
@@ -165,7 +165,7 @@ private static void applyPreferences(JabRefPreferences preferences) {
165165

166166
// Build list of Import and Export formats
167167
Globals.IMPORT_FORMAT_READER.resetImportFormats(Globals.prefs.getImportFormatPreferences(),
168-
Globals.prefs.getXMPPreferences(), Globals.getFileUpdateMonitor());
168+
Globals.prefs.getXMPPreferences(), Globals.getFileUpdateMonitor());
169169
Globals.entryTypesManager.addCustomOrModifiedTypes(preferences.loadBibEntryTypes(BibDatabaseMode.BIBTEX),
170170
preferences.loadBibEntryTypes(BibDatabaseMode.BIBLATEX));
171171
Globals.exportFactory = Globals.prefs.getExporterFactory(Globals.journalAbbreviationRepository);

src/main/java/org/jabref/architecture/ApacheCommonsLang3Allowed.java

-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@
88

99
// The rationale
1010
String value();
11-
1211
}

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ private boolean exportMatches(List<ParserResult> loaded) {
266266
break;
267267
default:
268268
System.err.println(Localization.lang("Output file missing").concat(". \n \t ")
269-
.concat(Localization.lang("Usage")).concat(": ") + JabRefCLI.getExportMatchesSyntax());
269+
.concat(Localization.lang("Usage")).concat(": ") + JabRefCLI.getExportMatchesSyntax());
270270
noGUINeeded = true;
271271
return false;
272272
}
@@ -442,7 +442,7 @@ private void exportFile(List<ParserResult> loaded, String[] data) {
442442
try {
443443
exporter.get().export(pr.getDatabaseContext(), Path.of(data[0]),
444444
pr.getDatabaseContext().getMetaData().getEncoding()
445-
.orElse(Globals.prefs.getDefaultEncoding()),
445+
.orElse(Globals.prefs.getDefaultEncoding()),
446446
pr.getDatabaseContext().getDatabase().getEntries());
447447
} catch (Exception ex) {
448448
System.err.println(Localization.lang("Could not export file") + " '" + data[0] + "': "
@@ -516,8 +516,7 @@ private void regenerateBibtexKeys(List<ParserResult> loaded) {
516516
/**
517517
* Run an entry fetcher from the command line.
518518
*
519-
* @param fetchCommand A string containing both the name of the fetcher to use and
520-
* the search query, separated by a :
519+
* @param fetchCommand A string containing both the name of the fetcher to use and the search query, separated by a :
521520
* @return A parser result containing the entries fetched or null if an error occurred.
522521
*/
523522
private Optional<ParserResult> fetch(String fetchCommand) {

src/main/java/org/jabref/cli/CrossrefFetcherEvaluator.java

-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public void run() {
7171
} catch (FetcherException e) {
7272
e.printStackTrace();
7373
}
74-
7574
} else {
7675
try {
7776
Optional<DOI> crossrefDOI = new CrossRef().findIdentifier(entry);
@@ -86,7 +85,6 @@ public void run() {
8685
countDownLatch.countDown();
8786
}
8887
});
89-
9088
}
9189
countDownLatch.await();
9290

src/main/java/org/jabref/cli/GenerateCharacterTable.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,12 @@ public static void main(String[] args) {
3939
System.out
4040
.println(
4141
character.getKey() + " & "
42-
+ ((character.getKey() > 128) ? String
43-
.valueOf(Character.toChars(character.getKey())) : "")
42+
+ ((character.getKey() > 128) ?
43+
String.valueOf(Character.toChars(character.getKey())) : "")
4444
+ " & \\symbol{" + Integer.toString(character.getKey()) + "} & "
4545
+ character.getValue() + " & \\verb¤" + character.getValue() + \\\\");
4646
}
4747
System.out.println("\\end{supertabular}");
4848
System.out.println("\\end{document}");
49-
5049
}
51-
5250
}

0 commit comments

Comments
 (0)