Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2014-11-14 17:05:36 +0000
committerChristian W. Damus2014-11-14 19:05:46 +0000
commitd0557a86e852fd7ae0d3d428380d2fdf9b3733d5 (patch)
treed4b1fda585dba4e1f64c3b53ce1bb2893901a020 /plugins/infra/core
parent397fd13342b0fa8b2f769cdd441760cad342ada7 (diff)
downloadorg.eclipse.papyrus-d0557a86e852fd7ae0d3d428380d2fdf9b3733d5.tar.gz
org.eclipse.papyrus-d0557a86e852fd7ae0d3d428380d2fdf9b3733d5.tar.xz
org.eclipse.papyrus-d0557a86e852fd7ae0d3d428380d2fdf9b3733d5.zip
451557: Stereotype repair dialog buttons still enabled during long repair operation
https://bugs.eclipse.org/bugs/show_bug.cgi?id=451557 Disable the repair dialog buttons while the repair is in progress and provide a cancel button to stop and rewind the repair operation. Conflicts: plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/UIUtil.java plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/ApplyProfileAction.java
Diffstat (limited to 'plugins/infra/core')
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java
index 5a0168f200e..0e9fc6ececc 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/TransactionHelper.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2014 CEA LIST and others.
+ * Copyright (c) 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -11,6 +11,7 @@
* Christian W. Damus (CEA) - bug 429826
* Christian W. Damus (CEA) - bug 408491
* Christian W. Damus (CEA) - bug 433320
+ * Christian W. Damus - bug 451557
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.utils;
@@ -21,6 +22,7 @@ import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.transaction.Transaction;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
@@ -231,6 +233,8 @@ public class TransactionHelper extends org.eclipse.papyrus.infra.core.sasheditor
public void run() {
try {
runnable.run(monitorHolder[0]);
+ } catch (RuntimeException e) {
+ throw e;
} catch (Exception e) {
throw new WrappedException(e);
}
@@ -245,6 +249,8 @@ public class TransactionHelper extends org.eclipse.papyrus.infra.core.sasheditor
try {
privileged.run();
+ } catch (OperationCanceledException e) {
+ throw new InterruptedException(e.getLocalizedMessage());
} catch (WrappedException e) {
Exception unwrapped = e.exception();
if (unwrapped instanceof InvocationTargetException) {

Back to the top