Error method or field is undefined for the type xxx [message #1219629] |
Wed, 04 December 2013 23:38  |
Eclipse User |
|
|
|
This is probably more of an Eclipse IDE problem. I have only used eclipse with xtext so I'm posting this here.
I am getting an error "method or field is undefined for the type xxx". Even though, it is defined.
The Outline view only shows half the contents of the file, and does not show some of the methods. I also cannot do "Open Declaration" for the referenced methods.
This has happened before but if I add some minor changes and save the file, it goes away. Or if I do a clean rebuild of the project.
But, today, it does not seem to go away. Half of the methods in this file is not being detected by eclipse. Is there a way to fix this?
I have tried restarting eclipse, clean then rebuild, but still the problem persists.
[Updated on: Wed, 04 December 2013 23:49] by Moderator
|
|
|
|
Re: Error method or field is undefined for the type xxx [message #1219637 is a reply to message #1219629] |
Thu, 05 December 2013 01:21  |
Eclipse User |
|
|
|
Okay. I have fixed my own problem, and found the root cause.
I have these conditional statements
if (x > 1)
setPrivate(true);
else
setPrivate(false);
The semicolon causes everything to go crazy. Everything after this method is not shown. I'm using XTEND, and this type of code should be allowed, right?
It will work again if I remove the semicolon, and do this:
if (x > 1)
setPrivate(true)
else
setPrivate(false)
[Updated on: Thu, 05 December 2013 01:22] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.05938 seconds