Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 170679 - [api] improve hyperlink detection api
Summary: [api] improve hyperlink detection api
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Robert Elves CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 176566
  Show dependency tree
 
Reported: 2007-01-16 14:26 EST by Robert Elves CLA
Modified: 2007-03-13 15:14 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Elves CLA 2007-01-16 14:26:33 EST
Merge JIRA connector and existing hyperlink detection capabilities and unify api. See bug#170587 and children.
Suggestions that emerged from discussion:
- Patterns should be per repository .
- Get pattern from connector to detect hyperlinks
Comment 1 Eugene Kuleshov CLA 2007-01-16 14:48:10 EST
Known use cases are:

-- Hyperlink detection in task editors (and potentially in any editors, including Java, xml, html, etc)

-- Open Correspond Task action from Synchronize and History views

Comment 2 Eugene Kuleshov CLA 2007-01-19 18:56:06 EST
It occurs to me that we may need several detector types. Thinks like "bug# 146964 comment#8" unlikely to appear in commit comments.

Also see examples in bug 146964

146964: editor hyperlink parsing problems and suggestions
https://bugs.eclipse.org/bugs/show_bug.cgi?id=146964
Comment 3 Robert Elves CLA 2007-02-15 14:04:20 EST
Update: BugzillaHyperlinkDetector now targets java editor (so bug hyperlinks work in your java source editor). Need to generalize into a 'task' hyperlink detector and generalize to construct 'TaskHyperlinks'.
Comment 4 Robert Elves CLA 2007-02-15 14:40:51 EST
Also need to investigate use of Eugene's ILinkedTaskInfo and factories to clean this up.
Comment 5 Robert Elves CLA 2007-02-27 14:47:12 EST
 (In reply to comment #3)
> Update: BugzillaHyperlinkDetector now targets java editor (so bug hyperlinks
> work in your java source editor). Need to generalize into a 'task' hyperlink
> detector and generalize to construct 'TaskHyperlinks'.
Only want one 'Mylar Tasks' hyperlink contribution so should possibly have a mylar extension point that aggregates connector hyperlink detection.
Comment 6 Steffen Pingel CLA 2007-03-07 00:56:12 EST
For Trac we will need a custom hyperlink detector that can not only detect tasks but also detects links to wiki pages.
Comment 7 Steffen Pingel CLA 2007-03-10 23:18:59 EST
Rob, consider moving TaskHyperlink and WebHyperlink from Trac to the Mylar tasks plug-in. 
Comment 8 Robert Elves CLA 2007-03-12 19:24:50 EDT
 (In reply to comment #7)
> Rob, consider moving TaskHyperlink and WebHyperlink from Trac to the Mylar tasks
> plug-in.
Done.

What remains here? Perhaps we can we take this further and have a single TaskHyperlinkDetector relying on  connector.getTaskIdsFromComment. The only problem would be how to handle WebHyperlinks similarly...
Comment 9 Eugene Kuleshov CLA 2007-03-12 19:33:05 EDT
(In reply to comment #8)
> What remains here? Perhaps we can we take this further and have a single
> TaskHyperlinkDetector relying on  connector.getTaskIdsFromComment. The only
> problem would be how to handle WebHyperlinks similarly...

I'd say that connector.getTaskIdsFromComment() should return collection of *Hyperlinks and not strings. Then we can use it for detecting things like Trac's wiki pages and maybe parent one can also detect urls.
Comment 10 Robert Elves CLA 2007-03-12 19:55:34 EDT
Okay this is what I was thinking so if no one objects I'll continue on this course...
Comment 11 Robert Elves CLA 2007-03-13 15:14:49 EDT
Added AbstractRepositoryConnectoUi.findHyperlinks() which is now used by TaskHyperlinkDetector to detect hyperlinks for all connectors. Removed all connector specific hyperlink detectors and moved connectors specific hyperlink detection code into connectorUi implementation (in case of jira we still call AbstractRepositoryConnector.getTaskIdsFromComment).  We can likely now remove unused mylar editor hyperlink extension point code.