Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 464645

Summary: Cannot find references in workspace to ILaunchManager.getEnvironment
Product: [Eclipse Project] JDT Reporter: Marc-André Laperle <malaperle>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED DUPLICATE QA Contact: Manoj N Palat <manoj.palat>
Severity: normal    
Priority: P3 CC: alvaro.sanchez-leon, jarthana, manoj.palat, marc.khouzam
Version: 4.5   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Test plugin
none
Workspace none

Description Marc-André Laperle CLA 2015-04-14 16:26:37 EDT
Created attachment 252390 [details]
Test plugin

Using Eclipse 4.5-I20150408-1100.

I have a plugin in my workspace that calls ILaunchManager.getEnvironment. If I use Find references in workspace (Ctrl-shift-G) it does not find the reference in my plugin. I have attached a test plugin to illustrate the problem.

1. Import the test plugini
2. Open Test.java class
3. Click on the getEnvironment call.
4. Right-click, References, Workspace. Or Ctrl-shift-G. The workspace reference is not in the results.

It also doesn't show in the Call hierarchy. Interestingly, if you use the Java search dialog (Ctrl-H) and edit the search string to "ILaunchManager.getEnvironment", it works correctly and the workspace reference is in the results.
Comment 1 Jay Arthanareeswaran CLA 2015-04-15 03:25:12 EDT
I have same build but I can find references.

Manoj, can you give it a try?
Comment 2 Marc-André Laperle CLA 2015-04-15 10:21:54 EDT
(In reply to Jay Arthanareeswaran from comment #1)
> I have same build but I can find references.
> 
> Manoj, can you give it a try?

Can you see the reference that is in the test plugin (main) ?
Comment 3 Manoj N Palat CLA 2015-04-16 23:37:02 EDT
(In reply to Marc-Andre Laperle from comment #2)
> (In reply to Jay Arthanareeswaran from comment #1)
> > I have same build but I can find references.
> > 
> > Manoj, can you give it a try?
> 
> Can you see the reference that is in the test plugin (main) ?

I can see the reference in the test plugin. Can you attach a minimal version of the workspace - this may help reproducing the issue locally.
Comment 4 Marc-André Laperle CLA 2015-04-17 00:50:23 EDT
Created attachment 252476 [details]
Workspace

I *think* you might need to enable the preference in Plug-in Development, "Include all plug-ins from target in Java search". I attached a minimal workspace.
Comment 5 Marc-André Laperle CLA 2015-06-24 18:16:49 EDT
At this point, I'm pretty sure it's the same as bug 469320. If I revert the commit that I found to be the first "bad" one (bug 431357), both issues are fixed.

*** This bug has been marked as a duplicate of bug 469320 ***