-
Notifications
You must be signed in to change notification settings - Fork 193
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
No map-style constructor code assist with nested class #404
Comments
This should be ready to test with the caveat that the default constructor is missed at the moment. If you add an explicit no-arg constructor, all is well. |
I confirm with this use case works with 3.0.0.xx-201802112140-e47 but only if an explicit no-arg constructor is defined in |
This should be ready for test again soon without the restriction on default constructor. Please see note in #461 regarding difference between Groovy and Java (or binary class files). I was not able to get the constructor proposal for Java binaries due to an indexing difference. This is consistent with the Java editor. |
Hi Eric, |
When I try to complete "new ComEnv" in the Java editor, I do not get a proposal for "CommandEnvironment(String cmdpath,String[] argv)", only for the type "CommandEnvironment - java.rmi.activation.ActivationGroupDesc". The same goes for the Groovy editor. That is, if the indexing supports location of a nested class through the constructor search method, ctors will be proposed. If that constructor is a no-arg or a default ctor can be assumed, then named parameter completions will be offered.
|
I'm still a bit confused. If you have the corresponding import statement ( |
Both Java and Groovy editors should propose type completions for a variable expression with no supporting import. Ex: "ComEnv" proposes "CommandEnvironment - java.rmi.activation.ActivationGroupDesc".
The difference is the Groovy editor has support for finding inner type constructors without a supporting import. But that support has its limits. "new ComEnv" does not propose "CommandEnvironment(String cmdpath,String[] argv)- java.rmi.activation.ActivationGroupDesc" without the supporting import.
|
Ok, I got it. I don't think this is a problem, though. So great work! |
Consider the following:
And:
Invoke code assist at "|": no suggestion is given to invoke a map-style constructor (like
new Nested(foo: 'foo', bar: 5)
). Neither is given if I start to type a property name (likenew Nested(fo|)
).The text was updated successfully, but these errors were encountered: