Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 266831 - [navigation] Open Implementation hyperlink should not show up for non-overridable methods
Summary: [navigation] Open Implementation hyperlink should not show up for non-overrid...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Raksha Vasisht CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-03 06:03 EST by Markus Keller CLA
Modified: 2009-03-06 07:02 EST (History)
1 user (show)

See Also:


Attachments
Patch with the fix. (2.39 KB, patch)
2009-03-05 08:53 EST, Raksha Vasisht CLA
markus.kell.r: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2009-03-03 06:03:24 EST
N20090302-2000

The Open Implementation hyperlink should not show up for methods that cannot be overridden, i.e.
- static methods
- final methods
- constructors
Comment 1 Raksha Vasisht CLA 2009-03-05 08:53:56 EST
Created attachment 127650 [details]
Patch with the fix.
Comment 2 Markus Keller CLA 2009-03-06 07:01:57 EST
Released modified patch:
- moved the cast to IMethod to where the type check is
- a method in a static class *can* be overridden, e.g.:

public class Try {
	public static class A {
		public void method() {}
	}
	
	public static class B extends A {
		public void method() {}
	}
	
	public static void main(String[] args) {
		new A().method();
	}
}