Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337597 - URL hyperlinking interferes with cross-reference hyperlinking
Summary: URL hyperlinking interferes with cross-reference hyperlinking
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext Backlog (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Linux
: P5 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-18 13:10 EST by Matt Hillsdon CLA
Modified: 2012-11-20 13:20 EST (History)
1 user (show)

See Also:


Attachments
Holding down Ctrl over "size" on line 4 (54.39 KB, image/png)
2011-02-18 13:10 EST, Matt Hillsdon CLA
no flags Details

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