recommended IDE for developing openjdk?
pavel.rappo at oracle.com
Wed Jan 20 18:41:18 UTC 2021
Replies are inline.
> On 20 Jan 2021, at 12:56, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
> Resending with right formatting, sorry
> On 19/01/2021 17:33, Pavel Rappo wrote:
>> Here are three observations on configuring the JDK project in IntelliJ IDEA.
>> 1. A folder can be present or absent in the "Excluded Folders" list. This list sits below the "+ Add Content Root" button on the right-hand side of the "Project Structure / Project Settings / Modules" window. The list's entries are of brown-red color. (Note: if the list is empty, it doesn't display its title "Excluded Folders" making it impossible to locate.)
> Gotcha - I can see the excluded folders
>> 2. The icon of a folder can be displayed in a bleak orange color; selecting such a folder causes the "Excluded" toggle to become pressed. This toggle is the rightmost toggle from the "Mark as:" label on the "Project Structure / Project Settings / Modules" window.
> Yup - this is what I normally use to exclude folders "on the fly".
>> 3. It seems that a folder can be both "Excluded" (2) and absent in "Excluded Folders" (1). For example, this is the case for the `build/macosx-x86_64-server-release` folder. If you delete the corresponding entry from "Excluded Folders" (1), that folder will stay "Excluded" (2). I believe this is because that folder is specified in the "Project compiler output" field on the "Project Structure / Project Settings / Project" window and, thus, is excluded implicitly.
> Here my head starts spinning - different exclusion mechanisms, partially overlapping?
This is my impression too. Here's my speculation: there seems to be implicit and explicit exclusion. While "explicit exclusion" implies "implicit exclusion", "implicit exclusion" does not imply "explicit exclusion". Unfortunately, reading this article didn't clarify the exclusion mechanism for me: https://www.jetbrains.com/help/idea/indexing.html
>> If we assume that being "Excluded" (2) implies that a folder is not indexed, then we could piggyback on (3) and simply delete the corresponding entry from "Excluded Folders" (1). I do that by pressing a cross-shaped, gray "Include" button on the corresponding entry and then press the "Apply" button on the window. That causes IDE to familiarize itself with the contents of `build/macosx-x86_64-server-release/support/gensrc/java.base`: symbols in editor are no longer of red color with a "Cannot resolve symbol ... " tooltip.
>> I'm not sure how this tweak affects indexing though.
> I tried doing just that, but opening e.g. ByteBuffer with CTRL+N just doesn't work. But... you are right in that there's an hidden dependencies between the "Project Output" path and this quirky behavior. If I set "Project Output" to some other folder (e.g. somewhere other than "build") then indexing starts to work as it should... maybe a simple fix can be developed for this...
Interesting; I have a few questions on that.
1. What version of IntelliJ IDEA did you try that in?
2. Did you build the project before executing `sh ./bin/idea.sh <...> java.base <...>`?
3. Could you see the "build/<...>/support/gensrc/java.base [generated]" entry in the "Source Folders" list above the "Excluded Folders" list?
4. Did you allow the IDE to complete the incremental indexing after pressing "Apply"?
More information about the ide-support-dev