Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] Re: Default hyperlink detection fails

Thanks for your replies.
So in other words it is possible to add custom patterns for hyperlinks by implementing AbstractRepositoryConnectorUi.findHyperlinks but they are not displayed as hyperlinks (usually blue color and underlined) until the mouse cursor hovers over them? And to color the custom hyperlinks correctly there needs to be an entry in the RepositoryTextScanner (which is currently not extendible)? May I ask why there is no meaningful default value for the coloring (like the one I mentioned before)?

I see that apart from findHyperlinks the trac connector also implements the org.eclipse.ui.workbench.texteditor.hyperlinkDetectors extension point. The detector will eventually call TracHyperlinkUtil.findTracHyperlinks which also includes the links detected by TracHyperlinkUtil.findTicketHyperlinks.
The later is called by the TracConnectorUi.findHyperlinks.
What I don't understand here is the relation between these two ways of detecting links (connectorUI vs extension point - this does not seem to have anything to do with coloring) - can you give me some more details?

regards,
Dennis

Robert Elves wrote:
Yes, that seems like the most intuitive way to implement this although the platform doesn't appear to encourage this (for performance reasons I imagine). Dennis, and any others interested, please consider voting for the following bug report which we are using to track this issue:

200613: [api] allow connectors to contribute patterns to TaskTextViewerConfiguration
https://bugs.eclipse.org/bugs/show_bug.cgi?id=200613


-Rob

Eugene Kuleshov wrote:
Rob,

Shouldn't we just run the existing hyperlink detectors on the full text and use detected text ranges to highlight the text?

 regards,
 Eugene


Robert Elves wrote:
The RepositoryTextScanner within the RepositoryTextViewerConfiguration class defines the current rule set for coloration of hyperlinks (Eclipse view hyperlink detection and coloring are separate). If using the RepositoryTextViewer, extending the scanner is not straight forward and ideally should be based off of the hyperlink detector extension point so please open a new bug report describing your requirements as the hyperlink api is likely getting an overhaul for Mylyn 3.0.

-Rob

Dennis Rietmann wrote:
update: If I add my own patterns by implementing findHyperlinks they are detected correctly. But they are only recognizable as liks if I hover with the mouse cursor over them (the text gets underlined and becomes colored in blue) - This might be quite irritating for users. Is there a way to fix this and mark them permanently as hyperlinks?

-- Dennis

Dennis Rietmann wrote:
Hello everyone,

According to http://www.ibm.com/developerworks/java/library/j-mylyn1/ it states that:

In general, the same reference that you see in the top left of the task editor can be used to hyperlink the bug. (...) The task <key> syntax is always supported.

Unfortunately this does not work in my connector. On the top left of my tasks "Task 123" is displayed but even "task 123" is not detected as hyperlink in the description of the task. I did not overwrite AbstractRepositoryConnectorUi.findHyperlinks so the default should be used, right? Do you have any idea what went wrong?

Thanks again,
Dennis


_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators




_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators






Back to the top