Bug 563111 - "Open Implementation" on IProject.getFile() does not find anything
Summary: "Open Implementation" on IProject.getFile() does not find anything
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.16   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-12 16:53 EDT by Andrey Loskutov CLA
Modified: 2024-04-28 05:18 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2020-05-12 16:53:25 EDT
Go to org.eclipse.jdt.internal.core.JavaProject.getSharedProperty(String)

Ctrl + click on "getFile" in this.project.getFile(key);

Say Open Implementation => empty (wrong! Must be Container)

Few lines below, do same on "getLocationURI" in rscFile.getLocationURI();

Say Open Implementation => Resource and something else is shown (OK).

In both cases it takes way too long, UI flickers a lot and CPU is busy for some more seconds as usually.

*All* related sources are of course in same workspace, where I have most of SDK projects opened.

Note: I've used JavaProject just for example, it could be also other source where IProject.getFile() is used.

I would say this is a big regression.
I'm using I20200511-1800, tested with both JDK 1.8.0_181 & 11.0.7
Comment 1 Stephan Herrmann CLA 2020-05-14 18:21:05 EDT
(In reply to Andrey Loskutov from comment #0)
> Go to org.eclipse.jdt.internal.core.JavaProject.getSharedProperty(String)
> 
> Ctrl + click on "getFile" in this.project.getFile(key);
> 
> Say Open Implementation => empty (wrong! Must be Container)

Feels like Ctrl+click just like Ctrl+T only travels up or down the inheritance hierarchy. Indeed the type hierarchy of IProject has no implementation for getFile(). There's only a sub type (Project) which inherits the method from its superclass (Container). IProject and Container are not directly related.

To fix this one would have to walk zig-zag to all subtypes and all their superclasses. As you mention that the operation already takes too long, this sounds like a good recipe to aggravate that.

> I would say this is a big regression.

Did it ever work? I would be surprised.



Ooops: Ctrl+T on Container.getFile() takes *really long*! But if finds the implementation (if you are patient).
Comment 2 Sebastian Zarnekow CLA 2020-05-15 01:49:34 EDT
> Ctrl+T on Container.getFile() takes *really long*

A little out of context, but some types in the Xtext codebase, Ctrl+T (Quick type hiearchy) takes up to 60 seconds with latest Eclipse versions. I've not seen this in older versions.

Stephan, do you remember Ctrl+T on Container.getFile() being slow in older versions of Eclipse?
Comment 3 Stephan Herrmann CLA 2020-05-15 07:06:39 EDT
(In reply to Sebastian Zarnekow from comment #2)
> > Ctrl+T on Container.getFile() takes *really long*
> 
> A little out of context, but some types in the Xtext codebase, Ctrl+T (Quick
> type hiearchy) takes up to 60 seconds with latest Eclipse versions. I've not
> seen this in older versions.
> 
> Stephan, do you remember Ctrl+T on Container.getFile() being slow in older
> versions of Eclipse?

Sorry, I can't remember having ever before invoked Ctrl+T on Container.getFile() :)

Slow type hierarchy has been the topic of some recent bugs, though.
Comment 4 Eclipse Genie CLA 2022-05-08 14:33:49 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Eclipse Genie CLA 2024-04-28 05:18:41 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.