Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2011-03-03 03:07:50 +0000
committerspingel2011-03-03 03:07:50 +0000
commit7f0b86d3bf0589c39d21413867ef9e067e51ba9f (patch)
treeb0cf784ff37513cd3e05b5c9fa47c1c373ab17f8 /org.eclipse.mylyn.tasks.core
parent609f27b18793d282035c9d1f49372a147e2e992e (diff)
downloadorg.eclipse.mylyn.tasks-7f0b86d3bf0589c39d21413867ef9e067e51ba9f.tar.gz
org.eclipse.mylyn.tasks-7f0b86d3bf0589c39d21413867ef9e067e51ba9f.tar.xz
org.eclipse.mylyn.tasks-7f0b86d3bf0589c39d21413867ef9e067e51ba9f.zip
RESOLVED - bug 338612: [api] Support getting the old value of a task attribute when it has changed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=338612
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java
index 07e78d793..712c44d2c 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskDataModel.java
@@ -95,6 +95,22 @@ public class TaskDataModel {
}
}
+ /**
+ * Returns the instance of <code>taskAttribute</code> that the user last read.
+ *
+ * @param taskAttribute
+ * the attribute
+ * @return the last read state; null, if <code>taskAttribute</code> has never been read
+ * @since 3.5
+ */
+ public TaskAttribute getLastReadAttribute(TaskAttribute taskAttribute) {
+ TaskData lastReadData = workingCopy.getLastReadData();
+ if (lastReadData == null) {
+ return null;
+ }
+ return lastReadData.getRoot().getMappedAttribute(taskAttribute.getPath());
+ }
+
public Set<TaskAttribute> getChangedAttributes() {
Set<TaskAttribute> changedAttributes = new LinkedHashSet<TaskAttribute>();
changedAttributes.addAll(workingCopy.getEditsData().getRoot().getAttributes().values());

Back to the top