Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master:
  Try to fix linux pdf opening again (#5945)
  [WIP] Initial work on DBMSProcessor batch entry insertion into ENTRY table (#5814)
  followup fix
  Fixfetcher (#5948)
  Bump byte-buddy-parent from 1.10.7 to 1.10.8 (#5952)
  Added MenuButtons to IntegrityCheckDialog (#5955)
  Reimplement custom entry types dialog (#5799)
  Bump unirest-java from 3.4.03 to 3.5.00 (#5953)
  MySQL: Allow public key retrieval (#5909)
  Restructure and improve docs for setting up IntelliJ (#5960)
  Change syntax for Oracle multi-row insert SQL statement (#5837)
  • Loading branch information
Siedlerchr committed Feb 20, 2020
2 parents 859e826 + 5369b3b commit c23b8de
Show file tree
Hide file tree
Showing 34 changed files with 1,131 additions and 585 deletions.
17 changes: 9 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
## [Unreleased]

### Changed
- 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)

- 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)
- We cleaned up the group add/edit dialog. [#5826](https://github.com/JabRef/jabref/pull/5826)
- We reintroduced the index column. [#5844](https://github.com/JabRef/jabref/pull/5844)
- Filenames of external files can no longer contain curly braces

- Filenames of external files can no longer contain curly braces. [#5926](https://github.com/JabRef/jabref/pull/5926)
- We made the filters more easily accessible in the integrity check dialog. [#5955](https://github.com/JabRef/jabref/pull/5955)
- We reimplemented and improved the dialog "Customize entry types" [#4719](https://github.com/JabRef/jabref/issues/4719)

### Fixed

- We fixed and issue where pdf files will not open under some KDE linux distributions when using okular. [#5253](https://github.com/JabRef/jabref/issues/5253)
- We fixed an issue where the Medline fetcher was only working when JabRef was running from source. [#5645](https://github.com/JabRef/jabref/issues/5645)
- We fixed some visual issues in the dark theme. [#5764](https://github.com/JabRef/jabref/pull/5764) [#5753](https://github.com/JabRef/jabref/issues/5753)
- We fixed an issue where non-default previews didn't handle unicode characters. [#5779](https://github.com/JabRef/jabref/issues/5779)
- We improved the performance, especially changing field values in the entry should feel smoother now.
- We improved the performance, especially changing field values in the entry should feel smoother now. [#5843](https://github.com/JabRef/jabref/issues/5843)
- We fixed an issue where the ampersand character wasn't rendering correctly on previews. [#3840](https://github.com/JabRef/jabref/issues/3840)
- We fixed an issue where an erroneous "The library has been modified by another program" message was shown when saving. [#4877](https://github.com/JabRef/jabref/issues/4877)
- We fixed an issue where the file extension was missing after downloading a file (we now fall-back to pdf). [#5816](https://github.com/JabRef/jabref/issues/5816)
Expand All @@ -34,12 +35,12 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- 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)
- We fixed an issue where entries containing Unicode charaters were not parsed correctly [#5899](https://github.com/JabRef/jabref/issues/5899)
- 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)
- 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)
- We fixed an issue where opening a library from the recent libraries menu was not possible [#5939](https://github.com/JabRef/jabref/issues/5939)

- 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)
- We fixed an issue where opening a library from the recent libraries menu was not possible. [#5939](https://github.com/JabRef/jabref/issues/5939)

### 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.

- 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)


## [5.0-beta] – 2019-12-15
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ dependencies {
compile 'org.controlsfx:controlsfx:11.0.1'

compile 'org.jsoup:jsoup:1.12.2'
compile 'com.konghq:unirest-java:3.4.03'
compile 'com.konghq:unirest-java:3.5.00'

compile 'org.slf4j:slf4j-api:2.0.0-alpha1'
compile group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: '3.0.0-SNAPSHOT'
Expand Down Expand Up @@ -211,7 +211,7 @@ dependencies {
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.0'
testCompile 'org.junit.platform:junit-platform-launcher:1.6.0'

testCompile 'net.bytebuddy:byte-buddy-parent:1.10.7'
testCompile 'net.bytebuddy:byte-buddy-parent:1.10.8'
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'
testCompile 'org.mockito:mockito-core:3.2.4'
Expand Down
157 changes: 102 additions & 55 deletions docs/guidelines-for-setting-up-a-local-workspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If you do not yet have a GitHub account, please [create one](https://github.com/

### IDE

We suggest [IntelliJ](https://www.jetbrains.com/idea/) or [Eclipse](https://eclipse.org/) (`2019-12` or newer).
We suggest [IntelliJ IDEA](https://www.jetbrains.com/idea/) or [Eclipse](https://eclipse.org/) (`2019-12` or newer).

Under Ubuntu Linux, you can follow the [documentation from the Ubuntu Community](https://help.ubuntu.com/community/EclipseIDE#Download_Eclipse) or the [step-by-step guideline from Krizna](www.krizna.com/ubuntu/install-eclipse-in-ubuntu-12-04/) to install Eclipse. Under Windows, download it from [www.eclipse.org](http://www.eclipse.org/downloads/) and run the installer.

Expand All @@ -49,51 +49,80 @@ Under Ubuntu Linux, you can follow the [documentation from the Ubuntu Community]

## Configure your IDE

### Setup for IntelliJ

1. Open `jabref/build.gradle` as a project
2. Enable annotation processors:
* File -> Settings -> Build, Execution, Deployment -> Compiler -> Annotation processors:
* Check "Enable annotation processing"
3. Configure module settings: Right click on project -> Open Module Settings:
* Ensure that the projects' SDK is Java 13:
* Project Settings -> Project -> Project SDK: Choose Java 13
* Ensure that standard SDK is Java 13:
* Platform Settings -> SDK -> Choose Java 13
4. Specify additional compiler arguments:
* File -> Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler:
* Under "Override compiler parameters per-module" add ([+]) the following compiler arguments for the `JabRef.main` module:
### Setup for IntelliJ IDEA

IntelliJ IDEA fully supports Gradle as a build tool, but also has an internal
build system which is usually faster. For JabRef, Gradle is required to make a
full build but once set up, IntelliJ IDEA's internal system can be used for sub-sequent
builds.

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 13 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 13 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 13.
* Navigate to **File | Project Structure | Project** and ensure that the projects' SDK is Java 13
* Navigate to **File | Settings | Build, Execution, Deployment | Build Tools | Gradle** and select the Java 13 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:
```
--add-exports=javafx.controls/com.sun.javafx.scene.control=org.jabref
--add-exports=org.controlsfx.controls/impl.org.controlsfx.skin=org.jabref
```
* Enable annotation processors by navigating to
**File | Settings | Build, Execution, Deployment | Compiler | Annotation processors** and check "Enable annotation processing"

#### Using Gradle from within IntelliJ IDEA

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.

You can run any other development task in a similar way.
Equivalently, this can also be executed from the terminal by running `./gradlew run`.

5. Use IntelliJ to build and run (instead of gradle):
* File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle:
* Set "Build and run using" and "Run tests using" both to "IntelliJ IDEA"
6. Ensure that the JDK13 is enabled for Gradle: Use IntelliJ to build and run (instead of gradle):
* File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Gradle:
* Set "Gradle JVM" to "JDK13"
7. Use the provided code style:
1. Install the [CheckStyle-IDEA plugin](http://plugins.jetbrains.com/plugin/1065?pr=idea), it can be found via the plug-in repository:
1. File > Settings > Plugins > Marketplace
2. Search for "Checkstyle" and choose "CheckStyle-IDEA"
3. Close the settings afterwards and restart IntelliJ
2. Go to File > Settings > Editor > Code Style:
1. Click on the settings wheel (next to the scheme chooser), then click "Import Scheme" and choose "IntelliJ Code Style.xml".
2. Select the IntelliJ configuration file `config/IntelliJ Code Style.xml`.
3. Click "OK".
4. Go to File -> Settings -> Other Settings -> Checkstyle -> Configuration File:
1. Import the CheckStyle configuration file by clicking the [+] button
2. For the description provide e.g. "CheckStyle"
3. Click "Browse" and choose `config/checkstyle/checkstyle.xml`
4. Click "Next" and "Finish"
5. Activate the CheckStyle configuration file by ticking it in the list
6. Save settings by clicking "OK"
8. Open Run -> Edit Configurations... -> Select Application -> JabRef Main
* Verify, that "JRE" is set to "Default (JDK 13)" or to JDK 13
* Set "VM Options" to the following:
#### Using IntelliJ's internal build system

You can use IntelliJ IDEA's internal build system for compiling and running JabRef during development which is
usually more responsive. However, **it's important** that you understand that JabRef relies on generated sources
which are only build through Gradle. Therefore, to build or update these dependencies you need to run the `assemble`
Gradle task at least once.

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".

To use the "JabRef Main" run configuration, open **Run | Edit Configurations... | Application | JabRef Main** and

* Verify, that your JDK 13 is used
* Set "VM Options" to the following:

```
--patch-module org.jabref=build/resources/main
Expand Down Expand Up @@ -131,20 +160,38 @@ Under Ubuntu Linux, you can follow the [documentation from the Ubuntu Community]
--patch-module test3=sourcecode_2.12-0.1.4.jar
```
9. 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: Add the following file to the list ([+]), in order to exclude it:
* `src/main/java/org/jabref/gui/logging/plugins/Log4jPlugins.java`
10. Use the provided run configuration: Run -> Run "JabRef Main"
* This uses now IntelliJ for building and running/debugging the application, which is recommended, since the application starts quite fast.
11. Alternatively, the project can also be built and run/debugged by using gradle from within the IDE, which is not recommended, since the application starts significantly slower:
1. Open the gradle tool window:
* View -> Tool Windows -> Gradle
2. Navigate to the following entry in the gradle tool window:
* JabRef -> Tasks -> application -> run
3. Double click "run" to build and run the application
4. After that a new entry called "jabref [run]" will appear in the run configurations.
5. Now you can also select "jabref [run]" and either run or debug the application from within IntelliJ.
* Equivalently, this can also be executed from the terminal by running `./gradlew run`.
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
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
* 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 | Other Settings | Checkstyle | Configuration File**
1. Import the CheckStyle configuration file by clicking the [+] button
2. For the description provide e.g. "CheckStyle"
3. Click "Browse" and choose `config/checkstyle/checkstyle.xml`
4. Click "Next" and "Finish"
5. Activate the CheckStyle configuration file by ticking it in the list
6. Save settings by clicking "OK"
#### 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 All @@ -163,7 +210,7 @@ Make sure your Eclipse installation us up to date, Eclipse 2019-12 or newer is r
5. Create a run/debug configuration for the main class `org.jabref.JabRefLauncher` and/or for `org.jabref.JabRefMain` (both can be used equivalently)
* In the tab "Arguments" of the run/debug configuration, enter the following runtime VM arguments:
* Set "VM Arguments" to:
```
--patch-module test=fastparse_2.12-1.0.0.jar
--patch-module test2=fastparse-utils_2.12-1.0.0.jar
Expand Down
1 change: 1 addition & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,5 @@
requires org.antlr.antlr4.runtime;
requires flowless;
requires org.apache.tika.core;
requires javafx.base;
}
6 changes: 3 additions & 3 deletions src/main/java/org/jabref/gui/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.jabref.gui.bibtexkeypattern.BibtexKeyPatternAction;
import org.jabref.gui.contentselector.ManageContentSelectorAction;
import org.jabref.gui.copyfiles.CopyFilesAction;
import org.jabref.gui.customentrytypes.CustomizeEntryAction;
import org.jabref.gui.customizefields.SetupGeneralFieldsAction;
import org.jabref.gui.dialogs.AutosaveUIManager;
import org.jabref.gui.documentviewer.ShowDocumentViewerAction;
Expand Down Expand Up @@ -829,9 +830,8 @@ private MenuBar createMenu() {

new SeparatorMenuItem(),

factory.createMenuItem(StandardActions.MANAGE_CONTENT_SELECTORS, new ManageContentSelectorAction(this, stateManager))
// TODO: Reenable customize entry types feature (https://github.com/JabRef/jabref/issues/4719)
//factory.createMenuItem(StandardActions.CUSTOMIZE_ENTRY_TYPES, new CustomizeEntryAction(this)),
factory.createMenuItem(StandardActions.MANAGE_CONTENT_SELECTORS, new ManageContentSelectorAction(this, stateManager)),
factory.createMenuItem(StandardActions.CUSTOMIZE_ENTRY_TYPES, new CustomizeEntryAction(stateManager, Globals.entryTypesManager))
);

help.getItems().addAll(
Expand Down
Loading

0 comments on commit c23b8de

Please sign in to comment.