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

Bug 326506

Summary: Hyperlinking to other resources fails with ImportURIScopingFragment
Product: [Modeling] TMF Reporter: Michael Zeising <michael>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: clay, sebastian.zarnekow
Version: unspecifiedFlags: sebastian.zarnekow: indigo+
Target Milestone: M5   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Xtext projects mydsl and mydsl.ui
none
DSL file A: this is referenced by B
none
DSL file B: this references a name in file A none

Description Michael Zeising CLA 2010-09-29 05:55:38 EDT
Build Identifier: I20100608-0911

The hyperlinking feature works only in the same resource and fails to open a referenced resource when using the ImportURIScopingFragment. I'm using Xtext 1.0.0 with the following grammar:

grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals

generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"

Model:
	(imports += Import)*
	concepts += Concept*;

Import : 
	'import' importURI = STRING;
	
Concept:
	'concept' name=ID '{' ( references += Reference )* '}';
	
Reference:
	'reference' concept = [Concept|FQN];
	
FQN:
	ID ('.' ID)*;


My MWE file contains the following lines:

fragment = scoping.ImportURIScopingFragment {}
fragment = exporting.QualifiedNamesFragment {}


It works fine with local references (the same resource) and it's not a problem with linking because the name is resolved correctly.

Thanks in advance!

Reproducible: Always

Steps to Reproduce:
1. Choose the scoping.ImportURIScopingFragment
2. Reference a name within another resource
3. Use the hyperlinking feature with Ctrl + Click
Comment 1 Sebastian Zarnekow CLA 2010-09-29 16:56:26 EDT
Could you please attach a reproducable example?
Comment 2 Michael Zeising CLA 2010-09-30 04:00:39 EDT
Created attachment 179929 [details]
Xtext projects mydsl and mydsl.ui
Comment 3 Michael Zeising CLA 2010-09-30 04:07:14 EDT
Created attachment 179931 [details]
DSL file A: this is referenced by B
Comment 4 Michael Zeising CLA 2010-09-30 04:08:34 EDT
Created attachment 179932 [details]
DSL file B: this references a name in file A

Hyperlinking does not work when Ctrl-clicking on the referenced name "A"
Comment 5 Sebastian Zarnekow CLA 2011-01-10 10:34:39 EST
This one could be related to normalized / URIs which cannot be found in the IStorage2URIMapping - but that's only a shot in the dark.
Comment 6 Sebastian Zarnekow CLA 2011-01-10 10:53:23 EST
See also bug 328016
Comment 7 Michael Clay CLA 2011-01-10 15:42:37 EST
seems to be resolved with the extended EcoreUtil2.isValid URI check introduced with bug 326760
Comment 8 Sebastian Zarnekow CLA 2011-01-15 15:18:40 EST
Alread fixed in HEAD. See comment #7
Comment 9 Karsten Thoms CLA 2017-09-19 17:35:04 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 10 Karsten Thoms CLA 2017-09-19 17:46:08 EDT
Closing all bugs that were set to RESOLVED before Neon.0