I've got the following Xtext grammar:
Model:
'model' name = ID imports += Import* items += Item* rules += Rule*;
Import:
'import' importURI = STRING;
Rule:
'rule' name = ID '(' items += [Item]* ')';
Item:
'item' name = ID;
When opening the editor, all Item
references in Rule
s are hilighted correctly if they are in the same file, and I can jump to the declaration using F3. However, that doesn't work if I try to import them from other files. For example:
File first.mydsl
model first
import "second.mydsl"
rule myRule (second)
File second.mydsl
model second
item second
Assuming these two files are in the same folder, it still won't find the 'second' reference from the imported file. It also doesn't work if I include the file extension for the imported file, or the full path. How do I get Xtext to recognize the imported file?
(crossposted to http://www.eclipse.org/forums/index.php/m/805182/#msg_805182)