Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Dos Santos2013-12-16 21:55:32 +0000
committerGerrit Code Review @ Eclipse.org2014-01-21 21:11:33 +0000
commit2ee34447ece6defdc170aea9168145894465dce7 (patch)
treea514aa0b87b1763d6219cb7b734c4631053c4f03 /org.eclipse.mylyn.tasks.core
parentf6291e4a1d8816da3f33e9241294dd0102b74e28 (diff)
downloadorg.eclipse.mylyn.tasks-2ee34447ece6defdc170aea9168145894465dce7.tar.gz
org.eclipse.mylyn.tasks-2ee34447ece6defdc170aea9168145894465dce7.tar.xz
org.eclipse.mylyn.tasks-2ee34447ece6defdc170aea9168145894465dce7.zip
424188: Task attributes that set META_ATTRIBUTE_MEDIA_TYPE should be
displayed with the correct markup viewer when available. Change-Id: Iad8f6f1070d6572702c9e5f71aaebcb8c91e776d Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=424188 Signed-off-by: Leo Dos Santos <leo.dos.santos@tasktop.com>
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMetaData.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMetaData.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMetaData.java
index ee3b0f599..2a5b0cd52 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMetaData.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMetaData.java
@@ -107,6 +107,14 @@ public class TaskAttributeMetaData {
return Boolean.parseBoolean(taskAttribute.getMetaDatum(TaskAttribute.META_REQUIRED));
}
+ /**
+ * @since 3.11
+ * @see TaskAttribute#META_ATTRIBUTE_MEDIA_TYPE
+ */
+ public String getMediaType() {
+ return taskAttribute.getMetaDatum(TaskAttribute.META_ATTRIBUTE_MEDIA_TYPE);
+ }
+
public TaskAttributeMetaData putValue(String key, String value) {
taskAttribute.putMetaDatum(key, value);
return this;
@@ -192,4 +200,18 @@ public class TaskAttributeMetaData {
return this;
}
+ /**
+ * @since 3.11
+ * @see TaskAttribute#META_ATTRIBUTE_MEDIA_TYPE
+ * @return this
+ */
+ public TaskAttributeMetaData setMediaType(String value) {
+ if (value != null) {
+ taskAttribute.putMetaDatum(TaskAttribute.META_ATTRIBUTE_MEDIA_TYPE, value);
+ } else {
+ taskAttribute.removeMetaDatum(TaskAttribute.META_ATTRIBUTE_MEDIA_TYPE);
+ }
+ return this;
+ }
+
}

Back to the top