Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Start IntelliJ IDEA.
IntelliJ shows the following window:

{% figure caption:"IntelliJ Start Window" %}
![IntelliJ Start Window](guidelines-intellij-start-window.png)
![IntelliJ Start Window](11-01-intellij-start-window.png)
{% endfigure %}

## Open the project
Expand All @@ -23,20 +23,20 @@ Click on "Open"
Choose `build.gradle.kts` in the root of the `jabref` source folder:

{% figure caption:"Choose `build.gradle.kts` in the “Open Project or File” dialog" %}
![Open File or Project dialog](11-3-choose-build-gradle-kts.png)
![Open File or Project dialog](11-02-choose-build-gradle-kts.png)
{% endfigure %}

After clicking "Open," IntelliJ asks how that file should be opened.
Answer: "Open as Project"

{% figure caption:"Choose “Open as Project” in the Open Project dialog" %}
![Open Project dialog](11-4-guidelines-choose-open-as-project.png)
![Open Project dialog](11-03-guidelines-choose-open-as-project.png)
{% endfigure %}

Then, trust the project:

{% figure caption:"Choose “Trust Project” in the “Trust and Open Project” dialog" %}
![Trust and Open Project dialog](12-05-guidelines-trust-project.png)
![Trust and Open Project dialog](11-04-guidelines-trust-project.png)
{% endfigure %}

## Confirm JDK Downloading
Expand All @@ -46,15 +46,15 @@ Keep the suggested Java version and choose "Eclipse Temurin" as Vendor.
Click "Download".

{% figure caption:"Choose “Eclipse Temurin” in the “Download JDK” dialog" %}
![Choose Eclipse Temurin](12-06-download-jdk-temurin.png)
![Choose Eclipse Temurin](11-05-download-jdk-temurin.png)
{% endfigure %}

## Allow JDK to access the internet

Allow also access for both cases and click "Allow access".

{% figure caption:"Trust JDK" %}
![Windows Firewall JDK](12-07-trust-firewall.png)
![Windows Firewall JDK](11-06-trust-firewall.png)
{% endfigure %}

## Wait for IntelliJ IDEA to import the gradle project
Expand All @@ -64,13 +64,13 @@ This will take several minutes.
Wait until this disappears.

{% figure caption:"Importing 'jabref' Gradle Project" %}
![Importing 'jabref' Gradle Project](12-08-importing-project.png)
![Importing 'jabref' Gradle Project](11-07-importing-project.png)
{% endfigure %}

## IntelliJ IDEA will report low memory

{% figure caption:"Low memory pop up" %}
![alt text](12-09-low-memory.png)
![Low memory pop up](11-08-low-memory.png)
{% endfigure %}

1. Click on "Configure".
Expand All @@ -88,7 +88,7 @@ Go to **File > Settings... > Version Control > Directory Mappings**.<br>
Currently, it looks as follows:

{% figure caption:"Directory Mappings unmodified" %}
![Directory Mappings including sub modules](12-12-intellij-directory-mappings-unmodified.png)
![Directory Mappings including sub modules](11-09-intellij-directory-mappings-unmodified.png)
{% endfigure %}

You need to tell IntelliJ to ignore the submodules `jablib\src\main\abbrv.jabref.org`, `jablib\src\main\resources\csl-locales`, and `jablib\src\main\resources\csl-styles`.
Expand All @@ -98,7 +98,7 @@ Then press the minus button on top.
This will make these directories "Unregistered roots:", which is fine.

{% figure caption:"Directory Mappings having three unregistered roots" %}
![Directory Mappings having three repositories unregistered](12-13-intellij-directory-mappings-unregistered-roots.png)
![Directory Mappings having three repositories unregistered](11-10-intellij-directory-mappings-unregistered-roots.png)
{% endfigure %}

Click "OK"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,39 @@ Press the synchronization button in the gradle menu.
2. Click on the arrows on the left side of this pane.

{% figure caption:"Gradle sync button" %}
![Platform Settings - SDKs](13-01-gradle-sync.png)
![Platform Settings - SDKs](12-01-gradle-sync.png)
{% endfigure %}

Press <kbd>Alt</kbd>+<kbd>1</kbd> to show the project view

Then, on the left side the project folder is there:

{% figure caption:"Project folder" %}
![Project folder](13-02-project-folder.png)
![Project folder](12-02-project-folder.png)
{% endfigure %}

