-
Notifications
You must be signed in to change notification settings - Fork 194
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
Missing code assist proposals to implement missing methods in anonymous inner class #395
Comments
Probably a model thing again. If anonymous inners are represented in the JDT model the same way plain inners are, they should receive the same checks. |
Ready to test |
I probably need to wait more for a new build, because on 3.1.0.xx-201808212342-e47 I still see no improvement here. |
Ok, a new build is available now: 3.1.0.xx-201808220545-e47. package test
class B {
void test() {
I myvar = new I() {
void myMethod(String arg0, int arg1) {};|
}
}
} (cursor at "|") package test
class B {
void test() {
I myvar = new I() {
void myMethod(String a, int b) {
|
}
}
}
} |
|
I've got this working locally. I'm just working out some JDT resolve issues for anonymous inners that use a non-default constructor. |
Ready to test |
The latest build that gets downloaded is 3.1.0.xx-201808242320-e47, and what I see with this is exactly the same behaviour I described in my previous comment. |
Hi Eric, I double checked again and I'm doing exactly this, but it does not work. What could be wrong? I also tried to clean the project and rebuild the Java index, but it does not help. |
I tried unix line endings, tabs, no space between ctor call and block start. All are generating the proper method stub for me. I'm not sure what is different. |
Is the build I'm using the right one? |
Just tried again on Oxygen.3a (Greclipse build 3.1.0.xx-201808271712-e47) on a fresh new workspace, no changes at all to the default Eclipse preferences, created a new Groovy project and copied and pasted the code in my original post, it does not work, I see the exact behaviour described above,
Tried also on Photon (Greclipse build 3.1.0.xx-201808280019-e48) and still no joy, I get the exact same result. |
I was able to produce a test case that shows the problem I'm seeing, see #695. |
This is somewhat the old GRECLIPSE-1426.
Consider the following Java interface:
And the following Groovy class:
Invoke code assist at "|": I would expect to see the following proposal:
myMethod(String a, int b): void - Override method in 'I'
(indeed, it should be "implement missing method", rather than "override", but it's not that important)
However, no proposal at all is shown.
The text was updated successfully, but these errors were encountered: