Community
Participate
Working Groups
Created attachment 154908 [details] Screenshot showing 4 (four) ways of linking to the same URL. I'm attaching a screen capture of an XML file editing (XML Schema, in fact) situation where I'm Ctrl-hovering over a URI and four different possible hyperlinks are shown: 1. Set As Focus 2. Open 'http://java.sun.com/xml/ns/persistence/orm_1_0.xsd' in a browser 3. Open 'http://java.sun.com/xml/ns/persistence/orm_1_0.xsd' in a browser 4. Open 'http://java.sun.com/xml/ns/persistence/orm_1_0.xsd' The hyperlinks are from the following providers: 1 is supplied by the XSD UI plugin, and will correctly navigate to the ORM Schema (at least it will once bug 271965 is fixed) 2 is supplied by the platform and will open the URL in a browser editor. 3 is supplied by Mylyn and will open the URL in a browser editor. 4 is supplied by WTP as a catalog hyperlink, since the URL matches an entry in the system catalog, supplied by JST, and will open in an XML editor. This is unclear and is addressed in bug 298363. As a user, this is really confusing - and following a link always involves surprises: Why is the link for Mylyn and from the platform identical, and what purpose does it fill - I mean, this is with just the local tasks and Bugzilla installed. My suggestion is to generate fewer hyperlinks if they are identical with the platform's, or at least add some disambiguation to the hyperlink text. I'm opening bugs for the label texts for XSD as well.
FYI: Regarding link 1, I've commented in bug 271968.
The advantage of the Mylyn URL hyperlink detector is that it is capable of opening task hyperlinks in a rich editor rather than the web browser. I can see however that that gets in the way when editors support multiple hyperlinks particularly if they perform identical actions. For now I would suggest to disable the Task URLS detector in the preferences under General > Editors > Text Editors > Hyperlinking. To improve this in a future release I'll investigate if it's possible to only activate the Mylyn hyperlink detector for actual task urls that open in a rich editor and change the hyperlink text accordingly, e.g. "Open task xyz in a Task Editor". If not, we can consider to limit the scope of the task URL hyperlink editor to the Task Editor since the platform's URL hyperlink detector is active by default for text editors.
Created attachment 157424 [details] proposed changes
Created attachment 157425 [details] mylyn/context/zip
Created attachment 157426 [details] screenshot of Java editor
The patch changes the behavior of the Mylyn URL hyperlink detector in the following way: * In text editors it only returns a hyperlink when a detected URL matches a URL of a task present in the task list. The message makes it explicit that the URL will be opened in the task editor (see screenshot). Task URLs that point to tasks not in the task list are ignored and will be handled by the standard platform detector which opens URLs in a browser. * In the task editor the behavior is unchanged. All URLs are handled by Mylyn's URL hyperlink detector and the platform detector is disabled. Mik, are you okay with committing this change?
I tried the patch against your 3.2.2 version and works great!
We discussed this on yesterday's call and will go ahead with the proposed change with a slight modification: In addition to handling all known URLs the hyperlink detector will also handle URLs that are prefixed with a known task repository URL, e.g. https://bugs.eclipse.org/bugs/show_bug.cgi?id=298364 if the user has the Eclipse.org repository configured which has the URL https://bugs.eclipse.org/bugs.
Created attachment 158401 [details] updated patch
Patch committed to head. The change will be in the 3.4.0 weekly builds and the next Helios milestone.
Thanks for fixing this, hereby closing.