## Switch JDK to the latest one

Open the module settings:
Go to "File > Project Structure" or press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Alt</kbd>+<kbd>S</kbd>.

1. Open the context menu of the project
2. Choose "Open Module Settings"
{% figure caption:"Open Project Structure" %}
![Open Project Structure](12-02-open-project-settings.png)
{% endfigure %}

Click on "Project" on the left side. Then, select **temurin-24** as the project SDK (continue reading if this option is not available).

{% figure caption:"Open Module Settings" %}
![Open Module Settings](13-03-open-module-settings.png)
{% figure caption:"Project Structure - Project SDK" %}
![Project Structure - Project SDK](12-03-project-sdk.png)
{% endfigure %}

Enable JDK 24:
If you do not have the access to this JDK, download it by clicking on "Download JDK..." In the dialog that opens, select version 24, vendor "Eclipse Temurin (AdoptOpenJDK HotSpot)", and click "Download".

1. On the left, navigate to "Project".
2. Choose "Download JDK..."
3. Select version 24
4. Select vendor "Eclipse Temurin"
5. Click on "Download"
{% figure caption:"Dropdown to select Download JDK" %}
![Dropdown to select Download JDK](12-04-download-jdk.png)
{% endfigure %}

{% figure caption:"Download Eclipse Temurin" %}
![Download Eclipse Temurin](13-04-download-temurin.png)
{% figure caption:"Download JDK dialog" %}
![Download JDK dialog](12-05-download-jdk-dialog.png)
{% endfigure %}

Finally enable the JDK:
Expand All @@ -59,7 +60,7 @@ Finally enable the JDK:
Enable annotation processors by navigating to **File > Settings > Build, Execution, Deployment > Compiler > Annotation processors** and check "Enable annotation processing"

{% figure caption:"Enabled annotation processing" %}
![Enable annotation processing](guidelines-intellij-enable-annotation-processing.png)
![Enable annotation processing](12-06-enable-annotation-processing.png)
{% endfigure %}

## Using Gradle from within IntelliJ IDEA
Expand All @@ -71,7 +72,7 @@ Use the Gradle Tool Window to build all parts of JabRef and run it.
To do so, expand the JabRef project in the Gradle Tool Window, navigate to "jabgui", expand it, navigate to "application", expand it, and double click "run".

{% figure caption:"JabRef > Tasks > application > run" %}
![JabRef > Tasks > application > run](13-05-run-gradle.png)
![JabRef > Tasks > application > run](12-07-run-gradle.png)
{% endfigure %}

The Gradle run window opens, shows compilation and then the output of JabRef.
Expand Down Expand Up @@ -161,23 +162,29 @@ Enter `bibentrytest`.
Now, `BibEntryTest` should appear first:

{% figure caption:"IntelliJ search for class “BibEntryTest”" %}
![IntelliJ search for class "BibEntryTest"](guidelines-intellij-locate-bibentrytest.png)
![IntelliJ search for class "BibEntryTest"](12-08-locate-BibEntryTest.png)
{% endfigure %}

Press <kbd>Enter</kbd> to jump to that class.

Hover on the green play button on `defaultConstructor`:

{% figure caption:"However on green play button" %}
![However on green play button](guidelines-intellij-run-single-test.png)
![However on green play button](12-09-run-single-test.png)
{% endfigure %}

Then, click on it.
A popup menu opens.
Choose the first entry "Run testDefaultConstructor" and click on it.
Choose the first entry "Run BibEntryTest.testDefaultConstructor" and click on it.

{% figure caption:"Run BibEntryTest.testDefaultConstructor" %}
![Popup menu - Run testDefaultConstructor](12-10-run-single-test-launch-config.png)
{% endfigure %}

Then, another popup menu opens. Choose "test" as the run task for the test.

{% figure caption:"Run testDefaultConstructor" %}
![Popup menu - Run testDefaultConstructor](guidelines-intellij-run-single-test-launch-config.png)
{% figure caption:"Run Tasks for default Constructor" %}
![Run Tasks for default Constructor](12-11-run-task-for-test.png)
{% endfigure %}

Then, the single test starts.
Expand All @@ -186,15 +193,15 @@ You also have an entry in the Launch configurations to directly launch the test.
You can also click on the debug symbol next to it to enable stopping at breakpoints.

