Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326506 - Hyperlinking to other resources fails with ImportURIScopingFragment
Summary: Hyperlinking to other resources fails with ImportURIScopingFragment
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: M5   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 05:55 EDT by Michael Zeising CLA
Modified: 2017-09-19 17:46 EDT (History)
2 users (show)

See Also:
sebastian.zarnekow: indigo+


Attachments
Xtext projects mydsl and mydsl.ui (1.29 MB, application/zip)
2010-09-30 04:00 EDT, Michael Zeising CLA
no flags Details
DSL file A: this is referenced by B (75 bytes, text/plain)
2010-09-30 04:07 EDT, Michael Zeising CLA
no flags Details
DSL file B: this references a name in file A (104 bytes, text/plain)
2010-09-30 04:08 EDT, Michael Zeising CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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