Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLPaletteFactory.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLPaletteFactory.java370
1 files changed, 184 insertions, 186 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLPaletteFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLPaletteFactory.java
index a7730a404ce..398faef76c0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLPaletteFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication/src/org/eclipse/papyrus/uml/diagram/communication/part/UMLPaletteFactory.java
@@ -1,186 +1,184 @@
-/**
- * Copyright (c) 2014 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:
- * CEA LIST - Initial API and implementation
- */
-package org.eclipse.papyrus.uml.diagram.communication.part;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.gef.Tool;
-import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool;
-import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
-
-/**
- * @generated
- */
-public class UMLPaletteFactory extends PaletteFactory.Adapter {
-
- // RS: New Palette generation
- // Generates the ID for the tool elements
- // Generate the tool factory (if(ID) createtool...)
- /**
- * @generated
- */
- private final static String COMMUNICATION_TOOL_LIFELINE = "communication.tool.lifeline";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String COMMUNICATION_TOOL_COMMENT = "communication.tool.comment";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String COMMUNICATION_TOOL_CONSTRAINT = "communication.tool.constraint";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String COMMUNICATION_TOOL_DURATIONOBSERVATION = "communication.tool.durationobservation";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String COMMUNICATION_TOOL_TIMEOBSERVATION = "communication.tool.timeobservation";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATEMESSAGECREATECREATIONTOOL = "createMessageCreateCreationTool";//$NON-NLS-1$
-
- /**
- * @generated
- */
- private final static String CREATELINK13CREATIONTOOL = "createLink13CreationTool";//$NON-NLS-1$
-
- /**
- * @generated
- */
- public UMLPaletteFactory() {
-
- }
-
- /**
- * @generated
- */
- @Override
- public Tool createTool(String toolId) {
- if (toolId.equals(COMMUNICATION_TOOL_LIFELINE)) {
- return createLifelineComCreationTool();
- }
- if (toolId.equals(COMMUNICATION_TOOL_COMMENT)) {
- return createComment7CreationTool();
- }
- if (toolId.equals(COMMUNICATION_TOOL_CONSTRAINT)) {
- return createConstraint5CreationTool();
- }
- if (toolId.equals(COMMUNICATION_TOOL_DURATIONOBSERVATION)) {
- return createDurationObservation4CreationTool();
- }
- if (toolId.equals(COMMUNICATION_TOOL_TIMEOBSERVATION)) {
- return createTimeObservation6CreationTool();
- }
- if (toolId.equals(CREATEMESSAGECREATECREATIONTOOL)) {
- return createMessageCreateCreationTool();
- }
- if (toolId.equals(CREATELINK13CREATIONTOOL)) {
- return createLink13CreationTool();
- }
- // default return: null
- return null;
- }
-
- /**
- * @generated
- */
- @Override
- public Object getTemplate(String templateId) {
-
- // default return: null
- return null;
- }
-
- /**
- * @generated
- */
- private Tool createLifelineComCreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Lifeline_8001);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createComment7CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Comment_8005);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createConstraint5CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Constraint_8004);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createDurationObservation4CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.DurationObservation_8007);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createTimeObservation6CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.TimeObservation_8006);
- Tool tool = new AspectUnspecifiedTypeCreationTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createMessageCreateCreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(1);
- types.add(UMLElementTypes.Message_8009);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-
- /**
- * @generated
- */
- private Tool createLink13CreationTool() {
- List<IElementType> types = new ArrayList<IElementType>(4);
- types.add(UMLElementTypes.CommentAnnotatedElement_8010);
- types.add(UMLElementTypes.ConstraintConstrainedElement_8011);
- types.add(UMLElementTypes.DurationObservationEvent_8012);
- types.add(UMLElementTypes.TimeObservationEvent_8013);
- Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
- return tool;
- }
-}
+/**
+ * Copyright (c) 2014 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.communication.part;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gef.Tool;
+import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool;
+import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool;
+import org.eclipse.papyrus.uml.diagram.communication.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class UMLPaletteFactory extends PaletteFactory.Adapter {
+
+ // RS: New Palette generation
+ // Generates the ID for the tool elements
+ // Generate the tool factory (if(ID) createtool...)
+ /**
+ * @generated
+ */
+ private final static String COMMUNICATION_TOOL_LIFELINE = "communication.tool.lifeline";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String COMMUNICATION_TOOL_COMMENT = "communication.tool.comment";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String COMMUNICATION_TOOL_CONSTRAINT = "communication.tool.constraint";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String COMMUNICATION_TOOL_DURATIONOBSERVATION = "communication.tool.durationobservation";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String COMMUNICATION_TOOL_TIMEOBSERVATION = "communication.tool.timeobservation";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CREATEMESSAGECREATECREATIONTOOL = "createMessageCreateCreationTool";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CREATELINK13CREATIONTOOL = "createLink13CreationTool";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ public UMLPaletteFactory() {
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Tool createTool(String toolId) {
+ if(toolId.equals(COMMUNICATION_TOOL_LIFELINE)) {
+ return createLifelineComCreationTool();
+ }
+ if(toolId.equals(COMMUNICATION_TOOL_COMMENT)) {
+ return createComment7CreationTool();
+ }
+ if(toolId.equals(COMMUNICATION_TOOL_CONSTRAINT)) {
+ return createConstraint5CreationTool();
+ }
+ if(toolId.equals(COMMUNICATION_TOOL_DURATIONOBSERVATION)) {
+ return createDurationObservation4CreationTool();
+ }
+ if(toolId.equals(COMMUNICATION_TOOL_TIMEOBSERVATION)) {
+ return createTimeObservation6CreationTool();
+ }
+ if(toolId.equals(CREATEMESSAGECREATECREATIONTOOL)) {
+ return createMessageCreateCreationTool();
+ }
+ if(toolId.equals(CREATELINK13CREATIONTOOL)) {
+ return createLink13CreationTool();
+ }
+ // default return: null
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ @Override
+ public Object getTemplate(String templateId) {
+ // default return: null
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createLifelineComCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Lifeline_8001);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createComment7CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Comment_8005);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createConstraint5CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Constraint_8004);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createDurationObservation4CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.DurationObservation_8007);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createTimeObservation6CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.TimeObservation_8006);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createMessageCreateCreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(1);
+ types.add(UMLElementTypes.Message_8009);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createLink13CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(4);
+ types.add(UMLElementTypes.CommentAnnotatedElement_8010);
+ types.add(UMLElementTypes.ConstraintConstrainedElement_8011);
+ types.add(UMLElementTypes.DurationObservationEvent_8012);
+ types.add(UMLElementTypes.TimeObservationEvent_8013);
+ Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
+ return tool;
+ }
+}

Back to the top