{% figure caption:"Launch menu contains BibEntry test case" %}
![Launch menu contains BibEntry test case](guidelines-intellij-run-bibentry-test.png)
![Launch menu contains BibEntry test case](12-12-run-BibEntryTest.png)
{% endfigure %}

The tests are green after the run.
You can also use the play button there to re-execute the tests.
A right-click on "BibEntryTests" enables the debugger to start.

{% figure caption:"Run window for the BibEntry test case" %}
![Run window for the BibEntry test case](guidelines-intellij-tests-are-green.png)
![Run window for the BibEntry test case](12-13-tests-are-green.png)
{% endfigure %}

<!-- markdownlint-disable-file MD033 -->
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ Click on "Install" choose "CheckStyle-IDEA".<br>
**Note:** In some MacBooks, `Settings` can be found at the "IntelliJ" button of the app menu instead of at "File".

{% figure caption:"Install CheckStyle" %}
![Install CheckStyle](guidelines-intellij-install-checkstyle.png)
![Install CheckStyle](13-01-install-checkstyle.png)
{% endfigure %}

After clicking, IntelliJ asks for confirmation:

{% figure caption:"Third Party Plugin Privacy Notice" %}
![Third Party Plugin Privacy Notice](guidelines-intellij-checkstyle-confirmation.png)
![Third Party Plugin Privacy Notice](13-02-checkstyle-confirmation.png)
{% endfigure %}

If you agree, click on "Agree" and you can continue.

Afterwards, use the "Restart IDE" button to restart IntelliJ.
Afterward, use the "Restart IDE" button to restart IntelliJ.

{% figure caption:"IntelliJ restart IDE" %}
![IntelliJ restart IDE](guidelines-intellij-checkstyle-restart-ide.png)
![IntelliJ restart IDE](13-03-checkstyle-restart-ide.png)
{% endfigure %}

Click on "Restart" to finally restart.
Expand All @@ -44,14 +44,14 @@ then click "Import Scheme >",
then click "IntelliJ IDEA code style XML"

{% figure caption:"Location of “Import Scheme > IntelliJ IDEA code style XML”" %}
![Location of IntelliJ IDEA code style XML](guidelines-intellij-codestyle-import.png)
![Location of IntelliJ IDEA code style XML](13-04-import-checkstyle.png)
{% endfigure %}

You have to browse for the directory `config` in JabRef's code.
There is an `IntelliJ Code Style.xml`.

{% figure caption:"Browsing for `config/IntelliJ Code Style.xml`" %}
![Browsing for config/IntelliJ Code Style.xml](guidelines-intellij-codestyle-import-select-xml-file.png)
![Browsing for config/IntelliJ Code Style.xml](13-05-select-checkstyle-xml-file.png)
{% endfigure %}

Click "OK".
Expand All @@ -60,7 +60,7 @@ At following dialog is "Import Scheme".
Click there "OK", too.

{% figure caption:"Import to JabRef" %}
![Import to JabRef](guidelines-intellij-codestyle-import-as-jabref.png)
![Import to JabRef](13-06-code-style-import-as-jabref.png)
{% endfigure %}

Click on "Apply" to store the preferences.
Expand All @@ -74,7 +74,7 @@ Go to **File > Settings... > Tools > Checkstyle > Configuration File**
Trigger the import dialog of a CheckStyle style by clicking the \[+] button:

{% figure caption:"Trigger the rule import dialog" %}
![Trigger the rule import dialog](guidelines-intellij-checkstyle-start-import.png)
![Trigger the rule import dialog](13-07-checkstyle-start-import.png)
{% endfigure %}

Then:
Expand All @@ -85,22 +85,22 @@ Then:
* Click "Next"

{% figure caption:"Filled Rule Import Dialog" %}
![Filled Rule Import Dialog](guidelines-intellij-checkstyle-import-file.png)
![Filled Rule Import Dialog](13-08-checkstyle-import-file.png)
{% endfigure %}

Click on "Finish"

Activate the CheckStyle configuration file by ticking it in the list

