Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilos Kleint2011-01-10 10:43:09 +0000
committerMilos Kleint2011-01-10 10:43:09 +0000
commit82d19507b5e0053dabf79f8f0e6d15191826c96a (patch)
tree677d12a60d82ed76b0156bc54b573a5e55ee0989 /org.eclipse.m2e.editor
parent09a96888a31413986d37048f70bf424f5890696f (diff)
downloadm2e-core-82d19507b5e0053dabf79f8f0e6d15191826c96a.tar.gz
m2e-core-82d19507b5e0053dabf79f8f0e6d15191826c96a.tar.xz
m2e-core-82d19507b5e0053dabf79f8f0e6d15191826c96a.zip
a cheap way of trying to reduce the number of changes propagating through the system.
Diffstat (limited to 'org.eclipse.m2e.editor')
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java
index e10c559e..a192749b 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditorPage.java
@@ -299,7 +299,6 @@ public abstract class MavenPomEditorPage extends FormPage implements Adapter {
case Notification.ADD:
case Notification.MOVE:
case Notification.REMOVE:
- case Notification.SET:
case Notification.UNSET:
case Notification.ADD_MANY: //this is for properties (clear/addAll is used for any properties update)
case Notification.REMOVE_MANY:
@@ -308,7 +307,22 @@ public abstract class MavenPomEditorPage extends FormPage implements Adapter {
updateParentAction();
}
break;
-
+ case Notification.SET: {
+ Object newValue = notification.getNewValue();
+ Object oldValue = notification.getOldValue();
+ if (newValue instanceof String && oldValue instanceof String && newValue.equals(oldValue)) {
+ //the idea here is that triggering a view update for something that didn't change is not useful.
+ //still there are other notifications that are similar (File>Revert or SCM team update seem to trigger
+ // a complete reload of the model, which triggers a cloud of notification events..
+ break;
+ }
+ if (getManagedForm() != null) {
+ updateView(notification);
+ updateParentAction();
+ }
+ break;
+ }
+
default:
break;

Back to the top