Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 146964 - editor hyperlink parsing problems and suggestions
Summary: editor hyperlink parsing problems and suggestions
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P4 enhancement (vote)
Target Milestone: 3.0   Edit
Assignee: Robert Elves CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 229014
  Show dependency tree
 
Reported: 2006-06-13 22:30 EDT by Mik Kersten CLA
Modified: 2009-08-06 16:53 EDT (History)
4 users (show)

See Also:


Attachments
mylar/context/zip (16.98 KB, application/octet-stream)
2006-07-04 19:30 EDT, Robert Elves CLA
no flags Details
screenshot (3.73 KB, image/png)
2008-01-31 16:43 EST, Shawn Minto CLA
no flags Details
false positive (7.50 KB, image/png)
2009-08-03 04:49 EDT, Tomasz Zarna CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mik Kersten CLA 2006-06-13 22:30:59 EDT
Let's use this report to collect them.  Here is one:
- (https://bugs.eclipse.org/bugs/show_bug.cgi?id=140512):
Comment 1 Mik Kersten CLA 2006-06-20 17:02:29 EDT
- full hyperlinks to bugs should open the corresponding task by checking the URL with the repository connector
- comment#1 style links should be hyperlinked to open up comments
Comment 2 Mik Kersten CLA 2006-06-20 17:04:20 EDT
- URL hyperlinks should open the browser via TaskUiUtil (it will get the location bar and buttons that way).  This will probably require a custom URL detector
Comment 3 Robert Elves CLA 2006-07-04 19:30:04 EDT
Created attachment 45727 [details]
mylar/context/zip

Re comment#2, now opening using TaskUiUtil via custom TaskEditorUrlDetector/TaskEditorUrlHyperlink
Comment 4 Mik Kersten CLA 2006-07-10 16:08:42 EDT
Standard hyperlinks should not break after a dash, e.g. http://foo.bar/foo-bar
Comment 5 Robert Elves CLA 2006-07-10 18:02:49 EDT
Committed fix for:

- (https://bugs.eclipse.org/bugs/show_bug.cgi?id=140512):

http://foo.bar/foo-bar
Comment 6 Mik Kersten CLA 2006-07-11 12:52:32 EDT
Please make task 123 work just like bug 123, including variants (e.g. task#123).
Comment 7 Robert Elves CLA 2006-07-11 16:14:26 EDT
Committed support for task hyperlinks as Mik suggested in comment#6.
Comment 8 Steffen Pingel CLA 2006-07-11 20:42:26 EDT
Links can also point to comments in other reports: bug 150165 comment #1.
Comment 9 Robert Elves CLA 2006-07-28 21:47:39 EDT
Todo: 
- comment hyperlinking within an editor like comment#7
- bug/comment hyperlinking like bug# 146964 comment#8
Comment 11 Robert Elves CLA 2006-09-15 20:14:32 EDT
This is an on-going report that we will use to continue collecting and correcting hyperlink nits.
Comment 12 Robert Elves CLA 2006-09-20 19:44:54 EDT
As per task#154878 comment#6, task hyperlinks should have the task description as a tooltip if in the tasklist.
Comment 13 Mik Kersten CLA 2006-10-13 12:02:17 EDT
Rob: to support JIRA, could you make "issue 123" work in addition to "task 123"?  We might pull this out into an extension point that connectors can specify...
Comment 14 Eugene Kuleshov CLA 2006-10-13 12:08:40 EDT
Mik, with Jira people usually don't use "issue ID", because ID pattern is obvious enough on its own, but you'll need list of projects names/ids for linked Jira server...
Comment 15 Robert Elves CLA 2006-10-13 12:56:34 EDT
Hyperlink detectors are contributed via the org.eclipse.mylar.tasks.ui.editors (hyperlinkDetector) extension point. Perhaps we could add an attributes element similar to the Repository Templates extension point that has text entries which could be used by RepositoryTextScanner for highlighting the hyperlinks rather then them being hard coded.
Comment 16 Eugene Kuleshov CLA 2006-10-13 13:00:12 EDT
(In reply to comment #15)
> Hyperlink detectors are contributed via the org.eclipse.mylar.tasks.ui.editors
> (hyperlinkDetector) extension point. Perhaps we could add an attributes element
> similar to the Repository Templates extension point that has text entries which
> could be used by RepositoryTextScanner for highlighting the hyperlinks rather
> then them being hard coded.

Not sure how it will work, but these entries should be configured per repository. Also note that two Jira servers could use the same project names/ids, but we need to link to the specific one.
Comment 17 Robert Elves CLA 2006-10-13 13:13:47 EDT
I'm not sure I understand the need to be 'per repository'? Are you thinking of the case of hyperlink detection outside the realm of the editor (where specific task/repository is known)?
Comment 18 Eugene Kuleshov CLA 2006-10-13 13:18:01 EDT
(In reply to comment #17)
> I'm not sure I understand the need to be 'per repository'? Are you thinking of
> the case of hyperlink detection outside the realm of the editor (where specific
> task/repository is known)?

I thought it would make sense to reuse these detectors for other Eclipse editors, as well as for Team Sync and History view, e.g. open corresponding report and show hyperlinks in the commit comments. The latter one would require hyperlinking support from platform, byt we should have framework that can handle that. Since projects ready linked to the issue repositories...
Comment 20 Eugene Kuleshov CLA 2006-12-07 13:50:35 EST
The whole following text is hyperlinked. I think it should be only the class:line in the brackets that get the hyperlink.

bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla JiraWebIssueService$2.execute(JiraWebIssueService.java:105):
Comment 21 Robert Elves CLA 2007-01-02 14:23:41 EST
Linking for bug#<num> comment#<num> being addressed by bug#164221
Comment 22 Mik Kersten CLA 2007-01-05 09:03:48 EST
Btw, for me the text in comment#20 is correctly hyperlinked (i.e. "bla bla..." is not hyperlinked).
Comment 23 Eugene Kuleshov CLA 2007-01-05 10:42:09 EST
(In reply to comment #22)
> Btw, for me the text in comment#20 is correctly hyperlinked (i.e. "bla bla..."
> is not hyperlinked).

It is not marked as hyperlinked, but hyperlink is there. You can click on it...

Comment 24 Mik Kersten CLA 2007-01-05 14:45:40 EST
 (In reply to comment #23)
> It is not marked as hyperlinked, but hyperlink is there. You can click on it...

Oops, my mistake, that is the behavior that I am seeing.
Comment 25 Robert Elves CLA 2007-01-16 12:19:57 EST
"seems like you need to handle #XXXX patterns as bug hyperlinks too"
Comment 26 Mik Kersten CLA 2007-04-09 22:04:32 EDT
Rob: consider moving whatever is still open to the UI nits page, since it is hard to track what has and hasn't been implemented via comments.
Comment 27 Robert Elves CLA 2007-04-11 12:20:27 EDT
 (In reply to comment #26)
> Rob: consider moving whatever is still open to the UI nits page, since it is
> hard to track what has and hasn't been implemented via comments.
Done.
Comment 28 Robert Elves CLA 2007-11-21 13:40:32 EST
https://bugs.eclipse.org/bugs/show_bug.cgi?id=166733#c13 should link to comment but currently only opens bug report. 
ref: bug#194474
Comment 29 Shawn Minto CLA 2008-01-31 16:39:11 EST
Hyperlink coloring can be incorrect until the hyperlink is hovered over, at which point, the coloring is removed entirely.

i.e.  (bug #24) for testing :-)
Comment 30 Shawn Minto CLA 2008-01-31 16:43:39 EST
Created attachment 88471 [details]
screenshot

 (In reply to comment #29)
> Hyperlink coloring can be incorrect until the hyperlink is hovered over, at
> which point, the coloring is removed entirely.
> 
> i.e.  (bug #24) for testing :-)
Note that this seems to only happen in the description.
Comment 31 Tomasz Zarna CLA 2009-08-03 04:49:56 EDT
Created attachment 143247 [details]
false positive

A false positive observed on bug 262515, comment 8. A part of the comment is not actually a bug link, but is recognized as one.
Comment 32 Steffen Pingel CLA 2009-08-06 16:53:38 EDT
Thanks Tomasz, I have created  bug 285941 to track the problem. 

I am closing this bug since the implementation has changed significantly in recent releases which addresses the problems listed on this bug. Please file separate reports for any other bugs.