Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for code select of anonymous inner class type name #653

Closed
eric-milles opened this issue Jul 27, 2018 · 3 comments
Closed

Add support for code select of anonymous inner class type name #653

eric-milles opened this issue Jul 27, 2018 · 3 comments
Assignees
Milestone

Comments

@eric-milles
Copy link
Member

eric-milles commented Jul 27, 2018

Consider the following

def runner = new java.lang.Runnable() {
  void run() {
  }
}

Code select (Ctrl+click or F2 or F3) or hover on package "java", package "lang" and type "Runnable" should be supported. Also, type may be partially-qualified (like "Map.Entry") or unqualified.

@eric-milles
Copy link
Member Author

org.codehaus.groovy.eclipse.codebrowsing.requestor.CodeSelectRequestor.getRequestedElement() is returning null for InnerClassNode "Script$1".

@eric-milles eric-milles self-assigned this Jul 27, 2018
@eric-milles
Copy link
Member Author

type.getUnresolvedSuperClass() is returning Object, not Runnable in:

    public void visitConstructorCallExpression(ConstructorCallExpression node) {
        boolean shouldContinue = handleSimpleExpression(node);
        if (shouldContinue) {
            ClassNode type = node.getType();
            visitClassReference(node.isUsingAnonymousInnerClass() ? type.getUnresolvedSuperClass() : type);

@eric-milles
Copy link
Member Author

Runnable is an interface, not a superclass.

@eric-milles eric-milles changed the title Add support for code select of fully-qualified anonymous inner class type name Add support for code select of anonymous inner class type name Jul 27, 2018
@eric-milles eric-milles added this to the v3.0.0 milestone Jul 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant