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

Implicit getter and setter accesses not shown in Call Hierarchy #508

Closed
mauromol opened this issue Mar 5, 2018 · 3 comments
Closed

Implicit getter and setter accesses not shown in Call Hierarchy #508

mauromol opened this issue Mar 5, 2018 · 3 comments
Assignees
Milestone

Comments

@mauromol
Copy link

mauromol commented Mar 5, 2018

Something like a follow-up to #489.
Consider the following Java class:

package test22;
public class MyBean {
	private String foo;
	public void setFoo(String foo) {
		this.foo = foo;
	}
	public String getFoo() {
		return foo;
	}
}

And the following Groovy class:

package test22

import groovy.transform.CompileStatic

@CompileStatic
class Test22 {
	public Test22() {
		def b = new MyBean(foo: 'c')
		b.foo = 'foo'
		def c = b.foo
	}
}

Invoke Call Hierarchy on MyBean.setFoo(String): I would expect to see references from def b = new MyBean(foo: 'c') and b.foo = 'foo'. However, I just see the first (thanks to #489), not the second.

Invoke Call Hierarchy on MyBean.getFoo(): I would expect to see references from def c = b.foo, but I don't see it.

@eric-milles eric-milles added this to the v3.1.0 milestone Apr 19, 2018
@eric-milles eric-milles self-assigned this Sep 2, 2018
@eric-milles
Copy link
Member

org.eclipse.jdt.groovy.search.MethodReferenceSearchRequestor.acceptASTNode(ASTNode, TypeLookupResult, IJavaElement) finds the desired reference, but returns it as an "inaccurate" match and so the Call Hierarchy does not show it.

@eric-milles
Copy link
Member

Ready to test

@mauromol
Copy link
Author

mauromol commented Sep 3, 2018

This works well in 3.1.0.xx-201809022023-e47! This is a great improvement, thank you! 👍

@mauromol mauromol closed this as completed Sep 3, 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

2 participants