Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362185 - [Xtend] Incorrect validation errors
Summary: [Xtend] Incorrect validation errors
Status: CLOSED WORKSFORME
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.1.0   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-27 08:30 EDT by Achim Demelt CLA
Modified: 2017-09-19 17:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Achim Demelt CLA 2011-10-27 08:30:21 EDT
I'm test driving Xtext and Xtend 2.1.0 and so far I'm thrilled about the performance improvements. Kudos to the team. 

I have, however, one regression to report. When I run the workflow to generate my language, two of my Xtend files show validation errors. One is "Couldn't resolve reference to JvmIdentifiableElement 'eContainer'.", the other is "Couldn't resolve reference to JvmIdentifiableElement 'eContents'." The odd thing is that the code is actually correct. I'm using eContainer and eContents in various other places, and I have no validation errors there.

When I clean and rebuild the project (without regenerating the language), the errors go away in the builder (i.e. the problem view is clean). The editors, however, still show error markers.

Only a clean build helps. Changing and thus recompiling the Xtend files with the errors does not work.

No exceptions are logged in the error log.

I'm currently working with a brand new build 2.1.0.v201110270630.
Comment 1 Sebastian Zarnekow CLA 2011-10-27 08:34:07 EDT
It's hard to tell what's going on there without a reproducable example :-/
Comment 2 Sebastian Zarnekow CLA 2011-10-27 08:36:22 EDT
Does it help if you change eContents to eContents() ?
Comment 3 Sebastian Zarnekow CLA 2011-10-27 08:42:58 EDT
Just as a guess:

Did you leave the Xtend editors open when you renerated your language?
Did the error markers go away after a clean build with Xtend editors closes?

In that case, the described behavior may be caused by bug 354910
Comment 4 Achim Demelt CLA 2011-10-27 08:49:24 EDT
(In reply to comment #1)
> It's hard to tell what's going on there without a reproducable example :-/

I know :-( My last sentence was "I can't send you the whole grammar..." but I deleted it...

(In reply to comment #2)
> Does it help if you change eContents to eContents() ?

No, that doesn't change anything.

One more thing I notices: The quickfix popup for the "Couldn't resolve reference" errors shows "Change to eContents". Twice. Applying the quickfix doesn't help, though.
Comment 5 Achim Demelt CLA 2011-10-27 08:50:49 EDT
(In reply to comment #3)
> Just as a guess:
> 
> Did you leave the Xtend editors open when you renerated your language?
> Did the error markers go away after a clean build with Xtend editors closes?
> 
> In that case, the described behavior may be caused by bug 354910

No, all editors are closed when run the workflow.
Comment 6 Sebastian Zarnekow CLA 2011-10-27 08:52:55 EDT
(In reply to comment #5)
> No, all editors are closed when run the workflow.

If you leave them closed, does the error go away after a clean build?
Comment 7 Achim Demelt CLA 2011-10-27 08:58:05 EDT
(In reply to comment #6)
> (In reply to comment #5)
> > No, all editors are closed when run the workflow.
> 
> If you leave them closed, does the error go away after a clean build?

Yes, all errors *in the problem view* go away after a clean build. Error *markers* in already open Xtend editors remain. If no editors were open, then I also have no error markers, of course.

Oh, and another discovery: When everything is clean, I open the Xtend editor (clean, no error markers), I then update the file (just one blank, no actual change in content), and when the builder starts, the error reappears. Both in the problem view and the editor. A rebuild once again fixes the problem view, but  the markers in the still opened editor remain.
Comment 8 Achim Demelt CLA 2011-12-12 07:54:48 EST
This bug no longer occurs in Xtext 2.2.0.
Comment 9 Karsten Thoms CLA 2017-09-19 17:24:17 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 10 Karsten Thoms CLA 2017-09-19 17:35:57 EDT
Closing all bugs that were set to RESOLVED before Neon.0