want to try out small idea; where is the implementing class for Stream interface?
Chen Liang
liangchenblue at gmail.com
Sun Jul 21 23:46:28 UTC 2024
Please refer to the "Intellij Idea" section on the ide doc:
https://github.com/openjdk/jdk/blob/master/doc/ide.md#intellij-idea
In short, in `jdk`, you need to run the `bin/idea.sh` with cygwin after
you've done `make images` once. Then the root `jdk` directory will be
recognized by idea as an idea project.
Note that the guide asks to set the SDK to your images/jdk in the project.
Due to problems within Intellij, you should unset the JDK, so the files
won't show up a "package xxx already exists in java.base" error.
You should set the language level to `X-Experimental features` to mute the
warnings about some API usages.
And then, you can navigate JDK code as in any other project, such as
double-shift and search `Stream` to find the `java.util.stream.Stream`
class.
And once you are there, you may encounter the bug I've described, that
actually used methods will appear as "unused": you will have to type
something in one of the method names, like change `filter` to `filter1` so
Intellij idea does a reindex and you can find usages of other
methods/overrides of the interface.
Regards, liach
On Sun, Jul 21, 2024 at 2:23 PM Anil <1dropaflame at gmail.com> wrote:
> Chen,
> Thanks for your reply.
> Yes, I am using IntelliJ Community Edition (on Windows 11, Cygwin64).
> I did not set up the project - I just opened the package in IJ
> C:\Users\Anil\OpenJDK\jdk\src\java.base\share\classes\java\util\stream
> Is there something different I should be doing?
> thanks,
> Anil
>
>
> On Sat, Jul 20, 2024 at 10:39 PM Chen Liang <liangchenblue at gmail.com>
> wrote:
>
>> Hi Anil, are you using intellij and setting up the project with idea.sh?
>> Idea has a bug where its indexing breaks completely; you need to type
>> something in the code, like a typo in method name, to force it to refresh.
>>
>> On Sat, Jul 20, 2024, 9:45 PM Anil <1dropaflame at gmail.com> wrote:
>>
>>> Hi,
>>> I had a small idea on debugging of streams and was trying to implement
>>> it to see if it works.
>>> I am able to build the OpenJDK (on Windows 11, Cygwin64).
>>> However, I am unable to find the implementing class of java.util.Stream.
>>> Can you please help?
>>> thanks,
>>> Anil Philip
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20240721/7d974d53/attachment-0001.htm>
More information about the core-libs-dev
mailing list