Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344586 - Find references gives incorrect results if started in a file that does not contain the declaration
Summary: Find references gives incorrect results if started in a file that does not co...
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: RC1   Edit
Assignee: Jan Koehnlein CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-03 10:34 EDT by Hendrik Eeckhaut CLA
Modified: 2017-09-19 17:47 EDT (History)
3 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hendrik Eeckhaut CLA 2011-05-03 10:34:40 EDT
Build Identifier: M20110210-1200

If you search for references for an object that is declared in another file, the search results only contain (duplicate) references in the current files. If you trigger find references in a file that contains the declaration the search results are correct.

I am using Xtext 2.0 M6

Reproducible: Always

Steps to Reproduce:
1. Start Eclipse with the Domain Model Example 
2. create a file1.dmodel with following content:
     entity Foo1 {}
     entity Foo2 extends Foo1 {}
3. create a file2.dmodel with following content:
     entity Foo3 extends Foo1 {}
4. If you find references in file1.dmodel you get correct search results. But if you search references of Foo1 in file2.dmodel the search results are:
  file2.dmodel
     Foo3 - Entity
     Foo3 - Entity
Comment 1 Jan Koehnlein CLA 2011-05-04 06:16:57 EDT
This has been fixed with one of the recent commits. 

Nevertheless, I had to implement a better startegy for 
  JvmModelReferenceFilter.isInferredJvmElement(URI)
which did not take multiple derived JvmModelElements into account, such that the inferred JvmType of Foo2 also appeared in the search results.
Comment 2 Karsten Thoms CLA 2017-09-19 17:36:43 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:47:39 EDT
Closing all bugs that were set to RESOLVED before Neon.0