Community
Participate
Working Groups
In the class LogicDiagramEditPart, which extends a class which implements a method defined on an interface which is implemented in the superclass, I am trying to extend that method: public Object getAdapter(Class adapter) { if (adapter == SnapToHelper.class) return new SnapToHelper() { public Point getSnappedDragDelta(Point raw) { return null; } }; return super.getA<<CARET>>; } When content assist is invoked at the caret, "getAdapter(Class)" should be proposed but isn't.
I can not repruduce the problem but i am not sure to have understood your test case. Is it the following test case ? public class LogicDiagramEditPart extends Y { public Object getAdapter(Class adapter){ if (adapter == SnapToHelper.class) return new SnapToHelper() { Point getSnappedDragDelta(Point raw) { return null; } }; return super.getA } } public class Y implements I { public Object getAdapter(Class adapter){return null} } public intertace I { public Object getAdapter(Class adapter); }
There are several superclasses between Y and LogicDiagramEditPart. And of course, lots of more methods and stuff. Our code is available in the same CVS repository as eclipse, but under the "tools" path.
I'm going to try to reproduce this in someone else's workspace. He already has GEF loaded. If it is reproduceable there, could you try checking-out: - org.eclipse.draw2d - org.eclipse.gef - org.eclipse.gef.examples.logic from /home/tools on eclipse.org?
I was able to reproduce it.
Another example of the same problem (although a slightly different case): RulerEditPart (also in GEF) has an anonymous inner class in its getDragTracker () method. Code completion does not work for super.mouseDown() in the mouseDown () method of this anonymous inner class (SimpleDragTracker).
Works in 2.1
I can reproduce it. Thanks for the test case. Simplest test case: public class X extends Y { public void foo(){ super.foo<cursor> } } public abstract class Y extends Z implements I { } public class Z implements I { public void foo(){} } public interface I { public void foo(); }
Fixed and test added (CompletionTests#testCompletionAfterSupercall1)
Verified with build I200312160010