Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 344707

Summary: [xbase] sometimes the scope doesn't return an IEObjectDescription for a EObject
Product: [Modeling] TMF Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: unspecifiedFlags: moritz.eysholdt: indigo+
Target Milestone: RC1   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Moritz Eysholdt CLA 2011-05-04 10:00:00 EDT
Affected tests:

org.eclipse.xtext.xbase.tests.serializer.XbaseSerializerWithNodeModelTest.testForLoop_04()
org.eclipse.xtext.xbase.tests.serializer.XbaseSerializerWithNodeModelTest.testSubtractionOnIntegers()
and
-----
if (e.getMessage().contains("No EObjectDescription could be found"))
  return;
-----
in org.eclipse.xtext.xbase.tests.serializer.XbaseSerializerWithoutNodeModelTest
Comment 1 Sebastian Zarnekow CLA 2011-05-04 12:34:58 EDT
This is a nice one:

It turned out that AbstractScope#getElements filters the parent's elements twice. First it uses the shadowing key and afterwards the plain qualified name is used - which is wrong for feature scopes. The xtext tests seem to be green after I've applied the fix and the serializer tests for xbase are a lot greener, too. That is, only the right recursion issues remain in the Xbase-serialization test suite.
Comment 2 Sebastian Zarnekow CLA 2011-05-04 12:35:29 EDT
Pushed to master.
Comment 3 Moritz Eysholdt CLA 2011-05-04 13:08:47 EDT
awesome, thx!
Comment 4 Sebastian Zarnekow CLA 2011-05-04 14:29:49 EDT
I have to provide some tests to make sure that the change did not introduce a regression bug for a scenario with local aliased elements that introduce duplicate names.
Comment 5 Sebastian Zarnekow CLA 2011-05-05 11:31:00 EDT
Added some tests and fixed the expected regression.
Comment 6 Karsten Thoms CLA 2017-09-19 17:10:44 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 7 Karsten Thoms CLA 2017-09-19 17:22:22 EDT
Closing all bugs that were set to RESOLVED before Neon.0