Selaa lähdekoodia

Removed Junction ElementType from Editor

Andreas Mülder 13 vuotta sitten
vanhempi
commit
c5a2b474de

+ 3 - 5
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/assistent/StatechartModelingAssistantProvider.java

@@ -13,7 +13,6 @@ package org.yakindu.sct.ui.editor.assistent;
 import static org.yakindu.sct.ui.editor.editor.StatechartElementTypes.CHOICE;
 import static org.yakindu.sct.ui.editor.editor.StatechartElementTypes.ENTRY;
 import static org.yakindu.sct.ui.editor.editor.StatechartElementTypes.FINALSTATE;
-import static org.yakindu.sct.ui.editor.editor.StatechartElementTypes.JUNCTION;
 import static org.yakindu.sct.ui.editor.editor.StatechartElementTypes.REGION;
 import static org.yakindu.sct.ui.editor.editor.StatechartElementTypes.STATE;
 import static org.yakindu.sct.ui.editor.editor.StatechartElementTypes.TRANSITION;
@@ -35,7 +34,7 @@ import com.google.common.collect.Lists;
 
 /**
  * 
- * @author muelder
+ * @author andreas muelder - Initial contribution and API
  * 
  */
 public class StatechartModelingAssistantProvider extends
@@ -48,8 +47,7 @@ public class StatechartModelingAssistantProvider extends
 
 		if (editPart instanceof RegionEditPart
 				|| editPart instanceof RegionCompartmentEditPart)
-			return Lists.newArrayList(ENTRY, STATE, FINALSTATE,
-					ENTRY, JUNCTION, CHOICE);
+			return Lists.newArrayList(ENTRY, STATE, FINALSTATE, ENTRY, CHOICE);
 
 		if (editPart instanceof StateEditPart
 				|| editPart instanceof StateFigureCompartmentEditPart)
@@ -63,7 +61,7 @@ public class StatechartModelingAssistantProvider extends
 	public List<IElementType> getTypesForTarget(IAdaptable source,
 			IElementType relationshipType) {
 		if (StatechartElementTypes.TRANSITION.equals(relationshipType))
-			return Lists.newArrayList(STATE, FINALSTATE, JUNCTION, CHOICE);
+			return Lists.newArrayList(STATE, FINALSTATE, CHOICE);
 		return Collections.EMPTY_LIST;
 	}
 

+ 0 - 1
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editor/StatechartElementTypes.java

@@ -31,7 +31,6 @@ public final class StatechartElementTypes extends AbstractElementTypeEnumerator
 	public static final IElementType SUBMACHINE_STATE = getElementType("org.yakindu.sct.ui.editor.SubmachineState");
 	public static final IElementType TRANSITION = getElementType("org.yakindu.sct.ui.editor.Transition");
 	public static final IElementType CHOICE = getElementType("org.yakindu.sct.ui.editor.Choice");
-	public static final IElementType JUNCTION = getElementType("org.yakindu.sct.ui.editor.Junction");
 	public static final IElementType ENTRY = getElementType("org.yakindu.sct.ui.editor.Entry");
 	public static final IElementType DEEPHISTORY = getElementType("org.yakindu.sct.ui.editor.DeepHistory");
 	public static final IElementType SHALLOWHISTORY = getElementType("org.yakindu.sct.ui.editor.ShallowHistory");

+ 0 - 33
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editor/figures/JunctionFigure.java

@@ -1,33 +0,0 @@
-/**
- * Copyright (c) 2010 committers of YAKINDU and others.
- * 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:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.sct.ui.editor.editor.figures;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Ellipse;
-import org.eclipse.draw2d.MarginBorder;
-import org.eclipse.draw2d.geometry.Dimension;
-
-public class JunctionFigure extends Ellipse {
-
-	public JunctionFigure() {
-		init();
-	}
-
-	private void init() {
-		this.setOutline(true);
-		this.setLineWidth(2);
-		this.setSize(new Dimension(10, 10));
-		this.setBorder(new MarginBorder(2, 2, 2, 2));
-		this.setBackgroundColor(ColorConstants.white);
-		this.setForegroundColor(ColorConstants.black);
-	}
-
-}