Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2012-11-22 15:30:52 +0000
committercletavernie2012-11-22 15:30:52 +0000
commit0fec26549079aca774413a5b0f2ea6bbd00ee0fd (patch)
treeb027787c251e215ea1998eef4ec5c0535c662ea2 /plugins/infra
parent21d75e85537389915ebf04f9f703365942ff9526 (diff)
downloadorg.eclipse.papyrus-0fec26549079aca774413a5b0f2ea6bbd00ee0fd.tar.gz
org.eclipse.papyrus-0fec26549079aca774413a5b0f2ea6bbd00ee0fd.tar.xz
org.eclipse.papyrus-0fec26549079aca774413a5b0f2ea6bbd00ee0fd.zip
389386: [Validation] The validation commands should not be executed in the CommandStack
https://bugs.eclipse.org/bugs/show_bug.cgi?id=389386 Merge fix from r8977 to the trunk
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.validation/src/org/eclipse/papyrus/infra/services/validation/handler/AbstractCommandHandler.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.validation/src/org/eclipse/papyrus/infra/services/validation/handler/AbstractCommandHandler.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.validation/src/org/eclipse/papyrus/infra/services/validation/handler/AbstractCommandHandler.java
index c30d8c07391..0de509a0f00 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.validation/src/org/eclipse/papyrus/infra/services/validation/handler/AbstractCommandHandler.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.validation/src/org/eclipse/papyrus/infra/services/validation/handler/AbstractCommandHandler.java
@@ -25,10 +25,7 @@ import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers;
import org.eclipse.papyrus.infra.emf.utils.BusinessModelResolver;
-import org.eclipse.papyrus.infra.services.validation.Activator;
import org.eclipse.ui.PlatformUI;
/**
@@ -36,7 +33,7 @@ import org.eclipse.ui.PlatformUI;
*
* This abstract command handler manages:
* - current selection in order to build a list of the selected {@link EObject}
- * - execute the command (returned by children) in Papyrus {@link TransactionalEditingDomain}
+ * - execute the command (returned by children)
* - calculate the command enablement and visibility regarding the command executability
* (the command is now shown in menu if not executable).
*
@@ -139,12 +136,15 @@ public abstract class AbstractCommandHandler extends AbstractHandler {
* @throws ExecutionException
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
- try {
- ServiceUtilsForActionHandlers util = new ServiceUtilsForActionHandlers();
- util.getTransactionalEditingDomain().getCommandStack().execute(getCommand());
- } catch (ServiceException e) {
- Activator.log.error("Unexpected error while executing command.", e); //$NON-NLS-1$
- }
+ // try {
+ // ServiceUtilsForActionHandlers util = new ServiceUtilsForActionHandlers();
+ // util.getTransactionalEditingDomain().getCommandStack().execute(getCommand());
+ //
+ // } catch (ServiceException e) {
+ // Activator.log.error("Unexpected error while executing command.", e); //$NON-NLS-1$
+ // }
+
+ getCommand().execute(); //Validation commands should not be executed in the stack trace
return null;
}

Back to the top