Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fixactionHelperEm…
Browse files Browse the repository at this point in the history
…ptyLib

* upstream/master: (23 commits)
  Make wrap fields also visible in entry editor (#6315)
  Add launcher to fix extension import in snap (#6439)
  add concise message when SaveException happen (#6444)
  Squashed 'src/main/resources/csl-locales/' changes from 79845b087b..cbb45961b8
  Squashed 'src/main/resources/csl-styles/' changes from 906cd6d..270cd32
  Addition to the early pull #6438 (#6441)
  Fix the bug #6421 (#6438)
  Cleanup dead code (#6436)
  Fixed entry duplication on file download (#6437)
  Add workaround for buildSrc issue (#6433)
  Remove dash from illegal characters. (#6300)
  Docs: For developers: New architectural decision added to list (#6397)
  Added a download checkbox to the import dialog (#6381)
  Bump jaxb-xjc from 2.3.2 to 2.3.3 (#6410)
  Bump flexmark-ext-gfm-strikethrough from 0.61.20 to 0.61.24 (#6413)
  Bump byte-buddy-parent from 1.10.9 to 1.10.10 (#6408)
  Bump flexmark-ext-gfm-tasklist from 0.61.20 to 0.61.24 (#6412)
  Bump org.beryx.jlink from 2.17.8 to 2.18.0 (#6411)
  Bump tika-core from 1.24 to 1.24.1 (#6409)
  Bump flexmark from 0.61.20 to 0.61.24 (#6416)
  ...
  • Loading branch information
Siedlerchr committed May 8, 2020
2 parents 4e48079 + e0baa6d commit 70e8077
Show file tree
Hide file tree
Showing 78 changed files with 3,609 additions and 687 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ charset = utf-8
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve

### Added

- We added a new field in the preferences in 'BibTeX key generator' for unwanted characters that can be user-specified. [#6295](https://github.com/JabRef/jabref/issues/6295)
- We added support for searching ShortScience for an entry through the user's browser. [#6018](https://github.com/JabRef/jabref/pull/6018)
- We updated EditionChecker to permit edition to start with a number. [#6144](https://github.com/JabRef/jabref/issues/6144)
- We added tooltips for most fields in the entry editor containing a short description. [#5847](https://github.com/JabRef/jabref/issues/5847)
- We added support for basic markdown in custom formatted previews [#6194](https://github.com/JabRef/jabref/issues/6194)
- We now show the number of items found and selected to import in the online search dialog. [#6248](https://github.com/JabRef/jabref/pull/6248)
- We created a new install screen for macOS. [#5759](https://github.com/JabRef/jabref/issues/5759)
- We implemented an option to download fulltext files while importing. [#6381](https://github.com/JabRef/jabref/pull/6381)
- We fixed the bug when strike the delete key in the text field. [#6421](https://github.com/JabRef/jabref/issues/6421)

### Changed

Expand All @@ -26,11 +29,14 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We changed the buttons for import/export/show all/reset of preferences to smaller icon buttons in the preferences dialog. [#6130](https://github.com/JabRef/jabref/pull/6130)
- We moved the functionality "Manage field names & content" from the "Library" menu to the "Edit" menu, because it affects the selected entries and not the whole library
- We merged the functionality "Append contents from a BibTeX library into the currently viewed library" into the "Import into database" functionality. Fixes [#6049](https://github.com/JabRef/jabref/issues/6049).
- We changed the directory where fulltext downloads are stored to the directory set in the import-tab in preferences. [#6381](https://github.com/JabRef/jabref/pull/6381)
- We improved the error message for invalid jstyles. [#6303](https://github.com/JabRef/jabref/issues/6303)

### Fixed

- We fixed wrong button order (Apply and Cancel) in ManageProtectedTermsDialog.
- We fixed an issue with incompatible characters at BibTeX key [#6257](https://github.com/JabRef/jabref/issues/6257)
- We fixed an issue where dash (`-`) was reported as illegal BibTeX key [#6295](https://github.com/JabRef/jabref/issues/6295)
- We greatly improved the performance of the overall application and many operations. [#5071](https://github.com/JabRef/jabref/issues/5071)
- We fixed an issue where sort by priority was broken. [#6222](https://github.com/JabRef/jabref/issues/6222)
- We fixed an issue where opening a library from the recent libraries menu was not possible. [#5939](https://github.com/JabRef/jabref/issues/5939)
Expand All @@ -45,12 +51,15 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed the display of icon both in the main table and linked file editor. [#6169](https://github.com/JabRef/jabref/issues/6169)
- We fixed the paste entry command in the menu and toolbar, that did not do anything. [#6293](https://github.com/JabRef/jabref/issues/6293)
- We fixed an issue where the windows installer did not create an entry in the start menu [bug report in the forum](https://discourse.jabref.org/t/error-while-fetching-from-doi/2018/3)
- We fixed an issue where only the field `abstract` and `comment` were declared as multiline fields. Other fields can now be configured in the preferences using "Do not wrap the following fields when saving" [4373](https://github.com/JabRef/jabref/issues/4373)
- We fixed an issue where JabRef switched to discrete graphics under macOS [#5935](https://github.com/JabRef/jabref/issues/5935)
- 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)
- 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)


### Removed

- We removed the option of the "enforce legal key". [#6295](https://github.com/JabRef/jabref/issues/6295)
- We removed the obsolete `External programs / Open PDF` section in the preferences, as the default application to open PDFs is now set in the `Manage external file types` dialog. [#6130](https://github.com/JabRef/jabref/pull/6130)
- We removed the option to configure whether a `.bib.bak` file should be generated upon save. It is now always enabled. Documentation at <https://docs.jabref.org/general/autosave>. [#6092](https://github.com/JabRef/jabref/issues/6092)
- We removed the built-in list of IEEE journal abbreviations using BibTeX strings. If you still want to use them, you have to download them separately from <https://abbrv.jabref.org>.
Expand Down Expand Up @@ -102,7 +111,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where adding the addition of a new entry was not completely validated [#6370](https://github.com/JabRef/jabref/issues/6370)
- We fixed an issue where the blue and red text colors in the Merge entries dialog were not quite visible [#6334](https://github.com/JabRef/jabref/issues/6334)
- We fixed an issue where underscore character was removed from the file name in the Recent Libraries list in File menu [#6383](https://github.com/JabRef/jabref/issues/6383)

- We fixed an issue where few keyboard shortcuts regarding new entries were missing [#6403](https://github.com/JabRef/jabref/issues/6403)
### Removed

- Ampersands are no longer escaped by default in the `bib` file. If you want to keep the current behaviour, you can use the new "Escape Ampersands" formatter as a save action. [#5869](https://github.com/JabRef/jabref/issues/5869)
Expand Down
16 changes: 8 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ plugins {
id 'com.github.ben-manes.versions' version '0.28.0'
id 'org.javamodularity.moduleplugin' version '1.5.0'
id 'org.openjfx.javafxplugin' version '0.0.8'
id 'org.beryx.jlink' version '2.17.8'
id 'org.beryx.jlink' version '2.18.0'

// nicer test outputs during running and completion
id 'com.adarshr.test-logger' version '2.0.0'
Expand Down Expand Up @@ -112,7 +112,7 @@ dependencies {
implementation group: 'org.apache.commons', name: 'commons-csv', version: '1.8'
implementation 'com.h2database:h2-mvstore:1.4.200'

implementation group: 'org.apache.tika', name: 'tika-core', version: '1.24'
implementation group: 'org.apache.tika', name: 'tika-core', version: '1.24.1'

// required for reading write-protected PDFs - see https://github.com/JabRef/jabref/pull/942#issuecomment-209252635
implementation 'org.bouncycastle:bcprov-jdk15on:1.65'
Expand Down Expand Up @@ -191,16 +191,16 @@ dependencies {
exclude module: "log4j-core"
}

implementation 'com.vladsch.flexmark:flexmark:0.61.20'
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.61.20'
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.61.20'
implementation 'com.vladsch.flexmark:flexmark:0.61.24'
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.61.24'
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-tasklist:0.61.24'

testImplementation 'io.github.classgraph:classgraph:4.8.77'
testImplementation 'io.github.classgraph:classgraph:4.8.78'
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.2'
testImplementation 'org.junit.platform:junit-platform-launcher:1.6.2'

testImplementation 'net.bytebuddy:byte-buddy-parent:1.10.9'
testImplementation 'net.bytebuddy:byte-buddy-parent:1.10.10'
testRuntime group: 'org.apache.logging.log4j', name: 'log4j-core', version: '3.0.0-SNAPSHOT'
testRuntime group: 'org.apache.logging.log4j', name: 'log4j-jul', version: '3.0.0-SNAPSHOT'
testImplementation 'org.mockito:mockito-core:3.3.3'
Expand All @@ -212,7 +212,7 @@ dependencies {
testImplementation "org.hamcrest:hamcrest-library:2.2"

checkstyle 'com.puppycrawl.tools:checkstyle:8.32'
xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '2.3.2'
xjc group: 'org.glassfish.jaxb', name: 'jaxb-xjc', version: '2.3.3'
jython 'org.python:jython-standalone:2.7.2'
}

Expand Down
2 changes: 1 addition & 1 deletion buildres/linux/JabRef.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Type=Application
DESKTOP_MIMES
Categories=DEPLOY_BUNDLE_CATEGORY
Keywords=bibtex;biblatex;latex;bibliography
StartupWMClass=org-jabref-JabRefMain
StartupWMClass=org.jabref.JabRefMain
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This page presents all development informatation around JabRef. For users documentation see [https://docs.jabref.org](https://docs.jabref.org).

## Teaching Excersises
## Teaching Exercises

We are very happy that JabRef is part of [Software Engineering](https://en.wikipedia.org/wiki/Software_engineering) trainings.
Please head to [Teaching](teaching.md) for more information on using JabRef as teaching object and on previous courses where JabRef was used.
Expand All @@ -26,8 +26,7 @@ Without jlink, it is not possible to generate a fat jar any more. During develop

## Groups


diagram showing aspects of groups: [Groups.uml](Groups.uml).
Diagram showing aspects of groups: [Groups.uml](Groups.uml).

## Decision Records

Expand All @@ -43,6 +42,7 @@ This log lists the decisions for JabRef.
* [ADR-0007](adr/0007-human-readable-changelog.md) - Provide a human-readable changelog
* [ADR-0008](adr/0008-use-public-final-instead-of-getters.md) - Use public final instead of getters to offer access to immutable variables
* [ADR-0009](adr/0009-use-plain-junit5-for-testing.md) - Use Plain JUnit5 for advanced test assertions
* [ADR-0010](0010-use-h2-as-internal-database.md) - Use H2 as Internal SQL Database

For new ADRs, please use [template.md](adr/template.md) as basis. More information on MADR is available at [https://adr.github.io/madr/](https://adr.github.io/madr/). General information about architectural decision records is available at [https://adr.github.io/](https://adr.github.io/).

55 changes: 24 additions & 31 deletions docs/guidelines-for-setting-up-a-local-workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In case you know how to install JDK14 and to fork JabRef's code,

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

[![](https://img.youtube.com/vi/JkFVJ6p0urw/mqdefault.jpg)](https://youtu.be/JkFVJ6p0urw)
[![YouTube video showing the step-by-step guide](https://img.youtube.com/vi/JkFVJ6p0urw/mqdefault.jpg)](https://youtu.be/JkFVJ6p0urw)

## Prerequisites

Expand Down Expand Up @@ -98,26 +98,20 @@ IntelliJ IDEA fully supports Gradle as a build tool, but also has an internal bu
To configure IntelliJ IDEA for developing JabRef, you should first ensure that you have enabled both bundled plugins _Gradle_ and _Gradle Extension_

* Navigate to **File \| Settings \| Plugins \| Installed** and check that you have

the _Gradle_ and _Gradle Extension_ enabled.

After that, you can open `jabref/build.gradle` as a project. It is crucial that Java 14 is used consistently for the JabRef project which includes ensuring the right settings for your project structure, Gradle build, and run configurations.

* Ensure you have a Java 14 SDK configured by navigating to

**File \| Project Structure \| Platform Settings \| SDKs**. If you don't have one, add a new Java JDK and point it to the

location of a JDK 14.

* Navigate to **File \| Project Structure \| Project** and ensure that the projects' SDK is Java 14
* Navigate to **File \| Settings \| Build, Execution, Deployment \| Build Tools \| Gradle** and select the Java 14 SDK as

the Gradle JVM at the bottom.

To prepare IntelliJ's build system two additional steps are required

* Navigate to **File \| Settings \| Build, Execution, Deployment \| Compiler \| Java Compiler**, and under

"Override compiler parameters per-module" add \(\[+\]\) the following compiler arguments for the `JabRef.main` module:

```text
Expand All @@ -134,21 +128,16 @@ To prepare IntelliJ's build system two additional steps are required
Ensuring JabRef builds with Gradle should always the first step because, e.g. it generates additional sources that are required for compiling the code. After adjusting all settings mentioned earlier, your first step should be to

* Open the Gradle Tool Window with the small button that can usually be found on the right side of IDEA or navigate to

**View \| Tool Windows \| Gradle**.

* In the Gradle Tool Window, press the "Reimport All Gradle Projects" button to ensure that all settings are up-to-date

with the setting changes.

After that, you can use the Gradle Tool Window to build all parts JabRef and run it. To do so, expand the JabRef project in the Gradle Tool Window and navigate to Tasks. From there, you can

* Build and run JabRef by double-clicking **JabRef \| Tasks \| application \| run**.

After that a new entry called "jabref \[run\]" will appear in the run configurations.

* Now you can also select "jabref \[run\]" and either run or debug the application from within IntelliJ.

After that a new entry called "jabref \[run\]" will appear in the run configurations.
Now you can also select "jabref \[run\]" and either run or debug the application from within IntelliJ.
You can run any other development task in a similar way. Equivalently, this can also be executed from the terminal by running `./gradlew run`.

#### Using IntelliJ's internal build system
Expand All @@ -158,41 +147,40 @@ You should use IntelliJ IDEA's internal build system for compiling and running J
To use IntelliJ IDEA's internal build system when you build JabRef through **Build \| Build Project** or use the provided "JabRef Main" run configuration, ensure that

* in **File \| Settings \| Build, Execution, Deployment \| Build Tools \| Gradle** the setting "Build and run using" and

"Test using" is set to "IntelliJ IDEA".
* Ignore the Gradle project "buildSrc":
![Ignore the Gradle project "buildSrc"](intellij-gradle-config-ignore-buildSrc.png)

Essentially, you now have the best of both worlds: You can run Gradle tasks using the Gradle Tool Window and unless you haven't made changes to input files that generate sources, you can compile and run with IntelliJ's faster internal build system.

#### Using JabRef's code-style
#### Using JabRef's code style

Contributions to JabRef's source code need to have a code formatting that is consistent with existing source code. For that purpose, JabRef provides code-style and check-style definitions.

* Install the [CheckStyle-IDEA plugin](http://plugins.jetbrains.com/plugin/1065?pr=idea), it can be found via the plug-in repository:
1. Navigate to **File \| Settings \| Plugins \| Marketplace** and search for "Checkstyle" and choose "CheckStyle-IDEA"
2. Close the settings afterwards and restart IntelliJ
1. Navigate to **File \| Settings \| Plugins \| Marketplace** and search for "Checkstyle" and choose "CheckStyle-IDEA"
2. Close the settings afterwards and restart IntelliJ
* Go to **File \| Settings \| Editor \| Code Style**
* Click on the settings wheel \(next to the scheme chooser\), then click "Import Scheme"
* Select the IntelliJ configuration file `config/IntelliJ Code Style.xml`
* Go to **File \| Settings \| Checkstyle \| Configuration File**
1. Import the CheckStyle configuration file by clicking the \[+\] button
2. For the description provide "JabRef"
3. Click "Browse" and choose `config/checkstyle/checkstyle.xml`
4. Check "Store relative to project location"
5. Click "Next" and "Finish"
6. Activate the CheckStyle configuration file by ticking it in the list
7. Ensure that CheckStyle version 8.31 (or higher) is selected
8. Save settings by clicking "OK"

![checkstyle settings](images/intellij-checkstyle-settings.png)
1. Import the CheckStyle configuration file by clicking the \[+\] button
2. For the description provide "JabRef"
3. Click "Browse" and choose `config/checkstyle/checkstyle.xml`
4. Check "Store relative to project location"
5. Click "Next" and "Finish"
6. Activate the CheckStyle configuration file by ticking it in the list
7. Ensure that CheckStyle version 8.31 (or higher) is selected
8. Save settings by clicking "OK"
9. Your configuration should now look like this:
![checkstyle settings](images/intellij-checkstyle-settings.png)

#### Troubleshooting when using both IDEA and Eclipse

If you have configured Eclipse for the same project \(the required steps are described below\), then the additionally added file `Log4jPlugins.java` must be excluded from the compilation process, otherwise an error will occur during the compilation of the project:

* **File \| Settings \| Build, Execution, Deployment \| Compiler \| Excludes** and add the following file to the

list \(\[+\]\), in order to exclude it:

* `src/main/java/org/jabref/gui/logging/plugins/Log4jPlugins.java`

### Setup for Eclipse
Expand Down Expand Up @@ -235,7 +223,12 @@ For Eclipse 2020-03 you need to install [jdk14 support](https://marketplace.ecli
--patch-module org.jabref=build\resources\main
```

6. Optional: Install the [e\(fx\)clipse plugin](http://www.eclipse.org/efxclipse/index.html) from the Eclipse marketplace: 1. Help -&gt; Eclipse Marketplace... -&gt; Search tab 2. Enter "e\(fx\)clipse" in the search dialogue 3. Click "Go" 4. Click "Install" button next to the plugin 5. Click "Finish"
6. Optional: Install the [e\(fx\)clipse plugin](http://www.eclipse.org/efxclipse/index.html) from the Eclipse marketplace:
1. Help -&gt; Eclipse Marketplace... -&gt; Search tab
2. Enter "e\(fx\)clipse" in the search dialogue
3. Click "Go"
4. Click "Install" button next to the plugin
5. Click "Finish"
7. Now you can build and run/debug the application by either using "JabRefLauncher" or "JabRefMain". This is the recommended way, since the application starts quite fast.

## Final comments
Expand Down
Binary file added docs/intellij-gradle-config-ignore-buildSrc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions snap/local/JabRef-launcher
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/sh
DIR="$SNAP/lib/runtime/bin"
"$DIR/java" -p "$DIR/../app" -m org.jabref/org.jabref.JabRefLauncher "$@"
9 changes: 9 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,12 @@ parts:
snapcraftctl build
snapcraftctl set-version "$(cat $SNAPCRAFT_PART_INSTALL/lib/app/JabRef.cfg | grep "app.version=" | cut -d'=' -f2)"
sed -i 's|/opt/jabref/lib/jabrefHost.py|/snap/bin/jabref.browser-proxy|g' $SNAPCRAFT_PART_INSTALL/lib/native-messaging-host/*/org.jabref.jabref.json
rm $SNAPCRAFT_PART_INSTALL/bin/JabRef
jabref-launcher:
after:
- jabref
source: snap/local
source-type: local
plugin: dump
organize:
JabRef-launcher: bin/JabRef
Loading

0 comments on commit 70e8077

Please sign in to comment.