Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2011-02-02 06:48:27 +0000
committerspingel2011-02-02 06:48:27 +0000
commit5fae28c73250e27b93f9a08b813379e7bbd1bc60 (patch)
tree757d9feb4fcabaea67059712b8d8817b4c54911e /org.eclipse.mylyn.tasks.core
parent320824604158fda38435166d428b3337a068926d (diff)
downloadorg.eclipse.mylyn.tasks-5fae28c73250e27b93f9a08b813379e7bbd1bc60.tar.gz
org.eclipse.mylyn.tasks-5fae28c73250e27b93f9a08b813379e7bbd1bc60.tar.xz
org.eclipse.mylyn.tasks-5fae28c73250e27b93f9a08b813379e7bbd1bc60.zip
ASSIGNED - bug 331626: [api] attribute editors should have a tooltip
https://bugs.eclipse.org/bugs/show_bug.cgi?id=331626
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java14
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttributeMetaData.java18
2 files changed, 31 insertions, 1 deletions
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 f5b92de27..cbe2af131 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
@@ -126,9 +126,21 @@ public final class TaskAttribute {
public static final String META_READ_ONLY = "task.meta.readOnly"; //$NON-NLS-1$
/**
+ * Key for the meta datum that determines if an attribute is disabled. This is used to indicate that an attribute
+ * should not be modified, e.g. due to work-flow state but it may still be generally writeable.
+ *
+ * @since 3.5
+ * @see TaskAttributeMetaData#isDisabled()
+ */
+ public static final String META_DISABLED = "task.meta.disabled"; //$NON-NLS-1$
+
+ /**
+ * Key for the meta datum that provides a description of an attribute, e.g. for display in a tooltip.
+ *
* @since 3.5
+ * @see TaskAttributeMetaData
*/
- public static final String META_DESCRIPTION = "task.meta.ToolTip"; //$NON-NLS-1$
+ public static final String META_DESCRIPTION = "task.meta.description"; //$NON-NLS-1$
public static final String NEW_ATTACHMENT = "task.common.new.attachment"; //$NON-NLS-1$
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 b5771b1fa..7518b411b 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
@@ -86,6 +86,14 @@ public class TaskAttributeMetaData {
return taskAttribute.getMetaDataMap();
}
+ /**
+ * @since 3.5
+ * @see TaskAttribute#META_DISABLED
+ */
+ public boolean isDisabled() {
+ return Boolean.parseBoolean(taskAttribute.getMetaDatum(TaskAttribute.META_DISABLED));
+ }
+
public boolean isReadOnly() {
return Boolean.parseBoolean(taskAttribute.getMetaDatum(TaskAttribute.META_READ_ONLY));
}
@@ -155,4 +163,14 @@ public class TaskAttributeMetaData {
return this;
}
+ /**
+ * @since 3.5
+ * @see TaskAttribute#META_DISABLED
+ * @return this
+ */
+ public TaskAttributeMetaData setDisabled(boolean value) {
+ taskAttribute.putMetaDatum(TaskAttribute.META_DISABLED, Boolean.toString(value));
+ return this;
+ }
+
}

Back to the top