Usage of Generic editor and org.eclipse.ui.workbench.texteditor.hyperlinkDetectors #2560
-
Is there a way to restrict a hyperlinkDetector (defined for the generic editor) to a certain content type. For example I have:
But unfortunately this will be used for every generic editor (and maybe causing problems for unknown text files handled by the generic editor). Is their a way to restrict a hyperlinkDetector to a content-type? Or how are we supposed to restrict the hyperlink handling? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Looking at |
Beta Was this translation helpful? Give feedback.
Looking at
HyperlinkDetectorRegistry
, there seems to be no way to filter out a particular hyperlinkDetector for a particular editor. There are preferences that can be used to tweak things, but as long as there is no per-editor preference scope, it won't fit the desired grain here.The HyperlinkDetectors are supposed to implement themselves (thanks to
setContext
or just by using the viewer) a strategy to turn no-op when they're irrelevant.I imagine that an
enableWhen
child element on the extension point would be the most helpful approach.