find implementing methods

there is
public abstract Shape createTransformedShape(final Shape shape) throws TransformException;

in my class, and I was searching for implementations.
It returned only one result, but there is another,
which inherits the method from java.awt.geom.AffineTransform

-> this should have been found.

There is no "search in libraries" for "find implementing methods".

Comment actions Permalink

even worse, IDEA also refuses to step into
when called from transform.createTransformedShape(area);
and transform is instance of MathTransform2D which
extends AffineTransform.

Even if not stepping into java.* is disabled.

Comment actions Permalink

It's not a question of searching in libraries. IDEA won't find implementing methods unless they are implemented in a class which itself implements or extends the method's containing class. For instance, here's a pattern sometimes used to simulate (single) mixin inheritance in Java

Searching for implementations of will find none. I haven't decided if this is a horrible bug in the "Find Implementations" code, or if it is evidence of a code smell in the above code. The workaround (adding "extends MyInterface" to MyBaseClass), seems to be better code, so I'm not sure it should be classified as a workaround at all. Might be time to figure out an inspection for this case, although I'm not yet sure how valuable it would be.

--Dave Griffith

Comment actions Permalink

whether code smell or not - it would be very useful
(and expected behaviour IMHO) to find the "missing" results.

especially for smelly code you need a refactoring tool ;)


Please sign in to leave a comment.