Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 150467 Details for
Bug 288464
[navigation] Open Implementation hyperlink does not show multiple implementations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch
patch1_288464.txt (text/plain), 2.85 KB, created by
Raksha Vasisht
on 2009-10-25 14:41:02 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Raksha Vasisht
Created:
2009-10-25 14:41:02 EDT
Size:
2.85 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/javaeditor/JavaElementImplementationHyperlink.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaElementImplementationHyperlink.java,v >retrieving revision 1.9 >diff -u -r1.9 JavaElementImplementationHyperlink.java >--- ui/org/eclipse/jdt/internal/ui/javaeditor/JavaElementImplementationHyperlink.java 5 Aug 2009 07:19:30 -0000 1.9 >+++ ui/org/eclipse/jdt/internal/ui/javaeditor/JavaElementImplementationHyperlink.java 25 Oct 2009 18:17:21 -0000 >@@ -39,7 +39,9 @@ > import org.eclipse.jdt.core.IJavaElement; > import org.eclipse.jdt.core.IMethod; > import org.eclipse.jdt.core.IType; >+import org.eclipse.jdt.core.ITypeHierarchy; > import org.eclipse.jdt.core.ITypeRoot; >+import org.eclipse.jdt.core.JavaModelException; > import org.eclipse.jdt.core.dom.ASTNode; > import org.eclipse.jdt.core.dom.CompilationUnit; > import org.eclipse.jdt.core.dom.Expression; >@@ -57,6 +59,7 @@ > import org.eclipse.jdt.core.search.SearchRequestor; > > import org.eclipse.jdt.internal.corext.dom.Bindings; >+import org.eclipse.jdt.internal.corext.refactoring.Checks; > import org.eclipse.jdt.internal.corext.util.JdtFlags; > import org.eclipse.jdt.internal.corext.util.Messages; > >@@ -184,8 +187,25 @@ > parentTypeBinding= Bindings.getBindingOfParentType(node); > } > } >- final IType type= parentTypeBinding != null ? (IType) parentTypeBinding.getJavaElement() : null; >- if (type == null) { >+ IType type= parentTypeBinding != null ? (IType)parentTypeBinding.getJavaElement() : null; >+ final IType superInterface; >+ >+ try { >+ ITypeHierarchy superTypeHierarchy= type.newSupertypeHierarchy(null); >+ IType[] rootInterfaces= superTypeHierarchy.getRootInterfaces(); >+ if (rootInterfaces.length > 1) { >+ superInterface= null; >+ } else if (rootInterfaces.length == 1 && Checks.findSimilarMethod((IMethod)javaElement, rootInterfaces[0]) != null) { >+ superInterface= rootInterfaces[0]; >+ } else { >+ superInterface= type; >+ } >+ } catch (JavaModelException e) { >+ JavaPlugin.log(e); >+ return; >+ } >+ >+ if (superInterface == null) { > openQuickHierarchy(editor); > return; > } >@@ -219,7 +239,7 @@ > Assert.isNotNull(pattern); > SearchParticipant[] participants= new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() }; > SearchEngine engine= new SearchEngine(); >- engine.search(pattern, participants, SearchEngine.createHierarchyScope(type), requestor, new SubProgressMonitor(monitor, 100)); >+ engine.search(pattern, participants, SearchEngine.createHierarchyScope(superInterface), requestor, new SubProgressMonitor(monitor, 100)); > > if (monitor.isCanceled()) { > throw new OperationCanceledException();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
daniel_megert
:
review-
Actions:
View
|
Diff
Attachments on
bug 288464
:
149619
|
150467
|
151587
|
152156
|
152163
|
152464
|
152469
|
152565