diff options
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/display/command/RemoveAppliedStereotypeToDisplayCommand.java')
-rw-r--r-- | plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/display/command/RemoveAppliedStereotypeToDisplayCommand.java | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/display/command/RemoveAppliedStereotypeToDisplayCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/display/command/RemoveAppliedStereotypeToDisplayCommand.java new file mode 100644 index 00000000000..1b54a707f73 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/stereotype/display/command/RemoveAppliedStereotypeToDisplayCommand.java @@ -0,0 +1,67 @@ +/*****************************************************************************
+ * Copyright (c) 2008 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.stereotype.display.command;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayCommandExecution;
+import org.eclipse.papyrus.uml.diagram.common.stereotype.display.helper.StereotypeDisplayUtil;
+import org.eclipse.uml2.uml.Stereotype;
+
+/**
+ * The Class RemoveAppliedStereotypeToDisplayCommand used to set the list of applied stereotype to
+ * display
+ */
+public class RemoveAppliedStereotypeToDisplayCommand extends RecordingCommand {
+
+
+ private View view;
+ private TransactionalEditingDomain domain;
+ private Stereotype stereotype;
+
+ private static StereotypeDisplayUtil helper = StereotypeDisplayUtil.getInstance();
+ private static StereotypeDisplayCommandExecution commandHelper = StereotypeDisplayCommandExecution.getInstance();
+
+
+
+
+ /**
+ * Instantiates a new sets the applied stereotype to display command.
+ *
+ * @param domain
+ * the domain
+ * @param object
+ * the object
+ * @param stereotypeList
+ * the stereotype list
+ */
+
+ public RemoveAppliedStereotypeToDisplayCommand(TransactionalEditingDomain domain, View view,
+ Stereotype stereotype) {
+ super(domain, "Hide Stereotype Label");
+ this.domain = domain;
+ this.view = view;
+ this.stereotype = stereotype;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void doExecute() {
+ View label = helper.getStereotypeLabel(view, stereotype);
+ commandHelper.setUserVisibility(domain, label, false);
+ }
+}
|