Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2014-03-28 11:14:49 -0400
committerVincent Lorenzo2014-03-28 11:14:49 -0400
commit2524134c6db616a699f392d919e286d8fe25b762 (patch)
treea16f6108b0fb2ee0f81725c88e27df5120cc8319
parentbcfcf7f7ffd902bea598a0d666a18078b4b8dd54 (diff)
downloadorg.eclipse.papyrus-2524134c6db616a699f392d919e286d8fe25b762.tar.gz
org.eclipse.papyrus-2524134c6db616a699f392d919e286d8fe25b762.tar.xz
org.eclipse.papyrus-2524134c6db616a699f392d919e286d8fe25b762.zip
431503: [Table 2] The Property view of the table generate an exception Widget Is Disposed when we try to add Post Action...
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java
index b0694e00bb4..4b23273caa4 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java
@@ -412,13 +412,10 @@ public class MultipleValueEditor extends AbstractListEditor implements Selection
@Override
public void run() {
Object newElement = referenceFactory.createObject(MultipleValueEditor.this, context);
- if(newElement == null) {
- // Cancel the operation
- throw new OperationCanceledException();
+ if(newElement != null) {
+ modelProperty.add(newElement);
+ commit();
}
-
- modelProperty.add(newElement);
- commit();
}
}, NLS.bind(Messages.MultipleValueEditor_addOperation, labelText));
}
@@ -469,7 +466,9 @@ public class MultipleValueEditor extends AbstractListEditor implements Selection
@Override
protected void commit() {
super.commit();
- treeViewer.refresh();
+ if(!isDisposed()){
+ treeViewer.refresh();
+ }
}
/**
@@ -601,7 +600,9 @@ public class MultipleValueEditor extends AbstractListEditor implements Selection
* @param event
*/
public void handleChange(ChangeEvent event) {
- treeViewer.refresh();
+ if(!isDisposed()) {
+ treeViewer.refresh();
+ }
}
@Override

Back to the top