Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'uml/org.eclipse.papyrus.diagram.activity/src/org/eclipse/papyrus/diagram/activity/view/factories/AcceptEventActionViewFactory.java')
-rw-r--r--uml/org.eclipse.papyrus.diagram.activity/src/org/eclipse/papyrus/diagram/activity/view/factories/AcceptEventActionViewFactory.java62
1 files changed, 62 insertions, 0 deletions
diff --git a/uml/org.eclipse.papyrus.diagram.activity/src/org/eclipse/papyrus/diagram/activity/view/factories/AcceptEventActionViewFactory.java b/uml/org.eclipse.papyrus.diagram.activity/src/org/eclipse/papyrus/diagram/activity/view/factories/AcceptEventActionViewFactory.java
new file mode 100644
index 00000000000..cceab3000d6
--- /dev/null
+++ b/uml/org.eclipse.papyrus.diagram.activity/src/org/eclipse/papyrus/diagram/activity/view/factories/AcceptEventActionViewFactory.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2008
+ * Conselleria de Infraestructuras y Transporte, Generalitat de la Comunitat Valenciana .
+ * 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:
+ * Francisco Javier Cano Muñoz (Prodevelop) - initial API implementation
+ ******************************************************************************/
+package org.eclipse.papyrus.diagram.activity.view.factories;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.view.factories.AbstractShapeViewFactory;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.diagram.activity.edit.parts.AcceptEventActionEditPart;
+import org.eclipse.papyrus.diagram.activity.edit.parts.AcceptEventActionName2EditPart;
+import org.eclipse.papyrus.diagram.activity.edit.parts.AcceptEventActionNameEditPart;
+import org.eclipse.papyrus.diagram.activity.part.UMLVisualIDRegistry;
+
+/**
+ * @generated
+ */
+public class AcceptEventActionViewFactory extends AbstractShapeViewFactory {
+
+ /**
+ * @generated
+ */
+ @Override
+ protected List createStyles(View view) {
+ List styles = new ArrayList();
+ styles.add(NotationFactory.eINSTANCE.createShapeStyle());
+ return styles;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ protected void decorateView(View containerView, View view, IAdaptable semanticAdapter, String semanticHint, int index, boolean persisted) {
+ if (semanticHint == null) {
+ semanticHint = UMLVisualIDRegistry.getType(AcceptEventActionEditPart.VISUAL_ID);
+ view.setType(semanticHint);
+ }
+ super.decorateView(containerView, view, semanticAdapter, semanticHint, index, persisted);
+ IAdaptable eObjectAdapter = null;
+ EObject eObject = (EObject) semanticAdapter.getAdapter(EObject.class);
+ if (eObject != null) {
+ eObjectAdapter = new EObjectAdapter(eObject);
+ }
+ getViewService().createNode(eObjectAdapter, view, UMLVisualIDRegistry.getType(AcceptEventActionNameEditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
+ getViewService().createNode(eObjectAdapter, view, UMLVisualIDRegistry.getType(AcceptEventActionName2EditPart.VISUAL_ID), ViewUtil.APPEND, true, getPreferencesHint());
+ }
+}

Back to the top