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

Bug 354600

Summary: DeltaConverter produces incorrect NameBasedEObjectDescriptions for nested types
Product: [Modeling] TMF Reporter: Vladimir Piskarev <vpiskarov>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 2.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: SR2   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Sample language projects
none
'example' project none

Description Vladimir Piskarev CLA 2011-08-12 06:38:20 EDT
Build Identifier: I20110613-1736

For nested types the DeltaConverter produces NameBasedEObjectDescriptions with incorrect QualifiedNames. 

Namely, for a given nested type its QualifiedName as reported by DeltaConverter will be different from its QualifiedName as seen by scope provider. For example, for nested type 'example.Foo.Bar' the DeltaConverter will report its name as [example][Foo][Bar] while the scope provider treats it as [example][Foo$Bar].

It follows, that the 'importedNames' corresponding to the referred nested types in a resource description will never match the 'exported names' of those same types as reported by DeltaConverter. Therefore, in certain cases the set of resources affected by Java changes may not be computed correctly, which will result in (incremental) build problems being incorrectly reported.

Reproducible: Always

Steps to Reproduce:
1. Import the attached 'org.xtext.example.domainmodel' and ''org.xtext.example.domainmodel.ui' projects into the workspace

2. Run the runtime workbench and import the attached 'example' project into the runtime workspace. Note the build problem "Couldn't resolve reference to JvmType 'example.Foo$Baz'" in Foo.dmodel

3. Open 'Foo.java' and change 'Bar' to 'Baz'. Save the change. Note the build problem still persists.
Comment 1 Vladimir Piskarev CLA 2011-08-12 06:41:32 EDT
Created attachment 201385 [details]
Sample language projects
Comment 2 Sebastian Zarnekow CLA 2011-08-12 06:42:10 EDT
Good catch.
Comment 3 Vladimir Piskarev CLA 2011-08-12 06:44:06 EDT
Created attachment 201386 [details]
'example' project
Comment 4 Sebastian Zarnekow CLA 2011-08-15 16:33:01 EDT
Pushed to master.
Comment 5 Karsten Thoms CLA 2017-09-19 17:15:27 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 6 Karsten Thoms CLA 2017-09-19 17:26:54 EDT
Closing all bugs that were set to RESOLVED before Neon.0