Skip to content

Commit baa7b1e

Browse files
committed
Merge branch 'master' into remote-db-menu
2 parents 04be32c + 74667e9 commit baa7b1e

File tree

146 files changed

+6570
-1334
lines changed

Some content is hidden

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

146 files changed

+6570
-1334
lines changed

.github/workflows/gradle-wrapper-validation.yml

-14
This file was deleted.

.github/workflows/tests.yml

+8
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,11 @@ jobs:
208208
CI: "false" # we pretend to run locally - even if tests fail on the CI, they count towards test coverage
209209
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
210210
DBMS: "postgresql"
211+
# This is https://github.com/marketplace/actions/gradle-wrapper-validation
212+
# It ensures that the jar file is from gradle and not by a strange third party.
213+
gradlevalidation:
214+
name: "Validate Gradle Wrapper"
215+
runs-on: ubuntu-latest
216+
steps:
217+
- uses: actions/checkout@v2
218+
- uses: gradle/wrapper-validation-action@v1

.sonarcloud.properties

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
1313

1414
### Changed
1515

16-
- We reintroduced the possibility to extract references from plain text (using GROBID) [#5614](https://github.com/JabRef/jabref/pull/5614)
16+
- We reintroduced the possibility to extract references from plain text (using GROBID) [#5614](https://github.com/JabRef/jabref/pull/5614)
1717
- We changed the open office panel to show buttons in rows of three instead of going straight down to save space as the button expanded out to take up unnecessary horizontal space. [#5479](https://github.com/JabRef/jabref/issues/5479)
1818
- We cleaned up the group add/edit dialog. [#5826](https://github.com/JabRef/jabref/pull/5826)
1919
- We reintroduced the index column. [#5844](https://github.com/JabRef/jabref/pull/5844)
@@ -37,8 +37,15 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
3737
- We fixed several issues concerning managing external file types: Now everything is usable and fully functional. Previously, there were problems with the radio buttons, with saving the settings and with loading an input field value. Furthermore, different behavior for Windows and other operating systems was given, which was unified as well. [#5846](https://github.com/JabRef/jabref/issues/5846)
3838
- We fixed an issue where entries containing Unicode charaters were not parsed correctly [#5899](https://github.com/JabRef/jabref/issues/5899)
3939
- We fixed an issue where an entry containing an external filename with curly braces could not be saved. Curly braces are now longer allowed in filenames. [#5899](https://github.com/JabRef/jabref/issues/5899)
40+
- We fixed an issue where changing the type of an entry did not update the main table [#5906](https://github.com/JabRef/jabref/issues/5906)
41+
- We fixed an issue where opening a library from the recent libraries menu was not possible [#5939](https://github.com/JabRef/jabref/issues/5939)
42+
- We fixed an issue in the optics of the library properties, that cropped the dialog on scaled displays. [#5969](https://github.com/JabRef/jabref/issues/5969)
4043
- We fixed an issue where changing the type of an entry did not update the main table. [#5906](https://github.com/JabRef/jabref/issues/5906)
4144
- We fixed an issue where opening a library from the recent libraries menu was not possible. [#5939](https://github.com/JabRef/jabref/issues/5939)
45+
- We fixed an issue where the most bottom group in the list got lost, if it was dragged on itself. [#5983](https://github.com/JabRef/jabref/issues/5983)
46+
- We fixed an issue where changing entry type doesn't always work when biblatex source is shown. [#5905](https://github.com/JabRef/jabref/issues/5905)
47+
- We fixed an issue where the group and the link column were not updated after changing the entry in the main table. [#5985](https://github.com/JabRef/jabref/issues/5985)
48+
- We fixed an issue where reordering the groups was not possible after inserting an article. [#6008](https://github.com/JabRef/jabref/issues/6008)
4249

4350
### Removed
4451

build.gradle

+120-99
Large diffs are not rendered by default.

docs/README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
This page presents all development informatation around JabRef. For users documentation see <https://docs.jabref.org>.
44

5+
## Excersises
6+
7+
Uni Basel offers a German (🇩🇪) Software Engineering course which uses JabRef as one example.
8+
Look at [Exercise 5](https://github.com/unibas-marcelluethi/software-engineering/blob/master/docs/week5/exercises/practical-exercises.md) for an exercise where some important points of JabRef are touched.
9+
510
## How tos
611

7-
- [Sync your fork with the JabRef repository](https://help.github.com/articles/syncing-a-fork/)
12+
- External: [Sync your fork with the JabRef repository](https://help.github.com/articles/syncing-a-fork/)
13+
- External (🇩🇪): Branches and pull requests: <https://github.com/unibas-marcelluethi/software-engineering/blob/master/docs/week2/exercises/practical-exercises.md>
814

915
## Command Line
1016

docs/code-quality.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Code Quality
2+
3+
We monitor the general source code quality at three places:
4+
5+
* [codacy](https://www.codacy.com/) is a hosted service to monitor code quality. It thereby combines the results of available open source code quality checkers such as [Checkstyle](https://checkstyle.sourceforge.io/) or [PMD](https://pmd.github.io/). The code quality analysis for JabRef is available at <https://app.codacy.com/gh/JabRef/jabref/dashboard>, especially the [list of open issues](https://app.codacy.com/gh/JabRef/jabref/issues/index). In case a rule feels wrong, it is most likely a PMD rule. The JabRef team can change the configuration at <https://app.codacy.com/p/306789/patterns/list?engine=9ed24812-b6ee-4a58-9004-0ed183c45b8f>.
6+
* [codecov](https://codecov.io/) is a solution to check code coverage of test cases. The code coverage metrics for JabRef are available at <https://codecov.io/github/JabRef/jabref>.
7+
* [Teamscale](https://www.cqse.eu/de/produkte/teamscale/landing/) is a popular German product analyzing code quality. The analysis results are available at <https://demo.teamscale.com/findings.html#/jabref/?>.
8+
9+
We strongly recommend to read following two books on code quality:
10+
11+
* [Java by Comparison](java.by-comparison.com/) is a book by three JabRef developers which focuses on code improvements close to single statements. It is fast to read and one gains much information from each recommendation discussed in the book.
12+
* [Effective Java](https://www.oreilly.com/library/view/effective-java-3rd/9780134686097/) is the standard book for advanced Java programming. Did you know that `enum` is the [recommended way to enforce a singleton instance of a class](https://learning.oreilly.com/library/view/effective-java-3rd/9780134686097/ch2.xhtml#lev3)? Did you know that one should [refer to objects by their interfaces](https://learning.oreilly.com/library/view/effective-java-3rd/9780134686097/ch9.xhtml#lev64)?

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Setup a local workspace
1+
# Set up a local workspace
22

33
This guide explains how to set up your environment for development of JabRef. It includes information about prerequisites, configuring your IDE, and running JabRef locally to verify your setup.
44

5-
For a complete step-by-step guide (using IntellJ as the IDE), have a look at the following video instructions:
5+
For a complete step-by-step guide for Linux using IntellJ IDEA as the IDE, have a look at the following video instructions:
66

7-
<p align="center">
8-
<a href="http://www.youtube.com/watch?v=FeQpygT0314"><img src="http://img.youtube.com/vi/FeQpygT0314/0.jpg" /></a>
9-
</p>
7+
<a href="https://youtu.be/JkFVJ6p0urw">
8+
<img src="https://img.youtube.com/vi/JkFVJ6p0urw/mqdefault.jpg" alt="JabRef development video tutorial"/>
9+
</a>
1010

1111
## Prerequisites
1212

src/main/java/module-info.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
requires java.sql;
77

88
// JavaFX
9+
requires javafx.base;
910
requires javafx.graphics;
1011
requires javafx.swing;
1112
requires javafx.controls;
@@ -17,6 +18,7 @@
1718
requires de.jensd.fx.fontawesomefx.commons;
1819
requires de.jensd.fx.fontawesomefx.materialdesignicons;
1920
requires org.controlsfx.controls;
21+
requires org.fxmisc.richtext;
2022

2123
provides com.airhacks.afterburner.views.ResourceLocator
2224
with org.jabref.gui.util.JabRefResourceLocator;
@@ -62,7 +64,6 @@
6264
requires org.graalvm.js;
6365
requires org.apache.xmpbox;
6466
requires de.saxsys.mvvmfx.validation;
65-
requires richtextfx;
6667
requires com.google.gson;
6768
requires unirest.java;
6869
requires org.apache.httpcomponents.httpclient;
@@ -72,9 +73,10 @@
7273
requires java.string.similarity;
7374
requires ojdbc10;
7475
requires org.postgresql.jdbc;
76+
requires org.mariadb.jdbc;
77+
uses org.mariadb.jdbc.credential.CredentialPlugin;
7578
requires org.apache.commons.lang3;
7679
requires org.antlr.antlr4.runtime;
7780
requires flowless;
7881
requires org.apache.tika.core;
79-
requires javafx.base;
8082
}

src/main/java/org/jabref/gui/JabRefFrame.java

+19-12
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ private Node createToolbar() {
494494
factory.createIconButton(StandardActions.GENERATE_CITE_KEYS, new OldDatabaseCommandWrapper(Actions.MAKE_KEY, this, stateManager)),
495495
factory.createIconButton(StandardActions.CLEANUP_ENTRIES, new OldDatabaseCommandWrapper(Actions.CLEANUP, this, stateManager)),
496496
new Separator(Orientation.VERTICAL),
497-
factory.createIconButton(StandardActions.FORK_ME, new OpenBrowserAction("https://github.com/JabRef/jabref")),
497+
factory.createIconButton(StandardActions.OPEN_GITHUB, new OpenBrowserAction("https://github.com/JabRef/jabref")),
498498
factory.createIconButton(StandardActions.OPEN_FACEBOOK, new OpenBrowserAction("https://www.facebook.com/JabRef/")),
499499
factory.createIconButton(StandardActions.OPEN_TWITTER, new OpenBrowserAction("https://twitter.com/jabref_org"))
500500
);
@@ -653,6 +653,7 @@ private MenuBar createMenu() {
653653
Menu edit = new Menu(Localization.lang("Edit"));
654654
Menu library = new Menu(Localization.lang("Library"));
655655
Menu quality = new Menu(Localization.lang("Quality"));
656+
Menu lookup = new Menu(Localization.lang("Lookup"));
656657
Menu view = new Menu(Localization.lang("View"));
657658
Menu tools = new Menu(Localization.lang("Tools"));
658659
Menu options = new Menu(Localization.lang("Options"));
@@ -716,18 +717,23 @@ private MenuBar createMenu() {
716717

717718
new SeparatorMenuItem(),
718719

720+
factory.createMenuItem(StandardActions.REPLACE_ALL, new OldDatabaseCommandWrapper(Actions.REPLACE_ALL, this, stateManager)),
721+
factory.createMenuItem(StandardActions.GENERATE_CITE_KEYS, new OldDatabaseCommandWrapper(Actions.MAKE_KEY, this, stateManager)),
722+
723+
new SeparatorMenuItem(),
724+
719725
factory.createMenuItem(StandardActions.MANAGE_KEYWORDS, new ManageKeywordsAction(stateManager))
720726
);
721727

722728
if (Globals.prefs.getBoolean(JabRefPreferences.SPECIALFIELDSENABLED)) {
723729
edit.getItems().addAll(
730+
new SeparatorMenuItem(),
724731
SpecialFieldMenuItemFactory.createSpecialFieldMenuForActiveDatabase(SpecialField.RANKING, factory, undoManager),
725732
SpecialFieldMenuItemFactory.getSpecialFieldSingleItemForActiveDatabase(SpecialField.RELEVANCE, factory),
726733
SpecialFieldMenuItemFactory.getSpecialFieldSingleItemForActiveDatabase(SpecialField.QUALITY, factory),
727734
SpecialFieldMenuItemFactory.getSpecialFieldSingleItemForActiveDatabase(SpecialField.PRINTED, factory),
728735
SpecialFieldMenuItemFactory.createSpecialFieldMenuForActiveDatabase(SpecialField.PRIORITY, factory, undoManager),
729-
SpecialFieldMenuItemFactory.createSpecialFieldMenuForActiveDatabase(SpecialField.READ_STATUS, factory, undoManager),
730-
new SeparatorMenuItem()
736+
SpecialFieldMenuItemFactory.createSpecialFieldMenuForActiveDatabase(SpecialField.READ_STATUS, factory, undoManager)
731737
);
732738
}
733739

@@ -763,6 +769,10 @@ private MenuBar createMenu() {
763769
factory.createMenuItem(StandardActions.SET_FILE_LINKS, new AutoLinkFilesAction(this, prefs, stateManager, undoManager, Globals.TASK_EXECUTOR))
764770
);
765771

772+
lookup.getItems().addAll(
773+
factory.createMenuItem(StandardActions.FIND_DUPLICATES, new DuplicateSearch(this, dialogService, stateManager))
774+
);
775+
766776
// PushToApplication
767777
final PushToApplicationAction pushToApplicationAction = pushToApplicationsManager.getPushToApplicationAction();
768778
final MenuItem pushToApplicationMenuItem = factory.createMenuItem(pushToApplicationAction.getActionInformation(), pushToApplicationAction);
@@ -771,6 +781,9 @@ private MenuBar createMenu() {
771781
tools.getItems().addAll(
772782
factory.createMenuItem(StandardActions.PARSE_TEX, new ParseTexAction(stateManager)),
773783
factory.createMenuItem(StandardActions.NEW_SUB_LIBRARY_FROM_AUX, new NewSubLibraryAction(this, stateManager)),
784+
785+
new SeparatorMenuItem(),
786+
774787
factory.createMenuItem(StandardActions.FIND_UNLINKED_FILES, new FindUnlinkedFilesAction(this, stateManager)),
775788
factory.createMenuItem(StandardActions.WRITE_XMP, new OldDatabaseCommandWrapper(Actions.WRITE_XMP, this, stateManager)),
776789
factory.createMenuItem(StandardActions.COPY_LINKED_FILES, new CopyFilesAction(stateManager, this.getDialogService())),
@@ -782,8 +795,6 @@ private MenuBar createMenu() {
782795

783796
new SeparatorMenuItem(),
784797

785-
factory.createMenuItem(StandardActions.GENERATE_CITE_KEYS, new OldDatabaseCommandWrapper(Actions.MAKE_KEY, this, stateManager)),
786-
factory.createMenuItem(StandardActions.REPLACE_ALL, new OldDatabaseCommandWrapper(Actions.REPLACE_ALL, this, stateManager)),
787798
factory.createMenuItem(StandardActions.SEND_AS_EMAIL, new OldDatabaseCommandWrapper(Actions.SEND_AS_EMAIL, this, stateManager)),
788799
pushToApplicationMenuItem,
789800

@@ -849,23 +860,19 @@ private MenuBar createMenu() {
849860

850861
new SeparatorMenuItem(),
851862

863+
factory.createMenuItem(StandardActions.DONATE, new OpenBrowserAction("https://donations.jabref.org")),
852864
factory.createMenuItem(StandardActions.SEARCH_FOR_UPDATES, new SearchForUpdateAction(Globals.BUILD_INFO, prefs.getVersionPreferences(), dialogService, Globals.TASK_EXECUTOR)),
853865
factory.createSubMenu(StandardActions.WEB_MENU,
854866
factory.createMenuItem(StandardActions.OPEN_WEBPAGE, new OpenBrowserAction("https://jabref.org/")),
855867
factory.createMenuItem(StandardActions.OPEN_BLOG, new OpenBrowserAction("https://blog.jabref.org/")),
856868
factory.createMenuItem(StandardActions.OPEN_FACEBOOK, new OpenBrowserAction("https://www.facebook.com/JabRef/")),
857869
factory.createMenuItem(StandardActions.OPEN_TWITTER, new OpenBrowserAction("https://twitter.com/jabref_org")),
870+
factory.createMenuItem(StandardActions.OPEN_GITHUB, new OpenBrowserAction("https://github.com/JabRef/jabref")),
858871

859872
new SeparatorMenuItem(),
860873

861-
factory.createMenuItem(StandardActions.FORK_ME, new OpenBrowserAction("https://github.com/JabRef/jabref")),
862874
factory.createMenuItem(StandardActions.OPEN_DEV_VERSION_LINK, new OpenBrowserAction("https://builds.jabref.org/master/")),
863-
factory.createMenuItem(StandardActions.OPEN_CHANGELOG, new OpenBrowserAction("https://github.com/JabRef/jabref/blob/master/CHANGELOG.md")),
864-
865-
new SeparatorMenuItem(),
866-
867-
factory.createMenuItem(StandardActions.DONATE, new OpenBrowserAction("https://donations.jabref.org"))
868-
875+
factory.createMenuItem(StandardActions.OPEN_CHANGELOG, new OpenBrowserAction("https://github.com/JabRef/jabref/blob/master/CHANGELOG.md"))
869876
),
870877
factory.createMenuItem(StandardActions.ABOUT, new AboutAction())
871878
);

src/main/java/org/jabref/gui/SaveOrderConfigDisplay.fxml

+20-19
Original file line numberDiff line numberDiff line change
@@ -24,37 +24,38 @@
2424
<RadioButton fx:id="exportInSpecifiedOrder"
2525
text="%Export entries ordered as specified" toggleGroup="$saveOrderToggleGroup"/>
2626

27-
<GridPane alignment="CENTER_LEFT" hgap="10.0">
27+
<GridPane hgap="10.0" vgap="4.0">
2828
<columnConstraints>
29-
<ColumnConstraints hgrow="SOMETIMES" minWidth="-Infinity" prefWidth="100.0"/>
30-
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
31-
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
29+
<ColumnConstraints hgrow="NEVER" minWidth="25.0" maxWidth="25.0"/>
30+
<ColumnConstraints hgrow="SOMETIMES" percentWidth="30.0" />
31+
<ColumnConstraints hgrow="SOMETIMES" />
32+
<ColumnConstraints hgrow="SOMETIMES" halignment="LEFT"/>
3233
</columnConstraints>
3334
<rowConstraints>
34-
<RowConstraints prefHeight="30.0"/>
35-
<RowConstraints prefHeight="30.0"/>
36-
<RowConstraints prefHeight="30.0"/>
37-
<RowConstraints prefHeight="30.0"/>
38-
<RowConstraints prefHeight="30.0"/>
39-
<RowConstraints prefHeight="30.0"/>
35+
<RowConstraints minHeight="30.0" vgrow="SOMETIMES" />
36+
<RowConstraints minHeight="30.0" vgrow="SOMETIMES" />
37+
<RowConstraints minHeight="30.0" vgrow="SOMETIMES" />
4038
</rowConstraints>
4139

42-
<Label disable="${!exportInSpecifiedOrder.selected}" text="%Primary sort criterion" GridPane.rowIndex="0"/>
43-
<Label disable="${!exportInSpecifiedOrder.selected}" text="%Secondary sort criterion" GridPane.rowIndex="1"/>
44-
<Label disable="${!exportInSpecifiedOrder.selected}" text="%Tertiary sort criterion" GridPane.rowIndex="2"/>
40+
<Label text="%Primary sort criterion" GridPane.columnIndex="1" GridPane.rowIndex="0"
41+
disable="${!exportInSpecifiedOrder.selected}"/>
42+
<Label text="%Secondary sort criterion" GridPane.columnIndex="1" GridPane.rowIndex="1"
43+
disable="${!exportInSpecifiedOrder.selected}"/>
44+
<Label text="%Tertiary sort criterion" GridPane.columnIndex="1" GridPane.rowIndex="2"
45+
disable="${!exportInSpecifiedOrder.selected}"/>
4546

46-
<ComboBox fx:id="savePriSort" editable="true" GridPane.columnIndex="1" GridPane.rowIndex="0"
47+
<ComboBox fx:id="savePriSort" editable="true" GridPane.columnIndex="2" GridPane.rowIndex="0"
4748
disable="${!exportInSpecifiedOrder.selected}"/>
48-
<ComboBox fx:id="saveSecSort" editable="true" GridPane.columnIndex="1" GridPane.rowIndex="1"
49+
<ComboBox fx:id="saveSecSort" editable="true" GridPane.columnIndex="2" GridPane.rowIndex="1"
4950
disable="${!exportInSpecifiedOrder.selected}"/>
50-
<ComboBox fx:id="saveTerSort" editable="true" GridPane.columnIndex="1" GridPane.rowIndex="2"
51+
<ComboBox fx:id="saveTerSort" editable="true" GridPane.columnIndex="2" GridPane.rowIndex="2"
5152
disable="${!exportInSpecifiedOrder.selected}"/>
5253

5354
<CheckBox fx:id="savePriDesc" disable="${!exportInSpecifiedOrder.selected}" mnemonicParsing="false"
54-
text="%Descending" GridPane.columnIndex="2" GridPane.rowIndex="0"/>
55+
text="%Descending" GridPane.columnIndex="3" GridPane.rowIndex="0"/>
5556
<CheckBox fx:id="saveSecDesc" disable="${!exportInSpecifiedOrder.selected}" mnemonicParsing="false"
56-
text="%Descending" GridPane.columnIndex="2" GridPane.rowIndex="1"/>
57+
text="%Descending" GridPane.columnIndex="3" GridPane.rowIndex="1"/>
5758
<CheckBox fx:id="saveTerDesc" disable="${!exportInSpecifiedOrder.selected}" mnemonicParsing="false"
58-
text="%Descending" GridPane.columnIndex="2" GridPane.rowIndex="2"/>
59+
text="%Descending" GridPane.columnIndex="3" GridPane.rowIndex="2"/>
5960
</GridPane>
6061
</fx:root>

0 commit comments

Comments
 (0)