summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThibault Le Ouay2014-05-14 04:59:44 (EDT)
committerThibault Le Ouay2014-05-14 06:57:34 (EDT)
commit2d0cd275f4b682cd40b849d6e0ff3173dc3e152b (patch)
tree9289174916c14db760c2a890e763d4048ba1aea5
parent79c20cacb4025d3f4e56cb38a81ed02f1824cd51 (diff)
downloadorg.eclipse.papyrus-2d0cd275f4b682cd40b849d6e0ff3173dc3e152b.zip
org.eclipse.papyrus-2d0cd275f4b682cd40b849d6e0ff3173dc3e152b.tar.gz
org.eclipse.papyrus-2d0cd275f4b682cd40b849d6e0ff3173dc3e152b.tar.bz2
434787: [OCL for Papyrus] org.eclipse.swt.SWTException: Widget isrefs/changes/09/26509/2
disposed when connecting constraint to Stereotype https://bugs.eclipse.org/bugs/show_bug.cgi?id=434787 Change-Id: I23a8876c677065f34f6ad5d479cf829c3a955346 Signed-off-by: Thibault Le Ouay <t.leouay@sherpa-eng.com>
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractValueEditor.java2
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java4
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractValueEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractValueEditor.java
index 55d8fe3..6e82e25 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractValueEditor.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractValueEditor.java
@@ -228,7 +228,7 @@ public abstract class AbstractValueEditor extends AbstractEditor {
IStatus status = (IStatus)binding.getValidationStatus().getValue();
updateStatus(status);
- if(!isReadOnly()) {
+ if(!isReadOnly() && !AbstractValueEditor.this.isDisposed()) { //Bug 434787 : Shouldn't not execute the timer thread if the widget is disposed
changeColorField();
}
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java
index 528a63d..7f30e06 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java
@@ -562,7 +562,9 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
@Override
public void run() {
-
+ if(ReferenceDialog.this.isDisposed()) {//Bug 434787 : Shouldn't not execute the timer thread if the widget is disposed
+ return;
+ }
currentValueLabel.setBackground(DEFAULT);
currentValueLabel.update();
}