-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into addPrefsForBak
* upstream/main: (31 commits) Fixes #9372 Change default File Chooser to show supported files extensions Fix path in devs documentation (#9810) New translations JabRef_en.properties (Tagalog) New translations JabRef_en.properties (Persian) New translations JabRef_en.properties (Indonesian) New translations JabRef_en.properties (Portuguese, Brazilian) New translations JabRef_en.properties (Vietnamese) New translations JabRef_en.properties (Chinese Traditional) New translations JabRef_en.properties (Chinese Simplified) New translations JabRef_en.properties (Ukrainian) New translations JabRef_en.properties (Turkish) New translations JabRef_en.properties (Swedish) New translations JabRef_en.properties (Russian) New translations JabRef_en.properties (Portuguese) New translations JabRef_en.properties (Polish) New translations JabRef_en.properties (Norwegian) New translations JabRef_en.properties (Dutch) New translations JabRef_en.properties (Korean) New translations JabRef_en.properties (Japanese) New translations JabRef_en.properties (Italian) ...
- Loading branch information
Showing
90 changed files
with
1,117 additions
and
905 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
parent: Code Howtos | ||
--- | ||
|
||
# IntelliJ Hints | ||
|
||
{: .highlight } | ||
Did you know that [IntelliJ allows for reformatting selected code](https://www.jetbrains.com/help/idea/reformat-and-rearrange-code.html#reformat\_code) if you press <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>L</kbd>? | ||
|
||
## Key hints for IntelliJ | ||
|
||
* <kbd>Shift</kbd>+<kbd>Shift</kbd> (AKA double-shift): Open the search dialog. | ||
* <kbd>Ctrl</kbd>+<kbd>N</kbd>: Open the search dialog and select search for a class. | ||
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>F</kbd>: Search everywhere in the code base. | ||
* <kbd>Alt</kbd>+<kbd>F1</kbd> and then <kbd>Enter</kbd>: Locate the file in the search bar on the left side. | ||
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd>: Navigate from a class to the test class. | ||
|
||
--- | ||
parent: Set up a local workspace | ||
grand_parent: Getting into the code | ||
nav_order: 49 | ||
--- | ||
|
||
## Other notes on IntelliJ | ||
|
||
{: .note} | ||
Here, some notes on IntelliJ setup are written down. | ||
These are intended for pro users. | ||
|
||
You should use IntelliJ IDEA's internal build system for compiling and running JabRef tests during development, because it is usually more responsive. | ||
Essentially, you now have the best of both worlds: | ||
You can run Gradle tasks using the Gradle Tool Window. | ||
You can compile and run tests with IntelliJ's faster internal build system | ||
(unless you haven't made changes to input files that generate sources). | ||
|
||
{: .important} | ||
When using IntelliJ's build system, **it is important** that you understand that JabRef relies on generated sources which are only built through Gradle. | ||
Therefore, to build or update these dependencies you need to run the `run` (or `assemble`) Gradle task at least once. | ||
When you followed this guide, you should have done it in the Gradle setup. | ||
|
||
Running JabRef itself through IntelliJ's build system is **not** possible as we encounter difficulties when reading resources though `.class.getResource(...)`. | ||
Although solutions are discussed in length [on stackoverflow](https://stackoverflow.com/q/26328040/873282), there is no "good" solution for us. | ||
|
||
## Running JabRef using IntelliJ's build system | ||
|
||
{ :note } | ||
Maybe does not work | ||
|
||
To run JabRef from IntelliJ, we let IntelliJ create a launch configuration: | ||
|
||
Locate the class `Launcher`: | ||
Press <kbd>Ctrl</kbd>+<kbd>N</kbd>. | ||
Then, the "Search for classes dialog" pops up. | ||
Enter `Launcher`. | ||
Now, only one class should have been found: | ||
|
||
{% figure caption:"IntelliJ search for class “Launcher”" %} | ||
![IntelliJ search for class "Launcher"](../images/intellij-search-for-launcher.png) | ||
{% endfigure %} | ||
|
||
Press <kbd>Enter</kbd> to jump to that class. | ||
|
||
Hover on the green play button. | ||
|
||
{% figure caption:"However on green play" %} | ||
![However on green play](../images/intellij-hover-on-play-button.png) | ||
{% endfigure %} | ||
|
||
Then, click on it. | ||
A popup menu opens. | ||
Choose the first entry and click on it. | ||
|
||
{% figure caption:"Run JabRef via launcher" %} | ||
![Popup menu - Run JabRef via launcher](../images/intellij-run-jabref-from-launcher.png) | ||
{% endfigure %} | ||
|
||
Then, JabRef starts. | ||
|
||
You also have an entry in the Launch configurations to directly launch the JabRef GUI: | ||
|
||
{% figure caption:"Launch menu contains “Launcher”" %} | ||
![Launch menu contains launcher](../images/intellij-run-launcher.png) | ||
{% endfigure %} | ||
|
||
You can also click on the debug symbol next to it to enable stopping at breakpoints. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.