Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/SpellcheckableMessageArea.java')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/SpellcheckableMessageArea.java30
1 files changed, 29 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/SpellcheckableMessageArea.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/SpellcheckableMessageArea.java
index e356fa712b..b6b5a2e552 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/SpellcheckableMessageArea.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/SpellcheckableMessageArea.java
@@ -11,10 +11,13 @@
*******************************************************************************/
package org.eclipse.egit.ui.internal.dialogs;
+import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
+import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.egit.ui.Activator;
import org.eclipse.egit.ui.UIPreferences;
import org.eclipse.egit.ui.UIText;
@@ -160,7 +163,13 @@ public class SpellcheckableMessageArea extends Composite {
Document document = new Document(initialText);
sourceViewer.configure(new TextSourceViewerConfiguration(EditorsUI
- .getPreferenceStore()));
+ .getPreferenceStore()) {
+
+ protected Map getHyperlinkDetectorTargets(ISourceViewer targetViewer) {
+ return getHyperlinkTargets();
+ }
+
+ });
sourceViewer.setDocument(document, annotationModel);
getTextWidget().addDisposeListener(new DisposeListener() {
@@ -440,6 +449,25 @@ public class SpellcheckableMessageArea extends Composite {
}
/**
+ * Get hyperlink targets
+ *
+ * @return map of targets
+ */
+ protected Map<String, IAdaptable> getHyperlinkTargets() {
+ return Collections.singletonMap("org.eclipse.ui.DefaultTextEditor", //$NON-NLS-1$
+ getDefaultTarget());
+ }
+
+ /**
+ * Get default target for hyperlink presenter
+ *
+ * @return target
+ */
+ protected IAdaptable getDefaultTarget() {
+ return null;
+ }
+
+ /**
* @return text
*/
public String getText() {

Back to the top