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

Bug 321550

Summary: [navigation] Open Hyperlink > Open Implementation does not work for external files
Product: [Eclipse Project] JDT Reporter: Deepak Azad <deepakazad>
Component: TextAssignee: Raksha Vasisht <raksha.vasisht>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: daniel_megert
Version: 3.7   
Target Milestone: 3.7 M1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Deepak Azad CLA 2010-08-03 02:00:40 EDT
Build id : I20100802-1800 (same behavior in 3.6)
Open Implementation does nothing on files not on build path

Steps:
- Create a java file with the following snippet on the file system and open it in eclipse

class A {
	void foo() {
		String s="";
		
		System.out.println("");
		System.out.append('a');
		
		s.compareTo("");
		s.equals("");
		s.substring(1).equals("");		
	}
}

- Ctrl+click or use the command on 'println' or 'append' > Select 'Open Implementation' => nothing happens. 'Open Declaration' works correctly.
Comment 1 Dani Megert CLA 2010-08-03 02:20:01 EDT
Same is true for F4 and other commands.
Comment 2 Dani Megert CLA 2010-08-03 02:26:12 EDT
>Same is true for F4 and other commands.
Actually, I was only referring to the disabled action in the menu. If that's the intention then we should also not show the hyperlink in the popup.
Comment 3 Deepak Azad CLA 2010-08-03 02:33:04 EDT
(In reply to comment #2)
> >Same is true for F4 and other commands.
> Actually, I was only referring to the disabled action in the menu. If that's
> the intention then we should also not show the hyperlink in the popup.
For me the action is enabled in the Menu - both on Ubuntu and WinXp
Comment 4 Deepak Azad CLA 2010-08-03 02:45:51 EDT
Of course the initial steps should have been.. (sorry for the confusion)
*Open HyperLink > Open Implementation* does nothing on files not on build path

Steps:
- Create a java file with the following snippet on the file system and open it
in eclipse

class A {
    void foo() {
        String s="";

        System.out.println("");
        System.out.append('a');

        s.compareTo("");
        s.equals("");
        s.substring(1).equals("");        
    }
}

- Ctrl+click or use the *Open Hyperlink* command on 'println' or 'append' > Select 'Open Implementation' => nothing happens. 'Open Declaration' works correctly.

And of course when I said the action is enabled in menu, I meant the 'Open Hyperlink' action
Comment 5 Dani Megert CLA 2010-08-03 02:47:53 EDT
>And of course when I said the action is enabled in menu, I meant the 'Open
>Hyperlink' action
And of course 'Open Implementation' is disabled as I said ;-)
Comment 6 Raksha Vasisht CLA 2010-08-04 07:45:07 EDT
Created attachment 175828 [details]
Patch

Patch committed to HEAD. Also fixes the Open Implementation in the pop up for external files.
Comment 7 Raksha Vasisht CLA 2010-08-04 07:48:20 EDT
.
Comment 8 Dani Megert CLA 2010-08-04 08:47:06 EDT
Looks good.

I made a small change in JavaElementImplementationHyperlink (exactly the opposite direction).
Comment 9 Dani Megert CLA 2010-08-05 02:50:36 EDT
Verified in I20100804-1800.