Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Green2013-12-05 12:45:43 -0500
committerDavid Green2013-12-05 12:46:13 -0500
commit31124d522308ed538b9ec79ea7cfdad5f8c83699 (patch)
tree7ab06d93144225906bcee4ac3c50e439b364a62a /org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data
parent5cdfcd364c152ce5f8fc823bf70be96a51586002 (diff)
downloadorg.eclipse.mylyn.tasks-31124d522308ed538b9ec79ea7cfdad5f8c83699.tar.gz
org.eclipse.mylyn.tasks-31124d522308ed538b9ec79ea7cfdad5f8c83699.tar.xz
org.eclipse.mylyn.tasks-31124d522308ed538b9ec79ea7cfdad5f8c83699.zip
423351: DefaultTaskSchema should provide a kind for DESCRIPTION
Change-Id: Iff79470691caaec50e56f29f10e4d954115b9516 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=423351
Diffstat (limited to 'org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskSchema.java11
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/DefaultTaskSchema.java3
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java7
3 files changed, 19 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskSchema.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskSchema.java
index 4bb6cb167..dc8a9df9b 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskSchema.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/AbstractTaskSchema.java
@@ -125,6 +125,8 @@ public abstract class AbstractTaskSchema {
return TaskAttribute.KIND_PEOPLE;
} else if (flags.contains(Flag.OPERATION)) {
return TaskAttribute.KIND_OPERATION;
+ } else if (flags.contains(Flag.DESCRIPTION)) {
+ return TaskAttribute.KIND_DESCRIPTION;
}
return null;
}
@@ -193,7 +195,14 @@ public abstract class AbstractTaskSchema {
}
public enum Flag {
- ATTRIBUTE, OPERATION, PEOPLE, READ_ONLY
+ ATTRIBUTE, OPERATION, PEOPLE, READ_ONLY,
+ /**
+ * A flag used to indicate that the field is related to a description.
+ *
+ * @since 3.11
+ * @see TaskAttribute#KIND_DESCRIPTION
+ */
+ DESCRIPTION
};
protected class FieldFactory {
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/DefaultTaskSchema.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/DefaultTaskSchema.java
index c66f0bd1e..0aeb330fc 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/DefaultTaskSchema.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/DefaultTaskSchema.java
@@ -110,7 +110,8 @@ public final class DefaultTaskSchema extends AbstractTaskSchema {
Messages.DefaultTaskSchema_Modified_Label, TaskAttribute.TYPE_DATE, "modification_date", Flag.READ_ONLY); //$NON-NLS-1$
public final Field DESCRIPTION = createField(TaskAttribute.DESCRIPTION,
- Messages.DefaultTaskSchema_Description_Label, TaskAttribute.TYPE_LONG_RICH_TEXT, "description"); //$NON-NLS-1$
+ Messages.DefaultTaskSchema_Description_Label, TaskAttribute.TYPE_LONG_RICH_TEXT,
+ "description", Flag.DESCRIPTION); //$NON-NLS-1$
public final Field KEYWORDS = createField(TaskAttribute.KEYWORDS, Messages.DefaultTaskSchema_Keywords_Label,
TaskAttribute.TYPE_MULTI_SELECT, "keywords", Flag.ATTRIBUTE); //$NON-NLS-1$
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java
index 0016eb5e5..12f96bbc6 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java
@@ -109,6 +109,13 @@ public final class TaskAttribute {
public static final String KIND_OPERATION = "task.common.kind.operation"; //$NON-NLS-1$
+ /**
+ * A {@link TaskAttributeMetaData#getKind() kind} used to indicate that the field is related to a description.
+ *
+ * @since 3.11
+ */
+ public static final String KIND_DESCRIPTION = "task.common.kind.description"; //$NON-NLS-1$
+
public static final String KIND_PEOPLE = "task.common.kind.people"; //$NON-NLS-1$
//public static final String META_SHOW_IN_ATTRIBUTES_SECTION = "task.meta.showInTaskEditorAttributesSection";

Back to the top