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

Bug 337597

Summary: URL hyperlinking interferes with cross-reference hyperlinking
Product: [Modeling] TMF Reporter: Matt Hillsdon <mth-eclipse>
Component: Xtext BacklogAssignee: Project Inbox <tmf.xtext-inbox>
Status: NEW --- QA Contact:
Severity: minor    
Priority: P5 CC: clay
Version: 1.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Holding down Ctrl over "size" on line 4 none

Description Matt Hillsdon CLA 2011-02-18 13:10:50 EST
Created attachment 189308 [details]
Holding down Ctrl over "size" on line 4

Given a grammar something like:

Model:
  propertyDefinitions+=PropertyDefinition*
  propertyAccesses+=PropertyAccess*
;

PropertyDefinition:
  "property" name=ID 
;

PropertyAccess:
  object=STRING '.' property=[PropertyDefinition]
;

and a document (line numbers for reference only) of the form

1: property size
2: 
3: "foo".size
4: "http://www.example.org/".size

I can Ctrl-Click easily to navigate to the definition of "size" from the reference on line 3 but the one on line 4 also shows the hyperlink option (so the navigation isn't as simple).

It seems to correctly identify the extent of the hyperlink, so it seems odd that it suggests the link after it has finished.  Screenshot attached.
Comment 1 Michael Clay CLA 2011-02-20 12:51:04 EST
i suggest to flip the IHyperlinkDetector registration order in  XtextSourceViewerConfiguration#getHyperlinkDetectors (in order to avoid duplication of URLHyperlinkDetector)