Error method or field is undefined for the type xxx [message #1219629] |
Thu, 05 December 2013 04:38 |
chris yo Messages: 146 Registered: February 2013 |
Senior Member |
|
|
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: Thu, 05 December 2013 04:49] Report message to a moderator
|
|
|
|
Re: Error method or field is undefined for the type xxx [message #1219637 is a reply to message #1219629] |
Thu, 05 December 2013 06:21 |
chris yo Messages: 146 Registered: February 2013 |
Senior Member |
|
|
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 06:22] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04392 seconds