Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2011-05-15 12:08:46 +0000
committerspingel2011-05-15 12:08:46 +0000
commitf431995476b7fdfa11a229c8a1711a4c0dbf3260 (patch)
tree1307379798a037098ce17bc6e4eb92eb811ee400 /org.eclipse.mylyn.tasks.ui
parentce29bafd6f70146f1ae6eb973ebc277481ef8227 (diff)
downloadorg.eclipse.mylyn.tasks-f431995476b7fdfa11a229c8a1711a4c0dbf3260.tar.gz
org.eclipse.mylyn.tasks-f431995476b7fdfa11a229c8a1711a4c0dbf3260.tar.xz
org.eclipse.mylyn.tasks-f431995476b7fdfa11a229c8a1711a4c0dbf3260.zip
RESOLVED - bug 343005: [api] framework should provide facility to update attribute editors when the TaskDataModel changes
https://bugs.eclipse.org/bugs/show_bug.cgi?id=343005
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java
index 4c7ccac3c..25f2ca313 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractAttributeEditor.java
@@ -63,7 +63,7 @@ public abstract class AbstractAttributeEditor {
private final TaskDataModelListener modelListener = new TaskDataModelListener() {
@Override
public void attributeChanged(TaskDataModelEvent event) {
- if (shouldAutoRefresh() && getTaskAttribute().equals(event.getTaskAttribute())) {
+ if (!ignoreAttributeChanged && shouldAutoRefresh() && getTaskAttribute().equals(event.getTaskAttribute())) {
try {
refresh();
} catch (UnsupportedOperationException e) {
@@ -78,6 +78,8 @@ public abstract class AbstractAttributeEditor {
}
};
+ private boolean ignoreAttributeChanged;
+
/**
* @since 3.0
*/
@@ -96,7 +98,12 @@ public abstract class AbstractAttributeEditor {
* @since 3.0
*/
protected void attributeChanged() {
- getModel().attributeChanged(getTaskAttribute());
+ try {
+ ignoreAttributeChanged = true;
+ getModel().attributeChanged(getTaskAttribute());
+ } finally {
+ ignoreAttributeChanged = false;
+ }
}
/**

Back to the top