Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaxsun McCarthy Huggan2015-12-18 19:09:42 +0000
committerGerrit Code Review @ Eclipse.org2016-01-22 19:13:24 +0000
commite5647f87f2d289148a4e5aa13ecb67d8f7546301 (patch)
tree2632c12703f5f8d28ba1d7344049f058b0d6bc34 /org.eclipse.mylyn.tasks.ui
parent85b14d73a4da164a9bd9bf6cf65c692c9d395fe1 (diff)
downloadorg.eclipse.mylyn.tasks-e5647f87f2d289148a4e5aa13ecb67d8f7546301.tar.gz
org.eclipse.mylyn.tasks-e5647f87f2d289148a4e5aa13ecb67d8f7546301.tar.xz
org.eclipse.mylyn.tasks-e5647f87f2d289148a4e5aa13ecb67d8f7546301.zip
486309: allow connectors to specify that their markup language extends a
"base-markup" when determining what rich text editor to show https://bugs.eclipse.org/bugs/show_bug.cgi?id=486309 Change-Id: I39b5a14e034fb8c84143fbe333c6946e1f78544c Signed-off-by: Jaxsun McCarthy Huggan <jaxsun.mccarthy@tasktop.com>
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensions.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensions.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensions.java
index 650730186..93fcd43dc 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensions.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorExtensions.java
@@ -42,6 +42,8 @@ public class TaskEditorExtensions {
private static final String MARKUP_KEY = "markup"; //$NON-NLS-1$
+ private static final String BASE_MARKUP_KEY = "base-markup"; //$NON-NLS-1$
+
private static Map<String, RegisteredTaskEditorExtension> extensionsById = new HashMap<String, RegisteredTaskEditorExtension>();
private static Map<String, String> associationByConnectorKind = new HashMap<String, String>();
@@ -126,9 +128,12 @@ public class TaskEditorExtensions {
if (parameters.containsKey(MARKUP_KEY)) {
Iterator<String> iter = parameters.get(MARKUP_KEY).iterator();
String markup = iter.next();
+ Iterator<String> baseMarkupIterator = parameters.get(BASE_MARKUP_KEY).iterator();
+ String baseMarkup = (baseMarkupIterator.hasNext() ? baseMarkupIterator.next() : ""); //$NON-NLS-1$
+
SortedSet<RegisteredTaskEditorExtension> extensions = getTaskEditorExtensions();
for (RegisteredTaskEditorExtension extension : extensions) {
- if (markup.equals(extension.getName())) {
+ if (markup.equals(extension.getName()) || baseMarkup.equals(extension.getName())) {
return extension.getExtension();
}
}

Back to the top