DESCRIPTION

Support Mylyn links in History View

In the history view commit message viewer, hook in to registered
hyperlink detectors (such as Mylyn task link detector).

Bug: 399398
Change-Id: Ia315def21fb8d66ed124034a2cb5102069eaf17d
Signed-off-by: Madisyn Francis xxx@xxx.xxx


COMMENTS

author: Brenden Conley
date: 2013-06-21 17:38:21.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/4651/ 

-------------------------------------
author: Brenden Conley
date: 2013-06-21 17:54:44.000000000

Patch Set 1: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/4651/ : SUCCESS

-------------------------------------
author: Zara Gill
date: 2013-06-23 00:07:18.000000000

Patch Set 1:

I certify that:

I have authored 100% of the content.

I have the necessary rights to submit this content, including any necessary permissions from my employer.

I am providing this content on the license(s) associated with the Eclipse Foundation project I am contributing to. I understand and agree that Eclipse projects and my contributions are public, and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

-------------------------------------
author: Douglas Trujillo
date: 2013-06-23 18:02:02.000000000

Patch Set 1: I would prefer that you didn't submit this; IP review completed

- observed the following strange behavior with a message containing multiple bug references: in the beginning all were correctly rendered as hyperlinks, after clicking on a link the mylyn bug editor is opened for the bug but the link isn't rendered as a hyperlink anymore, the same happens when clicking around on any text in the commit message
- where is the bugtracker configured ? Can I change the configuration to point to our own internal bug tracker ?
- what if I work on several projects using different bug trackers ?
- we should also render bugs as hyperlinks in commit dialog and staging view as these links are created there and it would be useful if the link could be tested while writing the commit message

-------------------------------------
author: Zara Gill
date: 2013-06-24 14:48:49.000000000

Patch Set 1:

- observed the following strange behavior with a message containing multiple bug references: in the beginning all were correctly rendered as hyperlinks, after clicking on a link the mylyn bug editor is opened for the bug but the link isn't rendered as a hyperlink anymore, the same happens when clicking around on any text in the commit message

I'll investigate this.

- where is the bugtracker configured ? Can I change the configuration to point to our own internal bug tracker ?

The history view commit viewer will now show all links that are detected by contributors to the org.eclipse.ui.workbench.texteditor.hyperlinkDetectors extension point (targetId="org.eclipse.ui.DefaultTextEditor), so this enhancement isn't actually limited to detection of task hyperlinks (for example, URL links will be shown now as well).  Mylyn contributes to this extension point (TaskHyperlinkDetector).  TaskHyperlinkDetector delegates hyperlink detection to the Mylyn connectors that have been contributed using the "org.eclipse.mylyn.tasks.ui.repositories" extension point.  These contributors can provide a class that extends AbstractRepositoryConnectorUi, overriding the findHyperlinks method as necessary for the particular bug tracker.  For example, the Bugzilla connector finds links using a regex such as:

"(?:duplicate of|bug|task)[ \t]*#?[ \t]*(\\d+)"

So, if a Mylyn connector is already available for your internal bug tracker (i.e., Bugzilla, Trac, CollabNet TeamForge, JIRA), then you just need to install that connector.  Otherwise, you would have to provide your own Mylyn connector, which is beyond the scope of this discussion.

- what if I work on several projects using different bug trackers ?

The Mylyn task link detector will cycle through all of the task repositories that you've added.  For each one, it will call findHyperlinks for the connector that the repository is contributed by.  If you have multiple repositories for the same connector (or, in the more unlikely event that multiple connectors detect a link at the same location), then the link will enable hover selection of which URL you want to open.

- we should also render bugs as hyperlinks in commit dialog and staging view as these links are created there and it would be useful if the link could be tested while writing the commit message

Good point.  I'll update the issue to include this in the scope.

-------------------------------------
