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

Import declaration not added when requesting a constructor completion for a class in a different package #362

Closed
mauromol opened this issue Nov 2, 2017 · 2 comments

Comments

@mauromol
Copy link

mauromol commented Nov 2, 2017

Consider the Groovy class:

package test4
class MyBean {
   String foo
}

and the following:

package test5
class MyBean {
  int bar
}

(please note: two classes with the same name in different packages)
Then the following:

package test5
class TestCompletion {
	void doSomething() {
		new MyB|
	}
}

(please note: same package as the second MyBean class).
Invoke code assist at "|" and choose test4.MyBean(): the constructor invocation is completed, but no import statement is added, hence the class being constructed is indeed test5.MyBean instead of test4.MyBean.

@eric-milles
Copy link
Member

Can you re-test this?

@mauromol
Copy link
Author

mauromol commented Nov 3, 2017

With 2.9.2.xx-201711022118-e46 this works fine, thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants