Bug 59832 Bindings.findMethodDefininition(binding) finds wrong definition
I20040422 0800 1) Enabled annotation roll-overs 2) Create the following type: package p1; public class A { void doit() { } } 3) Create a subclass in a different package: package p2; import p1.A; public class B extends A { void doit() { // } } I get two roll-overs in the editor next to B.doit: - "The method B.doit() does not override the inherited method from A since it is private to a different package" - "overrides P1.A.doit" These statements contradict eath other.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OverrideIndicatorManager.java
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.IAnnotationModelExtension;
import org.eclipse.ui.PartInitException;
import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
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.JavaModelException;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.ASTVisitor;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.IMethodBinding;
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.MethodDeclaration;
import org.eclipse.jdt.core.dom.SimpleName;
import org.eclipse.jdt.internal.corext.dom.Bindings;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.corext.util.SuperTypeHierarchyCache;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.actions.OpenActionUtil;
import org.eclipse.jdt.internal.ui.text.java.IJavaReconcilingListener;
/**
 * Manages the override and overwrite indicators for
 * the given Java element and annotation model.
 * 
 * @since 3.0
 */
class OverrideIndicatorManager implements IJavaReconcilingListener {