{% figure caption:"JabRef's checkstyle config is activated" %}
![JabRef's checkstyle config is activated](guidelines-intellij-checkstyle-jabref-active.png)
![JabRef's checkstyle config is activated](13-09-checkstyle-jabref-active.png)
{% endfigure %}

Ensure that the [latest CheckStyle version](https://checkstyle.org/releasenotes.html) is selected (10.21.0 or higher).
Also, set the "Scan Scope" to "Only Java sources (including tests)".

{% figure caption:"Checkstyle is the highest version - and tests are also scanned" %}
![Checkstyle is the highest version - and tests are also scanned](guidelines-intellij-checkstyle-final-settings.png)
![Checkstyle is the highest version - and tests are also scanned](13-10-checkstyle-final-settings.png)
{% endfigure %}

Save settings by clicking "Apply" and then "OK"
Expand All @@ -112,7 +112,7 @@ In "Rules", change to "JabRef".
Then, you can run a check on all modified files.

{% figure caption:"JabRef's style is active - and we are ready to run a check on all modified files" %}
![JabRef's style is active - and we are ready to run a check on all modified files](guidelines-intellij-checkstyle-window.png)
![JabRef's style is active - and we are ready to run a check on all modified files](13-11-checkstyle-window.png)
{% endfigure %}

## Have auto format working properly in JavaDoc
Expand All @@ -124,7 +124,7 @@ Go to **File > Settings... > Editor > Code Style > Java > JavaDoc**.
At "Other", disable "Wrap at right margin"

{% figure caption:"”Wrap at right margin” disabled" %}
!["Wrap at right margin" disabled](guidelines-intellij-editor-javadoc-do-not-wrap.png)
!["Wrap at right margin" disabled](13-12-editor-javadoc-do-not-wrap.png)
{% endfigure %}

## Enable proper import cleanup
Expand All @@ -134,7 +134,7 @@ There, enable both "Add unambiguous imports on the fly" and "Optimize imports on
(Source: [JetBrains help](https://www.jetbrains.com/help/idea/creating-and-optimizing-imports.html#automatically-add-import-statements)).

{% figure caption:"Auto import enabled" %}
![Enable auto import](guidelines-intellij-editor-autoimport.png)
![Enable auto import](13-13-editor-auto-import.png)
{% endfigure %}

Press "OK".
Expand All @@ -146,7 +146,7 @@ At section "General", disable "File header" and "Imports".
At section "Java", disable "One-line methods".

{% figure caption:"Code foldings disabled" %}
![Code foldings disabled](guidelines-settings-intellij-code-foldings.png)
![Code foldings disabled](13-14-code-foldings.png)
{% endfigure %}

Press "OK".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ Due to [IDEA-119280](https://youtrack.jetbrains.com/issue/IDEA-119280), it is a
1. Now you have two Explorer windows opened. Copy all files and directories from the first one to the second one.
11. Locate the class `Launcher` (e.g., by <kbd>ctrl</kbd>+<kbd>N</kbd> and then typing `Launcher`). Press <kbd>Enter</kbd> to jump to that class.
<figure>
<img src="intellij-search-for-launcher.png" alt="IntelliJ search for class “Launcher”">
<img src="89-01-search-for-launcher.png" alt="IntelliJ search for class “Launcher”">
<figcaption>IntelliJ search for class “Launcher”</figcaption>
</figure>
12. Click on the green play button next to the `main` method to create a Launch configuration. IntelliJ will fail in launching.
<figure>
<img src="intellij-hover-on-play-button.png" alt="However on green play">
<img src="89-02-hover-on-play-button.png" alt="However on green play">
<figcaption>However on green play</figcaption>
</figure>
<figure>
<img src="intellij-run-jabref-from-launcher.png" alt="Run JabRef via launcher">
<figcaption>Run JabRef via launcher</figcaption>
<img src="89-03-run-launcher-dropdown.png" alt="Run JabRef via launcher drop down">
<figcaption>Run JabRef via launcher drop down</figcaption>
</figure>
13. On the top right of the IntelliJ window, next to the newly created launch configuration, click on the drop down
14. Click on "Edit Configurations..."
Expand Down Expand Up @@ -74,7 +74,7 @@ Due to [IDEA-119280](https://youtrack.jetbrains.com/issue/IDEA-119280), it is a
19. Click "Apply"
20. Click "Run". You can also click on the debug symbol next to it to enable stopping at breakpoints.
<figure>
<img src="intellij-run-launcher.png" alt="Launch menu contains “Launcher”">
<img src="89-04-run-jabref-from-launcher.png" alt="Launch menu contains “Launcher”">
<figcaption>Launch menu contains “Launcher”</figcaption>
</figure>

Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.