Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2018-02-26 11:57:47 -0500
committerJuergen Haug2018-02-26 11:57:47 -0500
commitc4a40482c2ad9c9ab0b6839fc1f77b119edc785a (patch)
tree6b4f1d1ecf3fea4cbfa1b6562c674ce53afb3d45
parent0eab615f09299ebfa0db87f91194c636a806b2c8 (diff)
downloadorg.eclipse.etrice-c4a40482c2ad9c9ab0b6839fc1f77b119edc785a.tar.gz
org.eclipse.etrice-c4a40482c2ad9c9ab0b6839fc1f77b119edc785a.tar.xz
org.eclipse.etrice-c4a40482c2ad9c9ab0b6839fc1f77b119edc785a.zip
Bug 531689 - improved performance in dialog text fields
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior.fsm/src/org/eclipse/etrice/ui/behavior/fsm/editor/DiagnosingModelObserver.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/org.eclipse.etrice.ui.behavior.fsm/src/org/eclipse/etrice/ui/behavior/fsm/editor/DiagnosingModelObserver.java b/plugins/org.eclipse.etrice.ui.behavior.fsm/src/org/eclipse/etrice/ui/behavior/fsm/editor/DiagnosingModelObserver.java
index ba29924be..8a7eea9a3 100644
--- a/plugins/org.eclipse.etrice.ui.behavior.fsm/src/org/eclipse/etrice/ui/behavior/fsm/editor/DiagnosingModelObserver.java
+++ b/plugins/org.eclipse.etrice.ui.behavior.fsm/src/org/eclipse/etrice/ui/behavior/fsm/editor/DiagnosingModelObserver.java
@@ -23,6 +23,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.Diagnostician;
import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.etrice.core.fsm.fSM.DetailCode;
import org.eclipse.etrice.core.fsm.fSM.StateGraph;
import org.eclipse.etrice.core.fsm.fSM.Trigger;
import org.eclipse.xtext.validation.FeatureBasedDiagnostic;
@@ -116,10 +117,13 @@ public class DiagnosingModelObserver extends EContentAdapter {
super.notifyChanged(notification);
// Re-Validate on each notification except Adapter Removal.
- // This prevents the editor to hang on dispose (since all adapters are
- // then removed).
+ // This prevents the editor to hang on dispose (since all adapters are then removed).
if (notification.getEventType() < Notification.REMOVING_ADAPTER) {
- updateElementDiagnosticMap();
+ if(!(notification.getNewValue() instanceof EObject) || notification.getNewValue() instanceof DetailCode) {
+ // Bug 531689: skip validation when user is typing in DetailCode or text field to prevent delay
+ } else {
+ updateElementDiagnosticMap();
+ }
}
}

Back to the top