Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttribute.java4
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskOperation.java21
2 files changed, 25 insertions, 0 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 262763fc7..1cac00d1f 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
@@ -125,6 +125,10 @@ public final class TaskAttribute {
public static final String META_READ_ONLY = "task.meta.readOnly"; //$NON-NLS-1$
+ public static final String META_UNCONFIRMED_ALLOWED = "task.meta.unconfirmedAllowed"; //$NON-NLS-1$
+
+ public static final String META_TOOL_TIP = "task.meta.toolTip"; //$NON-NLS-1$
+
public static final String NEW_ATTACHMENT = "task.common.new.attachment"; //$NON-NLS-1$
// XXX merge with USER_CC
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskOperation.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskOperation.java
index e44d8262d..961427d55 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskOperation.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskOperation.java
@@ -24,8 +24,18 @@ public class TaskOperation {
* @since 3.0
*/
public static void applyTo(TaskAttribute taskAttribute, String operationId, String label) {
+ applyTo(taskAttribute, operationId, label, null);
+ }
+
+ /**
+ * @since 3.5
+ */
+ public static void applyTo(TaskAttribute taskAttribute, String operationId, String label, String toolTip) {
TaskData taskData = taskAttribute.getTaskData();
taskData.getAttributeMapper().setValue(taskAttribute, operationId);
+ if (toolTip != null) {
+ taskAttribute.getMetaData().defaults().putValue(TaskAttribute.META_TOOL_TIP, toolTip);
+ }
taskAttribute.getMetaData().defaults().setType(TaskAttribute.TYPE_OPERATION).setLabel(label);
}
@@ -39,6 +49,7 @@ public class TaskOperation {
taskData.getTaskId(), taskAttribute.getValue());
operation.setLabel(taskAttribute.getMetaData().getLabel());
operation.setTaskAttribute(taskAttribute);
+ operation.setTooltip(taskAttribute.getMetaData().getValue(TaskAttribute.META_TOOL_TIP));
return operation;
}
@@ -54,6 +65,8 @@ public class TaskOperation {
private final String taskId;
+ private String tooltip;
+
/**
* @since 3.0
*/
@@ -159,4 +172,12 @@ public class TaskOperation {
this.taskAttribute = taskAttribute;
}
+ public String getTooltip() {
+ return tooltip;
+ }
+
+ public void setTooltip(String tooltip) {
+ this.tooltip = tooltip;
+ }
+
}

Back to the top