Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[henshin-dev] Diagram editor update

Hi,
I migrated the diagram editor, it is in the model2011 branch.

When the tests are migrated too and the migration plugin works, everything should go back into the trunk immediately. Let me say that I am like Enrico not a fan of using branches.

cheers,
christian



On 01/19/2012 02:39 PM, henshin-commits-request@xxxxxxxxxxx wrote:
Send henshin-commits mailing list submissions to
	henshin-commits@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
	http://dev.eclipse.org/mailman/listinfo/henshin-commits
or, via email, send a message with subject or body 'help' to
	henshin-commits-request@xxxxxxxxxxx

You can reach the person managing the list at
	henshin-commits-owner@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of henshin-commits digest..."


Today's Topics:

    1. r1379 - in branches/model2011: .
       org.eclipse.emf.henshin.diagram
       org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands	
       org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/helpers	
       org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts	
       org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies	
       org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/navigator	
       org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part	
       org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/providers
       (genie@xxxxxxxxxxx)


----------------------------------------------------------------------

Message: 1
Date: Thu, 19 Jan 2012 08:39:32 -0500 (EST)
From: genie@xxxxxxxxxxx
To: henshin-commits@xxxxxxxxxxx
Subject: [henshin-commits] r1379 - in branches/model2011: .
	org.eclipse.emf.henshin.diagram
	org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands	
	org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/helpers	
	org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts	
	org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies	
	org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/navigator	
	org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part	
	org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/providers
	
Message-ID:<20120119133932.37D2917D99A@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8

Author: ckrause
Date: 2012-01-19 08:39:31 -0500 (Thu, 19 Jan 2012)
New Revision: 1379

Added:
    branches/model2011/org.eclipse.emf.henshin.diagram/
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinPaletteFactory.java
Removed:
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinPaletteFactory.java
Modified:
    branches/model2011/org.eclipse.emf.henshin.diagram/plugin.xml
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/EdgeCreateCommand.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/InvocationCreateCommand.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/NodeCreateCommand.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/UnitCreateCommand.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/helpers/TransformationSystemEditHelper.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/helpers/UnitEditHelper.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/EdgeEditPart.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/LinkEditPart.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/NodeEditPart.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/SymbolEditPart.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies/InvocationItemSemanticEditPolicy.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies/TransformationSystemItemSemanticEditPolicy.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies/UnitCompartmentCanonicalEditPolicy.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/navigator/HenshinNavigatorContentProvider.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/navigator/HenshinNavigatorLabelProvider.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinDiagramEditor.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinDiagramUpdater.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/Messages.java
    branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/providers/HenshinViewProvider.java
Log:
branch for 2011 diagram

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/plugin.xml
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/plugin.xml	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/plugin.xml	2012-01-19 13:39:31 UTC (rev 1379)
@@ -91,10 +91,6 @@
              <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart">
                 <GlobalActionId actionId="save"/>
              </ElementType>
-<ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
-<GlobalActionId actionId="save">
-</GlobalActionId>
-</ElementType>
           </ViewId>
        </GlobalActionHandlerProvider>
        <GlobalActionHandlerProvider
@@ -283,7 +279,7 @@

     <extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
        <?gmfgen generated="true"?>
-<metamodel nsURI="http://www.eclipse.org/emf/2010/Henshin";>
+<metamodel nsURI="http://www.eclipse.org/emf/2011/Henshin";>
           <metamodelType
                 id="org.eclipse.emf.henshin.diagram.TransformationSystem_1000"
                 name="%metatype.name.TransformationSystem_1000"
@@ -293,7 +289,7 @@
              <param name="semanticHint" value="1000"/>
           </metamodelType>
        </metamodel>
-<metamodel nsURI="http://www.eclipse.org/emf/2010/Henshin";>
+<metamodel nsURI="http://www.eclipse.org/emf/2011/Henshin";>
           <metamodelType
                 id="org.eclipse.emf.henshin.diagram.Rule_2001"
                 name="%metatype.name.Rule_2001"
@@ -303,7 +299,7 @@
              <param name="semanticHint" value="2001"/>
           </metamodelType>
        </metamodel>
-<metamodel nsURI="http://www.eclipse.org/emf/2010/Henshin";>
+<metamodel nsURI="http://www.eclipse.org/emf/2011/Henshin";>
           <metamodelType
                 id="org.eclipse.emf.henshin.diagram.TransformationUnit_2002"
                 name="%metatype.name.TransformationUnit_2002"
@@ -313,7 +309,7 @@
              <param name="semanticHint" value="2002"/>
           </metamodelType>
        </metamodel>
-<metamodel nsURI="http://www.eclipse.org/emf/2010/Henshin";>
+<metamodel nsURI="http://www.eclipse.org/emf/2011/Henshin";>
           <metamodelType
                 id="org.eclipse.emf.henshin.diagram.Node_3001"
                 name="%metatype.name.Node_3001"
@@ -323,7 +319,7 @@
              <param name="semanticHint" value="3001"/>
           </metamodelType>
        </metamodel>
-<metamodel nsURI="http://www.eclipse.org/emf/2010/Henshin";>
+<metamodel nsURI="http://www.eclipse.org/emf/2011/Henshin";>
           <metamodelType
                 id="org.eclipse.emf.henshin.diagram.Attribute_3002"
                 name="%metatype.name.Attribute_3002"
@@ -340,7 +336,7 @@
           <specializes id="org.eclipse.gmf.runtime.emf.type.core.null"/>
           <param name="semanticHint" value="3004"/>
        </specializationType>
-<metamodel nsURI="http://www.eclipse.org/emf/2010/Henshin";>
+<metamodel nsURI="http://www.eclipse.org/emf/2011/Henshin";>
           <specializationType
                 id="org.eclipse.emf.henshin.diagram.TransformationUnit_3003"
                 name="%metatype.name.TransformationUnit_3003"
@@ -349,7 +345,7 @@
              <param name="semanticHint" value="3003"/>
           </specializationType>
        </metamodel>
-<metamodel nsURI="http://www.eclipse.org/emf/2010/Henshin";>
+<metamodel nsURI="http://www.eclipse.org/emf/2011/Henshin";>
           <metamodelType
                 id="org.eclipse.emf.henshin.diagram.Edge_4001"
                 name="%metatype.name.Edge_4001"

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/EdgeCreateCommand.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/EdgeCreateCommand.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/EdgeCreateCommand.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -20,6 +20,7 @@
  import org.eclipse.emf.henshin.diagram.edit.policies.HenshinBaseItemSemanticEditPolicy;
  import org.eclipse.emf.henshin.model.Edge;
  import org.eclipse.emf.henshin.model.Graph;
+import org.eclipse.emf.henshin.model.HenshinFactory;
  import org.eclipse.emf.henshin.model.Node;
  import org.eclipse.emf.henshin.model.Rule;
  import org.eclipse.emf.henshin.model.actions.HenshinActionHelper;
@@ -104,7 +105,8 @@
  			// Check the type as well:
  			EReference type = (EReference) getRequest().getParameter(
  					TYPE_PARAMETER_KEY);
-			return HenshinActionHelper.canCreateEdge(getSource(), getTarget(), type);
+			return HenshinActionHelper.canCreateEdge(getSource(), getTarget(),
+					type);
  		}
  		return true;
  	}
@@ -128,7 +130,8 @@
  		Rule rule = getSource().getGraph().getContainerRule();

  		// Create the edge:
-		Edge edge = HenshinActionHelper.createEdge(getSource(), getTarget(), type);
+		Edge edge = HenshinActionHelper.createEdge(getSource(), getTarget(),
+				type);

  		// Update the root containment is the edge is containment / container:
  		if (type.isContainment() || type.isContainer()) {

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/InvocationCreateCommand.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/InvocationCreateCommand.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/InvocationCreateCommand.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -19,6 +19,7 @@
  import org.eclipse.core.runtime.IProgressMonitor;
  import org.eclipse.emf.ecore.EObject;
  import org.eclipse.emf.henshin.model.ConditionalUnit;
+import org.eclipse.emf.henshin.model.HenshinFactory;
  import org.eclipse.emf.henshin.model.IndependentUnit;
  import org.eclipse.emf.henshin.model.LoopUnit;
  import org.eclipse.emf.henshin.model.PriorityUnit;
@@ -65,13 +66,13 @@
  		// We need at least one target candidate:
  		return !getTargetCandidates().isEmpty();
  	}
-	
+
  	/*
  	 * Helper method: get the current transformation system.
  	 */
  	private TransformationSystem getTransformationSystem() {
  		EObject object = getElementToEdit();
-		while (object!=null) {
+		while (object != null) {
  			if (object instanceof TransformationSystem) {
  				return (TransformationSystem) object;
  			}
@@ -79,75 +80,70 @@
  		}
  		return null;
  	}
-	
+
  	/*
  	 * Helper method: get a list of possible target candidate units.
  	 */
  	private List<TransformationUnit>  getTargetCandidates() {
  		List<TransformationUnit>  candidates = new ArrayList<TransformationUnit>();
  		TransformationSystem system = getTransformationSystem();
-		if (system!=null) {
+		if (system != null) {
  			candidates.addAll(system.getRules());
  			candidates.addAll(system.getTransformationUnits());
  		}
  		return candidates;
  	}
-	
+
  	/**
  	 * @generated NOT
  	 */
  	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
  			IAdaptable info) throws ExecutionException {
-		
+
  		// Get the owner unit and the target candidate units:
  		TransformationUnit owner = (TransformationUnit) getElementToEdit();
  		List<TransformationUnit>  candidates = getTargetCandidates();
-		
+
  		// Try to be smart: in most cases we don't want duplicate invocations:
  		for (TransformationUnit used : owner.getSubUnits(false)) {
-			if (candidates.size()>1) {
+			if (candidates.size()>  1) {
  				candidates.remove(used);
-			} else break;
+			} else
+				break;
  		}
-		
+
  		// Now we just take the first candidate:
  		TransformationUnit target = candidates.get(0);

  		// Add it to the parent unit:
  		if (owner instanceof SequentialUnit) {
  			((SequentialUnit) owner).getSubUnits().add(target);
-		}
-		else if (owner instanceof PriorityUnit) {
+		} else if (owner instanceof PriorityUnit) {
  			((PriorityUnit) owner).getSubUnits().add(target);
-		}
-		else if (owner instanceof IndependentUnit) {
+		} else if (owner instanceof IndependentUnit) {
  			((IndependentUnit) owner).getSubUnits().add(target);
-		}
-		else if (owner instanceof ConditionalUnit) {
+		} else if (owner instanceof ConditionalUnit) {
  			ConditionalUnit cond = (ConditionalUnit) owner;
-			if (cond.getIf()==null) {
+			if (cond.getIf() == null) {
  				cond.setIf(target);
-			}
-			else if (cond.getThen()==null) {
+			} else if (cond.getThen() == null) {
  				cond.setThen(target);
-			}
-			else if (cond.getElse()==null) {
+			} else if (cond.getElse() == null) {
  				cond.setElse(target);
  			}
-		}
-		else if (owner instanceof LoopUnit) {
-			if (((LoopUnit) owner).getSubUnit()==null) {
+		} else if (owner instanceof LoopUnit) {
+			if (((LoopUnit) owner).getSubUnit() == null) {
  				((LoopUnit) owner).setSubUnit(target);
  			}
  		}

  		// No need to configure.
  		// doConfigure(newElement, monitor, info);
-		
+
  		// Done.
  		((CreateElementRequest) getRequest()).setNewElement(target);
  		return CommandResult.newOKCommandResult(target);
-		
+
  	}

  	/**

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/NodeCreateCommand.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/NodeCreateCommand.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/NodeCreateCommand.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -51,59 +51,60 @@
   * @generated
   */
  public class NodeCreateCommand extends EditElementCommand {
-	
+
  	private static final Comparator<EClassifier>  ECLASS_COMPARATOR = new EClassComparator();
-	
+
  	private static final ILabelProvider labelProvider = new LabelProvider() {
-		
+
  		@Override
  		public String getText(Object element) {
  			return ((EClassifier) element).getName();
  		}
-		
+
  		@Override
  		public Image getImage(Object element) {
  			return HenshinIcons.ECLASS;
  		}
  	};
-	
-	private final Shell shell = HenshinDiagramEditorPlugin.getInstance().getWorkbench()
-			.getDisplay().getActiveShell();
-	
+
+	private final Shell shell = HenshinDiagramEditorPlugin.getInstance()
+			.getWorkbench().getDisplay().getActiveShell();
+
  	/**
  	 * @generated
  	 */
  	public NodeCreateCommand(CreateElementRequest req) {
  		super(req.getLabel(), null, req);
  	}
-	
+
  	/**
  	 * FIXME: replace with setElementToEdit()
  	 *
  	 * @generated
  	 */
  	protected EObject getElementToEdit() {
-		EObject container = ((CreateElementRequest) getRequest()).getContainer();
+		EObject container = ((CreateElementRequest) getRequest())
+				.getContainer();
  		if (container instanceof View) {
  			container = ((View) container).getElement();
  		}
  		return container;
  	}
-	
+
  	/**
  	 * @generated
  	 */
  	public boolean canExecute() {
  		return true;
-		
+
  	}
-	
+
  	/**
  	 * @generated NOT
  	 */
-	protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info)
-			throws ExecutionException {
-		
+	protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
+			IAdaptable info) throws ExecutionException {
+
  		// The node is created in the context of a rule (PRESERVE-action):
  		Rule rule = (Rule) getElementToEdit();
  		if (rule.getLhs() == null) {
@@ -116,34 +117,35 @@
  			rhs.setName("RHS");
  			rule.setRhs(rhs);
  		}
-		
+
  		// Create two new node instances:
  		Node lhsNode = HenshinFactory.eINSTANCE.createNode();
  		Node rhsNode = HenshinFactory.eINSTANCE.createNode();
-		
+
  		// Add them to the LHS / RHS:
  		rule.getLhs().getNodes().add(lhsNode);
  		rule.getRhs().getNodes().add(rhsNode);
-		
+
  		// Create a mapping:
  		Mapping mapping = HenshinFactory.eINSTANCE.createMapping();
  		mapping.setOrigin(lhsNode);
  		mapping.setImage(rhsNode);
  		rule.getMappings().add(mapping);
-		
+
  		// Set the type of the nodes:
  		CreateElementRequest request = (CreateElementRequest) getRequest();
  		Object type = request.getParameter(EClassNodeTool.TYPE_PARAMETER_KEY);
-		
+
  		// if no type has been specified yet, let the user choose one
  		if (type == null) {
  			final TransformationSystem ts = rule.getTransformationSystem();
-			
-			final SingleEClassifierSelectionDialog dialog = new SingleEClassifierSelectionDialog(ts);
+
+			final SingleEClassifierSelectionDialog dialog = new SingleEClassifierSelectionDialog(
+					ts);
  			type = dialog.openAndReturnSelection();
-			
+
  		}// if
-		
+
  		if (type != null&&  type instanceof EClass) {
  			EClass eclass = (EClass) type;
  			lhsNode.setType(eclass);
@@ -151,35 +153,38 @@
  		} else {
  			return CommandResult.newCancelledCommandResult();
  		}
-		
+
  		// Update the root containment for the new node:
  		View ruleView = RootObjectEditHelper.findRuleView(rule);
  		RootObjectEditHelper.updateRootContainment(ruleView, lhsNode);
-		
+
  		// This shouldn't do anything, but we call it to be sure:
  		doConfigure(lhsNode, monitor, info);
-		
+
  		request.setNewElement(lhsNode);
  		return CommandResult.newOKCommandResult(lhsNode);
-		
+
  	}
-	
+
  	/**
  	 * @generated
  	 */
-	protected void doConfigure(Node newElement, IProgressMonitor monitor, IAdaptable info)
-			throws ExecutionException {
-		IElementType elementType = ((CreateElementRequest) getRequest()).getElementType();
-		ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement,
-				elementType);
-		configureRequest.setClientContext(((CreateElementRequest) getRequest()).getClientContext());
+	protected void doConfigure(Node newElement, IProgressMonitor monitor,
+			IAdaptable info) throws ExecutionException {
+		IElementType elementType = ((CreateElementRequest) getRequest())
+				.getElementType();
+		ConfigureRequest configureRequest = new ConfigureRequest(
+				getEditingDomain(), newElement, elementType);
+		configureRequest.setClientContext(((CreateElementRequest) getRequest())
+				.getClientContext());
  		configureRequest.addParameters(getRequest().getParameters());
-		ICommand configureCommand = elementType.getEditCommand(configureRequest);
+		ICommand configureCommand = elementType
+				.getEditCommand(configureRequest);
  		if (configureCommand != null&&  configureCommand.canExecute()) {
  			configureCommand.execute(monitor, info);
  		}
  	}
-	
+
  	/**
  	 * Dialog for choosing an EClassifier in order to specify the node type to
  	 * be created.
@@ -187,10 +192,11 @@
  	 * @author Stefan Jurack (sjurack)
  	 *
  	 */
-	private final class SingleEClassifierSelectionDialog extends ElementListSelectionDialog {
-		
+	private final class SingleEClassifierSelectionDialog extends
+			ElementListSelectionDialog {
+
  		final TransformationSystem ts;
-		
+
  		/**
  		 * Constructor
  		 *
@@ -204,7 +210,7 @@
  			this.setMessage(Messages.SingleEClassifierSelectionDialog_msg);
  			this.ts = ts;
  		}// constructor
-		
+
  		/**
  		 * Opens the dialog and returns the first selected EClassifier in the
  		 * list. If no EClassifier is available in the TransformationSystem or
@@ -213,13 +219,13 @@
  		 * @return
  		 */
  		public final EClassifier openAndReturnSelection() {
-			
+
  			final List<EClassifier>  elements = TransformationSystemEditHelper
  					.collectAllEClassifier(ts);
-			
+
  			EClassifier result = null;
  			if (elements.size()>  0) {
-				
+
  				Collections.sort(elements, ECLASS_COMPARATOR);
  				this.setElements(elements.toArray());
  				int returnCode = this.open();
@@ -227,10 +233,10 @@
  					result = (EClassifier) getFirstResult();
  				}// if
  			}// if
-			
+
  			return result;
  		}// openAndReturnElement
-		
+
  	}// inner class
-	
+
  }

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/UnitCreateCommand.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/UnitCreateCommand.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/commands/UnitCreateCommand.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -109,19 +109,20 @@
  		// Create the transformation unit:
  		TransformationUnit unit = (TransformationUnit) HenshinFactory.eINSTANCE
  				.create(unitType);
-		
+
  		// Special cases:
  		List<TransformationUnit>  targets = getTargetCandidates();
  		if (!targets.isEmpty()) {
  			if (unit instanceof ConditionalUnit) {
  				TransformationUnit ifUnit = targets.remove(0);
-				TransformationUnit thenUnit = targets.isEmpty() ? ifUnit : targets.remove(0);
-				TransformationUnit elseUnit = targets.isEmpty() ? thenUnit : targets.remove(0);
+				TransformationUnit thenUnit = targets.isEmpty() ? ifUnit
+						: targets.remove(0);
+				TransformationUnit elseUnit = targets.isEmpty() ? thenUnit
+						: targets.remove(0);
  				((ConditionalUnit) unit).setIf(ifUnit);
  				((ConditionalUnit) unit).setThen(thenUnit);
  				((ConditionalUnit) unit).setElse(elseUnit);
-			}
-			else if (unit instanceof LoopUnit) {
+			} else if (unit instanceof LoopUnit) {
  				((LoopUnit) unit).setSubUnit(targets.get(0));
  			}
  		}
@@ -177,7 +178,7 @@
  	 */
  	private TransformationSystem getTransformationSystem() {
  		EObject object = getElementToEdit();
-		while (object!=null) {
+		while (object != null) {
  			if (object instanceof TransformationSystem) {
  				return (TransformationSystem) object;
  			}
@@ -185,14 +186,14 @@
  		}
  		return null;
  	}
-	
+
  	/*
  	 * Helper method: get a list of possible target candidate units.
  	 */
  	private List<TransformationUnit>  getTargetCandidates() {
  		List<TransformationUnit>  candidates = new ArrayList<TransformationUnit>();
  		TransformationSystem system = getTransformationSystem();
-		if (system!=null) {
+		if (system != null) {
  			candidates.addAll(system.getRules());
  			candidates.addAll(system.getTransformationUnits());
  		}

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/helpers/TransformationSystemEditHelper.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/helpers/TransformationSystemEditHelper.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/helpers/TransformationSystemEditHelper.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -22,7 +22,7 @@
   * @generated
   */
  public class TransformationSystemEditHelper extends HenshinBaseEditHelper {
-	
+
  	/**
  	 * @param ts
  	 * @param name
@@ -32,16 +32,18 @@
  	 * @return empty array if no EClassifier could be found, otherwise an array
  	 *         which contains all EClassifier with the given name.
  	 */
-	public static EClassifier[] findEClassifierByName(TransformationSystem ts, String name) {
-		
-		if (name == null) return new EClassifier[] {};
-		
+	public static EClassifier[] findEClassifierByName(TransformationSystem ts,
+			String name) {
+
+		if (name == null)
+			return new EClassifier[] {};
+
  		EClassifier result = null;
  		name = name.trim();
  		final String packageSeparatorRegExpr = "\\.";
  		String[] names = name.split(packageSeparatorRegExpr);
  		if (names.length>  1) { // if package information available
-		
+
  			// watch out for the correct package path
  			for (EPackage p : ts.getImports()) {
  				if (p.getName().equals(names[0])) {
@@ -50,19 +52,20 @@
  				}// if
  			}// for
  			return new EClassifier[] { result };
-			
+
  		} else {
  			// no package path is given, so we collect all matching EClassifier
  			final List<EClassifier>  eclassifierList = collectAllEClassifier(ts);
  			final List<EClassifier>  resultList = new ArrayList<EClassifier>();
  			for (EClassifier ec : eclassifierList) {
-				if (ec.getName().equals(name)) resultList.add(ec);
+				if (ec.getName().equals(name))
+					resultList.add(ec);
  			}// for
-			
+
  			return resultList.toArray(new EClassifier[resultList.size()]);
  		}// if else
  	}// findEClassifierByName
-	
+
  	/**
  	 * Finds an EClassifier in a package structure<code>p</code>  with a
  	 * full-qualified-name<code>fqn</code>. This helper method works
@@ -74,8 +77,9 @@
  	 * @param index
  	 * @return
  	 */
-	private static EClassifier findClassifierByFQN(EPackage p, String[] fqn, int index) {
-		
+	private static EClassifier findClassifierByFQN(EPackage p, String[] fqn,
+			int index) {
+
  		EClassifier result = null;
  		if (index<  (fqn.length - 1)) {
  			for (EPackage pp : p.getESubpackages()) {
@@ -87,10 +91,10 @@
  		} else {
  			result = p.getEClassifier(fqn[fqn.length - 1]);
  		}// if else
-		
+
  		return result;
  	}// findClassifierByFQN
-	
+
  	/**
  	 * Collects all classifiers found in the imported (
  	 * {@link TransformationSystem#getImports()}) EPackages of the given
@@ -99,25 +103,27 @@
  	 * @param ts
  	 * @return
  	 */
-	public static List<EClassifier>  collectAllEClassifier(TransformationSystem ts) {
-		
+	public static List<EClassifier>  collectAllEClassifier(
+			TransformationSystem ts) {
+
  		List<EClassifier>  list = new ArrayList<EClassifier>();
-		
+
  		for (EPackage p : ts.getImports()) {
  			collectAllEClassifierHelper(list, p);
  		}// for
-		
+
  		return list;
  	}// collectAllEClassifier
-	
+
  	/**
  	 * @param elements
  	 * @param p
  	 */
-	private static void collectAllEClassifierHelper(List<EClassifier>  elements, EPackage p) {
+	private static void collectAllEClassifierHelper(List<EClassifier>  elements,
+			EPackage p) {
  		elements.addAll(p.getEClassifiers());
  		for (EPackage p2 : p.getESubpackages())
  			collectAllEClassifierHelper(elements, p2);
  	}// collectAllEClassifierHelper
-	
+
  }

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/helpers/UnitEditHelper.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/helpers/UnitEditHelper.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/helpers/UnitEditHelper.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -28,22 +28,22 @@
   * @generated NOT
   */
  public class UnitEditHelper extends HenshinBaseEditHelper {
-	
+
  	/**
  	 * An enum to refer to special invocation views (subUnits).
  	 */
  	public static enum InvocationViewKey {
-				
+
  		IF(0), THEN(1), ELSE(2), LOOP(0);
-		
+
  		private int index;
-		
+
  		private InvocationViewKey(int index) {
  			this.index = index;
  		}
-		
+
  	}
-	
+
  	/**
  	 * Get the invocation views of a unit view. This is a list of all views
  	 * that correspond to subUnits of that unit.
@@ -52,22 +52,24 @@
  	 * @return List of views.
  	 */
  	public static List<View>  getInvocationViews(View unitView, boolean withNulls) {
-		
+
  		// Find the unit and the compartment view:
-		if (String.valueOf(UnitCompartmentEditPart.VISUAL_ID).equals(unitView.getType())) {
+		if (String.valueOf(UnitCompartmentEditPart.VISUAL_ID).equals(
+				unitView.getType())) {
  			unitView = (View) unitView.eContainer();
  		}
-		View unitCompartment = ViewUtil
-				.getChildBySemanticHint(unitView, String.valueOf(UnitCompartmentEditPart.VISUAL_ID));
-		
+		View unitCompartment = ViewUtil.getChildBySemanticHint(unitView,
+				String.valueOf(UnitCompartmentEditPart.VISUAL_ID));
+
  		// Get the transformation unit and its subunits including nulls:
  		TransformationUnit unit = (TransformationUnit) unitView.getElement();
  		List<TransformationUnit>  subUnits = getSubUnitsWithNulls(unit);
-		
+
  		// Now search for the corresponding views:
  		List<View>  invocations = new ArrayList<View>(subUnits.size());
  		for (TransformationUnit subUnit : subUnits) {
-			invocations.add(getInvocationView(unitCompartment, subUnit, invocations));
+			invocations.add(getInvocationView(unitCompartment, subUnit,
+					invocations));
  		}
  		return invocations;
  	}
@@ -79,40 +81,40 @@
  	/*
  	 * Get the subUnits of a unit including nulls.
  	 */
-	private static List<TransformationUnit>  getSubUnitsWithNulls(TransformationUnit unit) {
+	private static List<TransformationUnit>  getSubUnitsWithNulls(
+			TransformationUnit unit) {
  		List<TransformationUnit>  subUnits = new ArrayList<TransformationUnit>();
  		if (unit instanceof ConditionalUnit) {
  			subUnits.add(((ConditionalUnit) unit).getIf());
  			subUnits.add(((ConditionalUnit) unit).getThen());
  			subUnits.add(((ConditionalUnit) unit).getElse());
-		}
-		else if (unit instanceof LoopUnit) {
+		} else if (unit instanceof LoopUnit) {
  			subUnits.add(((LoopUnit) unit).getSubUnit());
-		}
-		else {
+		} else {
  			subUnits.addAll(unit.getSubUnits(false));
  		}
  		return subUnits;
  	}
-	
+
  	/*
  	 * Find an invocation view.
  	 */
-	private static View getInvocationView(View unitCompartment, TransformationUnit target, Collection<View>  exclude) {
-		if (unitCompartment==null || target==null) {
+	private static View getInvocationView(View unitCompartment,
+			TransformationUnit target, Collection<View>  exclude) {
+		if (unitCompartment == null || target == null) {
  			return null;
  		}
  		for (Object obj : unitCompartment.getChildren()) {
  			View view = (View) obj;
-			if (view.getElement()==target&&
-				String.valueOf(InvocationEditPart.VISUAL_ID).equals(view.getType())&&
-				!exclude.contains(view)) {
+			if (view.getElement() == target
+					&&  String.valueOf(InvocationEditPart.VISUAL_ID).equals(
+							view.getType())&&  !exclude.contains(view)) {
  				return view;
  			}
  		}
  		return null;
  	}
-	
+
  	/*
  	 * Get the compartment view of a unit view.
  	 */
@@ -128,5 +130,4 @@
  		return ViewUtil.getChildBySemanticHint(view, type);
  	}

-
  }

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/EdgeEditPart.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/EdgeEditPart.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/EdgeEditPart.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -64,11 +64,14 @@
  	protected void addSemanticListeners() {
  		super.addSemanticListeners();
  		View view = getNotationView();
-		if (view==null) return;
+		if (view == null)
+			return;
  		Edge edge = (Edge) (getNotationView().getElement());
-		if (edge==null) return;
+		if (edge == null)
+			return;
  		Rule rule = edge.getGraph().getContainerRule();
-		if (rule==null) return;
+		if (rule == null)
+			return;
  		TransformationSystem system = rule.getTransformationSystem();
  		transformationListener = new TransformationSystemListener(system,
  				new AdapterImpl() {

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/LinkEditPart.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/LinkEditPart.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/LinkEditPart.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -46,13 +46,13 @@
  	 * @generated
  	 */
  	public static final int VISUAL_ID = 4002;
-	
+
  	// Arrow decoration:
  	private RotatableDecoration arrow;
-	
+
  	// Optional label:
  	private Label label;
-	
+
  	/**
  	 * @generated
  	 */
@@ -69,73 +69,78 @@
  				new ViewComponentEditPolicy());
  		removeEditPolicy(EditPolicyRoles.SEMANTIC_ROLE);
  	}
-	
+
  	/*
  	 * Update the arrow of the line depending on the
  	 * type of transformation unit this link belongs to.
  	 */
  	private void updateArrow(LinkFigure figure) {
-		if (figure!=null) {
+		if (figure != null) {
  			TransformationUnit unit = getTransformationUnit();
-			figure.setTargetDecoration(null);	// must be done here because child is cached
-			if (arrow!=null) {
+			figure.setTargetDecoration(null); // must be done here because child is cached
+			if (arrow != null) {
  				if (figure.getChildren().contains(arrow)) {
  					figure.remove(arrow);
  				}
  				arrow = null;
  			}
  			if (unit instanceof PriorityUnit) {
-				figure.add(arrow = createArrowDecoration(4, 7), new MiddleLocator(figure));
+				figure.add(arrow = createArrowDecoration(4, 7),
+						new MiddleLocator(figure));
  			} else {
-				figure.setTargetDecoration(arrow = createArrowDecoration(7, 3));				
+				figure.setTargetDecoration(arrow = createArrowDecoration(7, 3));
  			}
  		}
  	}
-	
+
  	/*
  	 * Update the label of the link.
  	 */
  	private void updateLabel(LinkFigure figure) {
-		if (figure!=null) {
-			if (label!=null) {
+		if (figure != null) {
+			if (label != null) {
  				figure.remove(label);
  				label = null;
  			}
-			if (HenshinLinkUpdater.isIfLink(getTransformationUnit(), getNotationView())) {
-				figure.add(label = new Label("if"), new LabelLocator(figure, 0, -10));
+			if (HenshinLinkUpdater.isIfLink(getTransformationUnit(),
+					getNotationView())) {
+				figure.add(label = new Label("if"), new LabelLocator(figure, 0,
+						-10));
+			} else if (HenshinLinkUpdater.isThenLink(getTransformationUnit(),
+					getNotationView())) {
+				figure.add(label = new Label("then"), new LabelLocator(figure,
+						10, -10));
+			} else if (HenshinLinkUpdater.isElseLink(getTransformationUnit(),
+					getNotationView())) {
+				figure.add(label = new Label("else"), new LabelLocator(figure,
+						10, 10));
  			}
-			else if (HenshinLinkUpdater.isThenLink(getTransformationUnit(), getNotationView())) {
-				figure.add(label = new Label("then"), new LabelLocator(figure, 10, -10));
-			}
-			else if (HenshinLinkUpdater.isElseLink(getTransformationUnit(), getNotationView())) {
-				figure.add(label = new Label("else"), new LabelLocator(figure, 10, 10));
-			}
  		}
  	}
-	
+
  	/*
  	 * Get the transformation unit which this link belong to.
  	 */
  	private TransformationUnit getTransformationUnit() {
-		
+
  		// Get the source node of this link:
  		View sourceNode = ((Edge) getNotationView()).getSource();
-		if (sourceNode==null) {
+		if (sourceNode == null) {
  			return null;
  		}
-		
+
  		// Get the compartment where the node is contained in:
  		View compartment = (View) sourceNode.eContainer();
-		if (compartment==null) {
+		if (compartment == null) {
  			return null;
  		}
-		
+
  		// Get the view of the transformation unit:
  		View unitView = (View) compartment.eContainer();
-		if (unitView==null) {
+		if (unitView == null) {
  			return null;
  		}
-		
+
  		// Now we can access the unit:
  		if (unitView.getElement() instanceof TransformationUnit) {
  			return (TransformationUnit) unitView.getElement();
@@ -143,7 +148,7 @@
  			return null;
  		}
  	}
-	
+
  	/*
  	 * Create an arrow decoration.
  	 */
@@ -158,25 +163,25 @@
  		df.setScale(getMapMode().DPtoLP(length), getMapMode().DPtoLP(width));
  		return df;
  	}
-	
+
  	/*
  	 * (non-Javadoc)
  	 * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#getCommand(org.eclipse.gef.Request)
  	 */
  	@Override
  	public Command getCommand(Request request) {
-		
+
  		// We forbid to delete or reconnect links:
  		Object type = request.getType();
-		if (RequestConstants.REQ_DELETE.equals(type) ||
-			RequestConstants.REQ_RECONNECT_SOURCE.equals(type) ||
-			RequestConstants.REQ_RECONNECT_TARGET.equals(type)) {
+		if (RequestConstants.REQ_DELETE.equals(type)
+				|| RequestConstants.REQ_RECONNECT_SOURCE.equals(type)
+				|| RequestConstants.REQ_RECONNECT_TARGET.equals(type)) {
  			return UnexecutableCommand.INSTANCE;
  		}
-		
+
  		// Everything else should be ok:
  		return super.getCommand(request);
-		
+
  	}

  	/**
@@ -252,12 +257,12 @@
  		}

  	}
-	
+
  	/*
  	 * Private label locator class.
  	 */
  	private class LabelLocator extends ConnectionLocator {
-		
+
  		// Distance from the mid point.
  		private int x, y;


Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/NodeEditPart.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/NodeEditPart.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/NodeEditPart.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -160,7 +160,7 @@
  		removeEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE);
  		installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE,
  				new NodeGraphicalEditPolicy());
-		
+
  		// Remove connection handles:
  		removeEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE);


Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/SymbolEditPart.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/SymbolEditPart.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/parts/SymbolEditPart.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -117,16 +117,13 @@
  	 */
  	protected IFigure createNodeShape() {
  		SymbolType symbol = SymbolType.get(getNotationView());
-		if (symbol==SymbolType.UNIT_BEGIN) {
+		if (symbol == SymbolType.UNIT_BEGIN) {
  			primaryShape = new SymbolCircleFigure(true);
-		}
-		else if (symbol==SymbolType.UNIT_END) {
+		} else if (symbol == SymbolType.UNIT_END) {
  			primaryShape = new SymbolCircleFigure(false);
-		}
-		else if (symbol==SymbolType.INDEPENDENT_CHOICE) {
+		} else if (symbol == SymbolType.INDEPENDENT_CHOICE) {
  			primaryShape = new IndependentChoiceSymbolFigure();
-		}
-		else {
+		} else {
  			primaryShape = new InvalidSymbolFigure();
  		}
  		return primaryShape;
@@ -138,7 +135,7 @@
  	 */
  	@Override
  	public Command getCommand(Request request) {
-		
+
  		// We forbid deletion of symbols, unless it is corrupt:
  		Object type = request.getType();
  		if (RequestConstants.REQ_DELETE.equals(type)
@@ -147,11 +144,11 @@
  		}

  		// We also forbid to reconnect links:
-		if (RequestConstants.REQ_RECONNECT_SOURCE.equals(type) ||
-			RequestConstants.REQ_RECONNECT_TARGET.equals(type)) {
+		if (RequestConstants.REQ_RECONNECT_SOURCE.equals(type)
+				|| RequestConstants.REQ_RECONNECT_TARGET.equals(type)) {
  			return UnexecutableCommand.INSTANCE;
  		}
-		
+
  		// Everything else is ok:
  		return super.getCommand(request);
  	}
@@ -160,8 +157,8 @@
  	 * Get the primary shape of this edit part.
  	 * @generated
  	 */
-	public IFigure getPrimaryShape() {
-		return primaryShape;
+	public SymbolCircleFigure getPrimaryShape() {
+		return (SymbolCircleFigure) primaryShape;
  	}

  	/**
@@ -294,15 +291,15 @@
  		}

  	}
-	
+
  	/*
  	 * A figure for independent choices.
  	 */
  	public class IndependentChoiceSymbolFigure extends Figure {
-		
+
  		public IndependentChoiceSymbolFigure() {
  		}
-		
+
  		/*
  		 * (non-Javadoc)
  		 * @see org.eclipse.draw2d.Figure#paint(org.eclipse.draw2d.Graphics)
@@ -317,10 +314,10 @@
  			Rectangle r = getBounds();

  			// We want to draw a diamond:
-			Point p1 = new Point(r.x, r.y + r.height/2);
-			Point p2 = new Point(r.x + r.width/2, r.y);
-			Point p3 = new Point(r.x + r.width - 1, r.y + r.height/2);
-			Point p4 = new Point(r.x + r.width/2, r.y + r.height - 1);
+			Point p1 = new Point(r.x, r.y + r.height / 2);
+			Point p2 = new Point(r.x + r.width / 2, r.y);
+			Point p3 = new Point(r.x + r.width - 1, r.y + r.height / 2);
+			Point p4 = new Point(r.x + r.width / 2, r.y + r.height - 1);

  			PointList pointList = new PointList();
  			pointList.addPoint(p1);
@@ -339,7 +336,6 @@

  		}

-
  	}
-	
+
  }

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies/InvocationItemSemanticEditPolicy.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies/InvocationItemSemanticEditPolicy.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies/InvocationItemSemanticEditPolicy.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -11,9 +11,13 @@
   */
  package org.eclipse.emf.henshin.diagram.edit.policies;

+import org.eclipse.emf.ecore.EAnnotation;
  import org.eclipse.emf.henshin.diagram.edit.commands.InvocationDeleteCommand;
  import org.eclipse.emf.henshin.diagram.providers.HenshinElementTypes;
  import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
  import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
  import org.eclipse.gmf.runtime.notation.View;

@@ -35,7 +39,8 @@
  	 */
  	protected Command getDestroyElementCommand(DestroyElementRequest req) {
  		View invocationView = (View) getHost().getModel();
-		return getGEFWrapper(new InvocationDeleteCommand(getEditingDomain(), invocationView));
+		return getGEFWrapper(new InvocationDeleteCommand(getEditingDomain(),
+				invocationView));
  	}

  }

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies/TransformationSystemItemSemanticEditPolicy.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies/TransformationSystemItemSemanticEditPolicy.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies/TransformationSystemItemSemanticEditPolicy.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -52,7 +52,7 @@
  	 * @generated NOT
  	 */
  	protected Command getCreateCommand(CreateElementRequest req) {
-		
+
  		// We need to override the default implementation because
  		// the unit create command needs a shell:
  		if (HenshinElementTypes.TransformationUnit_2002 == req.getElementType()) {

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies/UnitCompartmentCanonicalEditPolicy.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies/UnitCompartmentCanonicalEditPolicy.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/edit/policies/UnitCompartmentCanonicalEditPolicy.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -181,7 +181,7 @@

  		makeViewsImmutable(createdViews);
  	}
-	
+
  	/**
  	 * @generated NOT
  	 */
@@ -189,10 +189,12 @@
  	protected boolean shouldDeleteView(View view) {
  		if (String.valueOf(InvocationEditPart.VISUAL_ID).equals(view.getType())) {
  			View unitView = (View) view.eContainer();
-			if (view.getElement() instanceof TransformationUnit&&
-				unitView.getElement() instanceof TransformationUnit) {
-				TransformationUnit unit = (TransformationUnit) unitView.getElement();
-				TransformationUnit subUnit = (TransformationUnit) view.getElement();
+			if (view.getElement() instanceof TransformationUnit
+					&&  unitView.getElement() instanceof TransformationUnit) {
+				TransformationUnit unit = (TransformationUnit) unitView
+						.getElement();
+				TransformationUnit subUnit = (TransformationUnit) view
+						.getElement();
  				return !unit.getSubUnits(false).contains(subUnit);
  			}
  		}

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/navigator/HenshinNavigatorContentProvider.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/navigator/HenshinNavigatorContentProvider.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/navigator/HenshinNavigatorContentProvider.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -210,6 +210,9 @@
  					topViews.add((View) o);
  				}
  			}
+			result.addAll(createNavigatorItems(
+					selectViewsByType(topViews,
+							TransformationSystemEditPart.MODEL_ID), file, false));
  			return result.toArray();
  		}

@@ -235,33 +238,6 @@
  	private Object[] getViewChildren(View view, Object parentElement) {
  		switch (HenshinVisualIDRegistry.getVisualID(view)) {

-		case AttributeEditPart.VISUAL_ID: {
-			LinkedList<HenshinAbstractNavigatorItem>  result = new LinkedList<HenshinAbstractNavigatorItem>();
-			Node sv = (Node) view;
-			HenshinNavigatorGroup incominglinks = new HenshinNavigatorGroup(
-					Messages.NavigatorGroupName_Attribute_3002_incominglinks,
-					"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
-			HenshinNavigatorGroup outgoinglinks = new HenshinNavigatorGroup(
-					Messages.NavigatorGroupName_Attribute_3002_outgoinglinks,
-					"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
-			Collection<View>  connectedViews;
-			connectedViews = getIncomingLinksByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(LinkEditPart.VISUAL_ID));
-			incominglinks.addChildren(createNavigatorItems(connectedViews,
-					incominglinks, true));
-			connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(LinkEditPart.VISUAL_ID));
-			outgoinglinks.addChildren(createNavigatorItems(connectedViews,
-					outgoinglinks, true));
-			if (!incominglinks.isEmpty()) {
-				result.add(incominglinks);
-			}
-			if (!outgoinglinks.isEmpty()) {
-				result.add(outgoinglinks);
-			}
-			return result.toArray();
-		}
-
  		case EdgeEditPart.VISUAL_ID: {
  			LinkedList<HenshinAbstractNavigatorItem>  result = new LinkedList<HenshinAbstractNavigatorItem>();
  			Edge sv = (Edge) view;
@@ -289,24 +265,33 @@
  			return result.toArray();
  		}

-		case RuleEditPart.VISUAL_ID: {
+		case NodeEditPart.VISUAL_ID: {
  			LinkedList<HenshinAbstractNavigatorItem>  result = new LinkedList<HenshinAbstractNavigatorItem>();
  			Node sv = (Node) view;
  			HenshinNavigatorGroup incominglinks = new HenshinNavigatorGroup(
-					Messages.NavigatorGroupName_Rule_2001_incominglinks,
+					Messages.NavigatorGroupName_Node_3001_incominglinks,
  					"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
  			HenshinNavigatorGroup outgoinglinks = new HenshinNavigatorGroup(
-					Messages.NavigatorGroupName_Rule_2001_outgoinglinks,
+					Messages.NavigatorGroupName_Node_3001_outgoinglinks,
  					"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
  			Collection<View>  connectedViews;
  			connectedViews = getChildrenByType(Collections.singleton(sv),
  					HenshinVisualIDRegistry
-							.getType(RuleCompartmentEditPart.VISUAL_ID));
+							.getType(NodeCompartmentEditPart.VISUAL_ID));
  			connectedViews = getChildrenByType(connectedViews,
-					HenshinVisualIDRegistry.getType(NodeEditPart.VISUAL_ID));
+					HenshinVisualIDRegistry
+							.getType(AttributeEditPart.VISUAL_ID));
  			result.addAll(createNavigatorItems(connectedViews, parentElement,
  					false));
  			connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(EdgeEditPart.VISUAL_ID));
+			incominglinks.addChildren(createNavigatorItems(connectedViews,
+					incominglinks, true));
+			connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(EdgeEditPart.VISUAL_ID));
+			outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+					outgoinglinks, true));
+			connectedViews = getIncomingLinksByType(Collections.singleton(sv),
  					HenshinVisualIDRegistry.getType(LinkEditPart.VISUAL_ID));
  			incominglinks.addChildren(createNavigatorItems(connectedViews,
  					incominglinks, true));
@@ -323,73 +308,29 @@
  			return result.toArray();
  		}

-		case LinkEditPart.VISUAL_ID: {
+		case SymbolEditPart.VISUAL_ID: {
  			LinkedList<HenshinAbstractNavigatorItem>  result = new LinkedList<HenshinAbstractNavigatorItem>();
-			Edge sv = (Edge) view;
-			HenshinNavigatorGroup target = new HenshinNavigatorGroup(
-					Messages.NavigatorGroupName_Link_4002_target,
-					"icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
-			HenshinNavigatorGroup source = new HenshinNavigatorGroup(
-					Messages.NavigatorGroupName_Link_4002_source,
-					"icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+			Node sv = (Node) view;
+			HenshinNavigatorGroup incominglinks = new HenshinNavigatorGroup(
+					Messages.NavigatorGroupName_Node_3004_incominglinks,
+					"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+			HenshinNavigatorGroup outgoinglinks = new HenshinNavigatorGroup(
+					Messages.NavigatorGroupName_Node_3004_outgoinglinks,
+					"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
  			Collection<View>  connectedViews;
-			connectedViews = getLinksTargetByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(RuleEditPart.VISUAL_ID));
-			target.addChildren(createNavigatorItems(connectedViews, target,
-					true));
-			connectedViews = getLinksTargetByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(UnitEditPart.VISUAL_ID));
-			target.addChildren(createNavigatorItems(connectedViews, target,
-					true));
-			connectedViews = getLinksTargetByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(NodeEditPart.VISUAL_ID));
-			target.addChildren(createNavigatorItems(connectedViews, target,
-					true));
-			connectedViews = getLinksTargetByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry
-							.getType(AttributeEditPart.VISUAL_ID));
-			target.addChildren(createNavigatorItems(connectedViews, target,
-					true));
-			connectedViews = getLinksTargetByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(SymbolEditPart.VISUAL_ID));
-			target.addChildren(createNavigatorItems(connectedViews, target,
-					true));
-			connectedViews = getLinksTargetByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry
-							.getType(InvocationEditPart.VISUAL_ID));
-			target.addChildren(createNavigatorItems(connectedViews, target,
-					true));
-			connectedViews = getLinksSourceByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(RuleEditPart.VISUAL_ID));
-			source.addChildren(createNavigatorItems(connectedViews, source,
-					true));
-			connectedViews = getLinksSourceByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(UnitEditPart.VISUAL_ID));
-			source.addChildren(createNavigatorItems(connectedViews, source,
-					true));
-			connectedViews = getLinksSourceByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(NodeEditPart.VISUAL_ID));
-			source.addChildren(createNavigatorItems(connectedViews, source,
-					true));
-			connectedViews = getLinksSourceByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry
-							.getType(AttributeEditPart.VISUAL_ID));
-			source.addChildren(createNavigatorItems(connectedViews, source,
-					true));
-			connectedViews = getLinksSourceByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(SymbolEditPart.VISUAL_ID));
-			source.addChildren(createNavigatorItems(connectedViews, source,
-					true));
-			connectedViews = getLinksSourceByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry
-							.getType(InvocationEditPart.VISUAL_ID));
-			source.addChildren(createNavigatorItems(connectedViews, source,
-					true));
-			if (!target.isEmpty()) {
-				result.add(target);
+			connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(LinkEditPart.VISUAL_ID));
+			incominglinks.addChildren(createNavigatorItems(connectedViews,
+					incominglinks, true));
+			connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(LinkEditPart.VISUAL_ID));
+			outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+					outgoinglinks, true));
+			if (!incominglinks.isEmpty()) {
+				result.add(incominglinks);
  			}
-			if (!source.isEmpty()) {
-				result.add(source);
+			if (!outgoinglinks.isEmpty()) {
+				result.add(outgoinglinks);
  			}
  			return result.toArray();
  		}
@@ -448,6 +389,33 @@
  			return result.toArray();
  		}

+		case AttributeEditPart.VISUAL_ID: {
+			LinkedList<HenshinAbstractNavigatorItem>  result = new LinkedList<HenshinAbstractNavigatorItem>();
+			Node sv = (Node) view;
+			HenshinNavigatorGroup incominglinks = new HenshinNavigatorGroup(
+					Messages.NavigatorGroupName_Attribute_3002_incominglinks,
+					"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+			HenshinNavigatorGroup outgoinglinks = new HenshinNavigatorGroup(
+					Messages.NavigatorGroupName_Attribute_3002_outgoinglinks,
+					"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+			Collection<View>  connectedViews;
+			connectedViews = getIncomingLinksByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(LinkEditPart.VISUAL_ID));
+			incominglinks.addChildren(createNavigatorItems(connectedViews,
+					incominglinks, true));
+			connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(LinkEditPart.VISUAL_ID));
+			outgoinglinks.addChildren(createNavigatorItems(connectedViews,
+					outgoinglinks, true));
+			if (!incominglinks.isEmpty()) {
+				result.add(incominglinks);
+			}
+			if (!outgoinglinks.isEmpty()) {
+				result.add(outgoinglinks);
+			}
+			return result.toArray();
+		}
+
  		case UnitEditPart.VISUAL_ID: {
  			LinkedList<HenshinAbstractNavigatorItem>  result = new LinkedList<HenshinAbstractNavigatorItem>();
  			Node sv = (Node) view;
@@ -490,60 +458,95 @@
  			return result.toArray();
  		}

-		case SymbolEditPart.VISUAL_ID: {
+		case LinkEditPart.VISUAL_ID: {
  			LinkedList<HenshinAbstractNavigatorItem>  result = new LinkedList<HenshinAbstractNavigatorItem>();
-			Node sv = (Node) view;
-			HenshinNavigatorGroup incominglinks = new HenshinNavigatorGroup(
-					Messages.NavigatorGroupName_Node_3004_incominglinks,
-					"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
-			HenshinNavigatorGroup outgoinglinks = new HenshinNavigatorGroup(
-					Messages.NavigatorGroupName_Node_3004_outgoinglinks,
-					"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+			Edge sv = (Edge) view;
+			HenshinNavigatorGroup target = new HenshinNavigatorGroup(
+					Messages.NavigatorGroupName_Link_4002_target,
+					"icons/linkTargetNavigatorGroup.gif", parentElement); //$NON-NLS-1$
+			HenshinNavigatorGroup source = new HenshinNavigatorGroup(
+					Messages.NavigatorGroupName_Link_4002_source,
+					"icons/linkSourceNavigatorGroup.gif", parentElement); //$NON-NLS-1$
  			Collection<View>  connectedViews;
-			connectedViews = getIncomingLinksByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(LinkEditPart.VISUAL_ID));
-			incominglinks.addChildren(createNavigatorItems(connectedViews,
-					incominglinks, true));
-			connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(LinkEditPart.VISUAL_ID));
-			outgoinglinks.addChildren(createNavigatorItems(connectedViews,
-					outgoinglinks, true));
-			if (!incominglinks.isEmpty()) {
-				result.add(incominglinks);
+			connectedViews = getLinksTargetByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(RuleEditPart.VISUAL_ID));
+			target.addChildren(createNavigatorItems(connectedViews, target,
+					true));
+			connectedViews = getLinksTargetByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(UnitEditPart.VISUAL_ID));
+			target.addChildren(createNavigatorItems(connectedViews, target,
+					true));
+			connectedViews = getLinksTargetByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(NodeEditPart.VISUAL_ID));
+			target.addChildren(createNavigatorItems(connectedViews, target,
+					true));
+			connectedViews = getLinksTargetByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry
+							.getType(AttributeEditPart.VISUAL_ID));
+			target.addChildren(createNavigatorItems(connectedViews, target,
+					true));
+			connectedViews = getLinksTargetByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(SymbolEditPart.VISUAL_ID));
+			target.addChildren(createNavigatorItems(connectedViews, target,
+					true));
+			connectedViews = getLinksTargetByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry
+							.getType(InvocationEditPart.VISUAL_ID));
+			target.addChildren(createNavigatorItems(connectedViews, target,
+					true));
+			connectedViews = getLinksSourceByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(RuleEditPart.VISUAL_ID));
+			source.addChildren(createNavigatorItems(connectedViews, source,
+					true));
+			connectedViews = getLinksSourceByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(UnitEditPart.VISUAL_ID));
+			source.addChildren(createNavigatorItems(connectedViews, source,
+					true));
+			connectedViews = getLinksSourceByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(NodeEditPart.VISUAL_ID));
+			source.addChildren(createNavigatorItems(connectedViews, source,
+					true));
+			connectedViews = getLinksSourceByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry
+							.getType(AttributeEditPart.VISUAL_ID));
+			source.addChildren(createNavigatorItems(connectedViews, source,
+					true));
+			connectedViews = getLinksSourceByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry.getType(SymbolEditPart.VISUAL_ID));
+			source.addChildren(createNavigatorItems(connectedViews, source,
+					true));
+			connectedViews = getLinksSourceByType(Collections.singleton(sv),
+					HenshinVisualIDRegistry
+							.getType(InvocationEditPart.VISUAL_ID));
+			source.addChildren(createNavigatorItems(connectedViews, source,
+					true));
+			if (!target.isEmpty()) {
+				result.add(target);
  			}
-			if (!outgoinglinks.isEmpty()) {
-				result.add(outgoinglinks);
+			if (!source.isEmpty()) {
+				result.add(source);
  			}
  			return result.toArray();
  		}

-		case NodeEditPart.VISUAL_ID: {
+		case RuleEditPart.VISUAL_ID: {
  			LinkedList<HenshinAbstractNavigatorItem>  result = new LinkedList<HenshinAbstractNavigatorItem>();
  			Node sv = (Node) view;
  			HenshinNavigatorGroup incominglinks = new HenshinNavigatorGroup(
-					Messages.NavigatorGroupName_Node_3001_incominglinks,
+					Messages.NavigatorGroupName_Rule_2001_incominglinks,
  					"icons/incomingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
  			HenshinNavigatorGroup outgoinglinks = new HenshinNavigatorGroup(
-					Messages.NavigatorGroupName_Node_3001_outgoinglinks,
+					Messages.NavigatorGroupName_Rule_2001_outgoinglinks,
  					"icons/outgoingLinksNavigatorGroup.gif", parentElement); //$NON-NLS-1$
  			Collection<View>  connectedViews;
  			connectedViews = getChildrenByType(Collections.singleton(sv),
  					HenshinVisualIDRegistry
-							.getType(NodeCompartmentEditPart.VISUAL_ID));
+							.getType(RuleCompartmentEditPart.VISUAL_ID));
  			connectedViews = getChildrenByType(connectedViews,
-					HenshinVisualIDRegistry
-							.getType(AttributeEditPart.VISUAL_ID));
+					HenshinVisualIDRegistry.getType(NodeEditPart.VISUAL_ID));
  			result.addAll(createNavigatorItems(connectedViews, parentElement,
  					false));
  			connectedViews = getIncomingLinksByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(EdgeEditPart.VISUAL_ID));
-			incominglinks.addChildren(createNavigatorItems(connectedViews,
-					incominglinks, true));
-			connectedViews = getOutgoingLinksByType(Collections.singleton(sv),
-					HenshinVisualIDRegistry.getType(EdgeEditPart.VISUAL_ID));
-			outgoinglinks.addChildren(createNavigatorItems(connectedViews,
-					outgoinglinks, true));
-			connectedViews = getIncomingLinksByType(Collections.singleton(sv),
  					HenshinVisualIDRegistry.getType(LinkEditPart.VISUAL_ID));
  			incominglinks.addChildren(createNavigatorItems(connectedViews,
  					incominglinks, true));

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/navigator/HenshinNavigatorLabelProvider.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/navigator/HenshinNavigatorLabelProvider.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/navigator/HenshinNavigatorLabelProvider.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -18,6 +18,7 @@
  import org.eclipse.emf.henshin.diagram.edit.parts.EdgeEditPart;
  import org.eclipse.emf.henshin.diagram.edit.parts.EdgeTypeEditPart;
  import org.eclipse.emf.henshin.diagram.edit.parts.InvocationEditPart;
+import org.eclipse.emf.henshin.diagram.edit.parts.InvocationNameEditPart;
  import org.eclipse.emf.henshin.diagram.edit.parts.LinkEditPart;
  import org.eclipse.emf.henshin.diagram.edit.parts.NodeEditPart;
  import org.eclipse.emf.henshin.diagram.edit.parts.NodeTypeEditPart;
@@ -122,30 +123,33 @@
  	 */
  	public Image getImage(View view) {
  		switch (HenshinVisualIDRegistry.getVisualID(view)) {
+		case EdgeEditPart.VISUAL_ID:
+			return getImage(
+					"Navigator?Link?http://www.eclipse.org/emf/2011/Henshin?Edge";, HenshinElementTypes.Edge_4001); //$NON-NLS-1$
  		case NodeEditPart.VISUAL_ID:
  			return getImage(
-					"Navigator?Node?http://www.eclipse.org/emf/2010/Henshin?Node";, HenshinElementTypes.Node_3001); //$NON-NLS-1$
-		case LinkEditPart.VISUAL_ID:
-			return getImage(
-					"Navigator?Link?LinkFigure", HenshinElementTypes.Link_4002); //$NON-NLS-1$
+					"Navigator?Node?http://www.eclipse.org/emf/2011/Henshin?Node";, HenshinElementTypes.Node_3001); //$NON-NLS-1$
  		case SymbolEditPart.VISUAL_ID:
  			return getImage(
-					"Navigator?Node?http://www.eclipse.org/emf/2010/Henshin?TransformationUnit";, HenshinElementTypes.TransformationUnit_3003); //$NON-NLS-1$
-		case RuleEditPart.VISUAL_ID:
+					"Navigator?Node?SymbolCircleFigure", HenshinElementTypes.Node_3004); //$NON-NLS-1$
+		case TransformationSystemEditPart.VISUAL_ID:
  			return getImage(
-					"Navigator?TopLevelNode?http://www.eclipse.org/emf/2010/Henshin?Rule";, HenshinElementTypes.Rule_2001); //$NON-NLS-1$
+					"Navigator?Diagram?http://www.eclipse.org/emf/2011/Henshin?TransformationSystem";, HenshinElementTypes.TransformationSystem_1000); //$NON-NLS-1$
+		case InvocationEditPart.VISUAL_ID:
+			return getImage(
+					"Navigator?Node?http://www.eclipse.org/emf/2011/Henshin?TransformationUnit";, HenshinElementTypes.TransformationUnit_3003); //$NON-NLS-1$
  		case AttributeEditPart.VISUAL_ID:
  			return getImage(
-					"Navigator?Node?http://www.eclipse.org/emf/2010/Henshin?Attribute";, HenshinElementTypes.Attribute_3002); //$NON-NLS-1$
+					"Navigator?Node?http://www.eclipse.org/emf/2011/Henshin?Attribute";, HenshinElementTypes.Attribute_3002); //$NON-NLS-1$
  		case UnitEditPart.VISUAL_ID:
  			return getImage(
-					"Navigator?TopLevelNode?http://www.eclipse.org/emf/2010/Henshin?TransformationUnit";, HenshinElementTypes.TransformationUnit_2002); //$NON-NLS-1$
-		case EdgeEditPart.VISUAL_ID:
+					"Navigator?TopLevelNode?http://www.eclipse.org/emf/2011/Henshin?TransformationUnit";, HenshinElementTypes.TransformationUnit_2002); //$NON-NLS-1$
+		case LinkEditPart.VISUAL_ID:
  			return getImage(
-					"Navigator?Link?http://www.eclipse.org/emf/2010/Henshin?Edge";, HenshinElementTypes.Edge_4001); //$NON-NLS-1$
-		case TransformationSystemEditPart.VISUAL_ID:
+					"Navigator?Link?LinkFigure", HenshinElementTypes.Link_4002); //$NON-NLS-1$
+		case RuleEditPart.VISUAL_ID:
  			return getImage(
-					"Navigator?Diagram?http://www.eclipse.org/emf/2010/Henshin?TransformationSystem";, HenshinElementTypes.TransformationSystem_1000); //$NON-NLS-1$
+					"Navigator?TopLevelNode?http://www.eclipse.org/emf/2011/Henshin?Rule";, HenshinElementTypes.Rule_2001); //$NON-NLS-1$
  		}
  		return getImage("Navigator?UnknownElement", null); //$NON-NLS-1$
  	}
@@ -295,13 +299,18 @@
  	 * @generated
  	 */
  	private String getTransformationUnit_3003Text(View view) {
-		TransformationUnit domainModelElement = (TransformationUnit) view
-				.getElement();
-		if (domainModelElement != null) {
-			return domainModelElement.getName();
+		IParser parser = HenshinParserProvider.getParser(
+				HenshinElementTypes.TransformationUnit_3003,
+				view.getElement() != null ? view.getElement() : view,
+				HenshinVisualIDRegistry
+						.getType(InvocationNameEditPart.VISUAL_ID));
+		if (parser != null) {
+			return parser.getPrintString(new EObjectAdapter(
+					view.getElement() != null ? view.getElement() : view),
+					ParserOptions.NONE.intValue());
  		} else {
  			HenshinDiagramEditorPlugin.getInstance().logError(
-					"No domain element for view with visualID = " + 3003); //$NON-NLS-1$
+					"Parser was not found for label " + 5005); //$NON-NLS-1$
  			return ""; //$NON-NLS-1$
  		}
  	}
@@ -309,16 +318,8 @@
  	/**
  	 * @generated
  	 */
-	private String getTransformationUnit_3004Text(View view) {
-		TransformationUnit domainModelElement = (TransformationUnit) view
-				.getElement();
-		if (domainModelElement != null) {
-			return domainModelElement.getName();
-		} else {
-			HenshinDiagramEditorPlugin.getInstance().logError(
-					"No domain element for view with visualID = " + 3004); //$NON-NLS-1$
-			return ""; //$NON-NLS-1$
-		}
+	private String getNode_3004Text(View view) {
+		return ""; //$NON-NLS-1$
  	}

  	/**
@@ -415,14 +416,14 @@
  			if (isOwnView(item.getView())) {
  				View view = item.getView();
  				if (view.getElement() instanceof Node) {
-					Action action = HenshinActionHelper
-							.getAction((Node) view.getElement());
+					Action action = HenshinActionHelper.getAction((Node) view
+							.getElement());
  					if (action != null)
  						return ActionColorProvider.getColor(action);
  				}
  				if (view.getElement() instanceof Edge) {
-					Action action = HenshinActionHelper
-							.getAction((Edge) view.getElement());
+					Action action = HenshinActionHelper.getAction((Edge) view
+							.getElement());
  					if (action != null)
  						return ActionColorProvider.getColor(action);
  				}

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinDiagramEditor.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinDiagramEditor.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinDiagramEditor.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -95,18 +95,20 @@
  	 * @generated NOT
  	 */
  	@Override
-	public void init(final IEditorSite site, final IEditorInput input) throws PartInitException {
+	public void init(final IEditorSite site, final IEditorInput input)
+			throws PartInitException {
  		super.init(site, input);
-		
+
  		// Collect all packages which cannot be resolved:
-		TransformationSystem system = (TransformationSystem) getDiagram().getElement();
+		TransformationSystem system = (TransformationSystem) getDiagram()
+				.getElement();
  		List<EPackage>  unresolved = new ArrayList<EPackage>();
  		for (EPackage epackage : system.getImports()) {
  			if (epackage.eIsProxy()) {
  				unresolved.add(epackage);
  			}
  		}
-		
+
  		// Throwing a PartInitException at this point seems to cause problem.
  		// So we just display an error message but throw no exception.
  		if (!unresolved.isEmpty()) {
@@ -114,12 +116,14 @@
  			for (EPackage epackage : unresolved) {
  				message = message + "  -  " + EcoreUtil.getURI(epackage) + "\n";
  			}
-			message = message + "\nIf no generated model code exists for these packages, try to register their " +
-					"corresponding Ecore-files from the context menu using \"Henshin->Register EPackages\".";
-			MessageDialog.openError(getSite().getShell(), "Error opening Henshin file", message);
+			message = message
+					+ "\nIf no generated model code exists for these packages, try to register their "
+					+ "corresponding Ecore-files from the context menu using \"Henshin->Register EPackages\".";
+			MessageDialog.openError(getSite().getShell(),
+					"Error opening Henshin file", message);
  		}
  	}
-	
+
  	/**
  	 * @generated NOT
  	 */

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinDiagramUpdater.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinDiagramUpdater.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinDiagramUpdater.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -85,8 +85,7 @@

  		// Collect all action nodes:
  		Rule rule = (Rule) containerView.getElement();
-		List<Node>  actionNodes = HenshinActionHelper.getActionNodes(
-				rule, null);
+		List<Node>  actionNodes = HenshinActionHelper.getActionNodes(rule, null);

  		// Check if we should exclude a root object:
  		Node root = RootObjectEditHelper.getRootObject(containerView);
@@ -126,8 +125,8 @@

  		// Get the node and compute the action attributes:
  		Node node = (Node) containerView.getElement();
-		List<Attribute>  attributes = HenshinActionHelper
-				.getActionAttributes(node, null);
+		List<Attribute>  attributes = HenshinActionHelper.getActionAttributes(
+				node, null);

  		// Wrap them into node descriptors:
  		List<HenshinNodeDescriptor>  result = new LinkedList<HenshinNodeDescriptor>();
@@ -139,7 +138,7 @@
  				continue;
  			}
  		}
-		
+
  		// Done.
  		return result;
  	}
@@ -205,7 +204,8 @@
  		// Iterate over all transformation units:
  		for (TransformationUnit unit : system.getTransformationUnits()) {
  			int visualID = HenshinVisualIDRegistry.getNodeVisualID(view, unit);
-			if (visualID == UnitEditPart.VISUAL_ID || visualID == RuleEditPart.VISUAL_ID) {
+			if (visualID == UnitEditPart.VISUAL_ID
+					|| visualID == RuleEditPart.VISUAL_ID) {
  				result.add(new HenshinNodeDescriptor(unit, visualID));
  			}
  		}
@@ -296,8 +296,7 @@

  		// Get the action edges:
  		Rule rule = (Rule) view.getElement();
-		List<Edge>  edges = HenshinActionHelper.getActionEdges(rule,
-				null);
+		List<Edge>  edges = HenshinActionHelper.getActionEdges(rule, null);

  		// Check if we should exclude a root object:
  		Node root = RootObjectEditHelper.getRootObject(view);
@@ -307,10 +306,8 @@
  		for (Edge edge : edges) {

  			// Get the proper source / target action nodes:
-			Node source = HenshinActionHelper.getActionNode(edge
-					.getSource());
-			Node target = HenshinActionHelper.getActionNode(edge
-					.getTarget());
+			Node source = HenshinActionHelper.getActionNode(edge.getSource());
+			Node target = HenshinActionHelper.getActionNode(edge.getTarget());

  			// Create the descriptor if the edge does not link to the root:
  			if (source != root&&  target != root) {
@@ -328,13 +325,13 @@
  	 */
  	public static List<HenshinLinkDescriptor>  getTransformationUnit_2002ContainedLinks(
  			View view) {
-		
+
  		// Ideally, we want to return a list of all expected links
  		// inside the unit view here. Since this is not really nice
  		// to implement, we update the links only when something
  		// changed or when the unit view is being created.
  		return Collections.emptyList();
-		
+
  	}

  	/**
@@ -541,5 +538,5 @@
  		}
  		return result;
  	}
-	
+
  }

Deleted: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinPaletteFactory.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinPaletteFactory.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinPaletteFactory.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -1,250 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 CWI Amsterdam, Technical University Berlin,
- * Philipps-University Marburg 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:
- *     CWI Amsterdam - initial API and implementation
- *******************************************************************************/
-package org.eclipse.emf.henshin.diagram.part;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.henshin.diagram.providers.HenshinElementTypes;
-import org.eclipse.gef.Tool;
-import org.eclipse.gef.palette.PaletteContainer;
-import org.eclipse.gef.palette.PaletteGroup;
-import org.eclipse.gef.palette.PaletteRoot;
-import org.eclipse.gef.palette.PaletteSeparator;
-import org.eclipse.gef.palette.ToolEntry;
-import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeConnectionTool;
-import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeCreationTool;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-
-/**
- * @generated
- */
-public class HenshinPaletteFactory {
-
-	/**
-	 * @generated
-	 */
-	public void fillPalette(PaletteRoot paletteRoot) {
-		paletteRoot.add(createHenshin1Group());
-	}
-
-	/**
-	 * Creates "Henshin" palette tool group
-	 * @generated NOT
-	 */
-	private PaletteContainer createHenshin1Group() {
-		
-		// Main palette group:
-		PaletteGroup paletteContainer = new PaletteGroup(
-				Messages.Henshin1Group_title);
-		paletteContainer.setId("createHenshin1Group"); //$NON-NLS-1$
-		
-		// Rules:
-		paletteContainer.add(createRule1CreationTool());
-		paletteContainer.add(createNodeCreationTool());
-		paletteContainer.add(createEdge2CreationTool());
-		paletteContainer.add(createAttribute3CreationTool());
-		
-		paletteContainer.add(new PaletteSeparator());
-		
-		// Transformation units:
-		paletteContainer.add(createUnit5CreationTool());
-		paletteContainer.add(createInvocation6CreationTool());
-		
-		return paletteContainer;
-	}
-
-	/**
-	 * @generated
-	 */
-	private ToolEntry createNodeCreationToolGen() {
-		NodeToolEntry entry = new NodeToolEntry(Messages.NodeCreationTool_title,
-				Messages.NodeCreationTool_desc,
-				Collections.singletonList(HenshinElementTypes.Node_3001));
-		entry.setId("createNodeCreationTool"); //$NON-NLS-1$
-		entry.setSmallIcon(HenshinElementTypes.getImageDescriptor(HenshinElementTypes.Node_3001));
-		entry.setLargeIcon(entry.getSmallIcon());
-		return entry;
-	}
-
-	/**
-	 * @generated NOT
-	 */
-	private ToolEntry createNodeCreationTool() {
-		// Override the default image:
-		NodeToolEntry entry = (NodeToolEntry) createNodeCreationToolGen();
-		entry.setSmallIcon(HenshinDiagramEditorPlugin
-				.getBundledImageDescriptor("icons/obj16/Node.png"));
-		entry.setLargeIcon(entry.getSmallIcon());
-		return entry;
-	}
-
-	/**
-	 * @generated
-	 */
-	private ToolEntry createRule1CreationTool() {
-		NodeToolEntry entry = new NodeToolEntry(
-				Messages.Rule1CreationTool_title,
-				Messages.Rule1CreationTool_desc,
-				Collections.singletonList(HenshinElementTypes.Rule_2001));
-		entry.setId("createRule1CreationTool"); //$NON-NLS-1$
-		entry.setSmallIcon(HenshinElementTypes
-				.getImageDescriptor(HenshinElementTypes.Rule_2001));
-		entry.setLargeIcon(entry.getSmallIcon());
-		return entry;
-	}
-
-	/**
-	 * @generated
-	 */
-	private ToolEntry createEdge2CreationTool() {
-		LinkToolEntry entry = new LinkToolEntry(
-				Messages.Edge2CreationTool_title,
-				Messages.Edge2CreationTool_desc,
-				Collections.singletonList(HenshinElementTypes.Edge_4001));
-		entry.setId("createEdge2CreationTool"); //$NON-NLS-1$
-		entry.setSmallIcon(HenshinElementTypes
-				.getImageDescriptor(HenshinElementTypes.Edge_4001));
-		entry.setLargeIcon(entry.getSmallIcon());
-		return entry;
-	}
-
-	/**
-	 * @generated
-	 */
-	private ToolEntry createAttribute3CreationTool() {
-		NodeToolEntry entry = new NodeToolEntry(
-				Messages.Attribute3CreationTool_title,
-				Messages.Attribute3CreationTool_desc,
-				Collections.singletonList(HenshinElementTypes.Attribute_3002));
-		entry.setId("createAttribute3CreationTool"); //$NON-NLS-1$
-		entry.setSmallIcon(HenshinElementTypes
-				.getImageDescriptor(HenshinElementTypes.Attribute_3002));
-		entry.setLargeIcon(entry.getSmallIcon());
-		return entry;
-	}
-
-	/**
-	 * @generated
-	 */
-	private ToolEntry createUnit5CreationToolGen() {
-		NodeToolEntry entry = new NodeToolEntry(
-				Messages.Unit5CreationTool_title,
-				Messages.Unit5CreationTool_desc,
-				Collections
-						.singletonList(HenshinElementTypes.TransformationUnit_2002));
-		entry.setId("createUnit5CreationTool"); //$NON-NLS-1$
-		entry.setSmallIcon(HenshinElementTypes
-				.getImageDescriptor(HenshinElementTypes.TransformationUnit_2002));
-		entry.setLargeIcon(entry.getSmallIcon());
-		return entry;
-	}
-
-	/**
-	 * @generated NOT
-	 */
-	private ToolEntry createUnit5CreationTool() {
-		// Override the default image:
-		NodeToolEntry entry = (NodeToolEntry) createUnit5CreationToolGen();
-		entry.setSmallIcon(HenshinDiagramEditorPlugin
-				.getBundledImageDescriptor("icons/obj16/Unit.png"));
-		entry.setLargeIcon(entry.getSmallIcon());
-		return entry;
-	}
-
-	/**
-	 * @generated
-	 */
-	private ToolEntry createInvocation6CreationToolGen() {
-		NodeToolEntry entry = new NodeToolEntry(
-				Messages.Invocation6CreationTool_title,
-				Messages.Invocation6CreationTool_desc,
-				Collections
-						.singletonList(HenshinElementTypes.TransformationUnit_3003));
-		entry.setId("createInvocation6CreationTool"); //$NON-NLS-1$
-		entry.setSmallIcon(HenshinElementTypes
-				.getImageDescriptor(HenshinElementTypes.TransformationUnit_3003));
-		entry.setLargeIcon(entry.getSmallIcon());
-		return entry;
-	}
-
-	/**
-	 * @generated NOT
-	 */
-	private ToolEntry createInvocation6CreationTool() {
-		// Override the default image:
-		NodeToolEntry entry = (NodeToolEntry) createInvocation6CreationToolGen();
-		entry.setSmallIcon(HenshinDiagramEditorPlugin
-				.getBundledImageDescriptor("icons/obj16/Invocation.png"));
-		entry.setLargeIcon(entry.getSmallIcon());
-		return entry;
-	}
-
-	/**
-	 * @generated
-	 */
-	private static class NodeToolEntry extends ToolEntry {
-
-		/**
-		 * @generated
-		 */
-		private final List<IElementType>  elementTypes;
-
-		/**
-		 * @generated
-		 */
-		private NodeToolEntry(String title, String description,
-				List<IElementType>  elementTypes) {
-			super(title, description, null, null);
-			this.elementTypes = elementTypes;
-		}
-
-		/**
-		 * @generated
-		 */
-		public Tool createTool() {
-			Tool tool = new UnspecifiedTypeCreationTool(elementTypes);
-			tool.setProperties(getToolProperties());
-			return tool;
-		}
-	}
-
-	/**
-	 * @generated
-	 */
-	private static class LinkToolEntry extends ToolEntry {
-
-		/**
-		 * @generated
-		 */
-		private final List<IElementType>  relationshipTypes;
-
-		/**
-		 * @generated
-		 */
-		private LinkToolEntry(String title, String description,
-				List<IElementType>  relationshipTypes) {
-			super(title, description, null, null);
-			this.relationshipTypes = relationshipTypes;
-		}
-
-		/**
-		 * @generated
-		 */
-		public Tool createTool() {
-			Tool tool = new UnspecifiedTypeConnectionTool(relationshipTypes);
-			tool.setProperties(getToolProperties());
-			return tool;
-		}
-	}
-	
-}

Copied: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinPaletteFactory.java (from rev 1376, trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinPaletteFactory.java)
===================================================================
--- branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinPaletteFactory.java	                        (rev 0)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/HenshinPaletteFactory.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -0,0 +1,241 @@
+/*******************************************************************************
+ * Copyright (c) 2010 CWI Amsterdam, Technical University Berlin,
+ * Philipps-University Marburg 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:
+ *     CWI Amsterdam - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.henshin.diagram.part;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.henshin.diagram.providers.HenshinElementTypes;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.palette.PaletteContainer;
+import org.eclipse.gef.palette.PaletteGroup;
+import org.eclipse.gef.palette.PaletteRoot;
+import org.eclipse.gef.palette.PaletteSeparator;
+import org.eclipse.gef.palette.ToolEntry;
+import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeConnectionTool;
+import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeCreationTool;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
+/**
+ * @generated
+ */
+public class HenshinPaletteFactory {
+
+	/**
+	 * @generated
+	 */
+	public void fillPalette(PaletteRoot paletteRoot) {
+		paletteRoot.add(createHenshin1Group());
+	}
+
+	/**
+	 * Creates "Henshin" palette tool group
+	 * @generated NOT
+	 */
+	private PaletteContainer createHenshin1Group() {
+
+		// Main palette group:
+		PaletteGroup paletteContainer = new PaletteGroup(
+				Messages.Henshin1Group_title);
+		paletteContainer.setId("createHenshin1Group"); //$NON-NLS-1$
+
+		// Rules:
+		paletteContainer.add(createRule1CreationTool());
+		paletteContainer.add(createNodeCreationTool());
+		paletteContainer.add(createEdge2CreationTool());
+		paletteContainer.add(createAttribute3CreationTool());
+
+		paletteContainer.add(new PaletteSeparator());
+
+		// Transformation units:
+		paletteContainer.add(createUnit5CreationTool());
+		paletteContainer.add(createInvocation6CreationTool());
+
+		return paletteContainer;
+	}
+
+	/**
+	 * @generated NOT
+	 */
+	private ToolEntry createNodeCreationTool() {
+		// Override the default image:
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.NodeCreationTool_title,
+				Messages.NodeCreationTool_desc,
+				Collections.singletonList(HenshinElementTypes.Node_3001));
+		entry.setId("createNodeCreationTool"); //$NON-NLS-1$
+		entry.setSmallIcon(HenshinDiagramEditorPlugin
+				.getBundledImageDescriptor("icons/obj16/Node.png"));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createRule1CreationTool() {
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Rule1CreationTool_title,
+				Messages.Rule1CreationTool_desc,
+				Collections.singletonList(HenshinElementTypes.Rule_2001));
+		entry.setId("createRule1CreationTool"); //$NON-NLS-1$
+		entry.setSmallIcon(HenshinElementTypes
+				.getImageDescriptor(HenshinElementTypes.Rule_2001));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createEdge2CreationTool() {
+		LinkToolEntry entry = new LinkToolEntry(
+				Messages.Edge2CreationTool_title,
+				Messages.Edge2CreationTool_desc,
+				Collections.singletonList(HenshinElementTypes.Edge_4001));
+		entry.setId("createEdge2CreationTool"); //$NON-NLS-1$
+		entry.setSmallIcon(HenshinElementTypes
+				.getImageDescriptor(HenshinElementTypes.Edge_4001));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createAttribute3CreationTool() {
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Attribute3CreationTool_title,
+				Messages.Attribute3CreationTool_desc,
+				Collections.singletonList(HenshinElementTypes.Attribute_3002));
+		entry.setId("createAttribute3CreationTool"); //$NON-NLS-1$
+		entry.setSmallIcon(HenshinElementTypes
+				.getImageDescriptor(HenshinElementTypes.Attribute_3002));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createUnit5CreationToolGen() {
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Unit5CreationTool_title,
+				Messages.Unit5CreationTool_desc,
+				Collections
+						.singletonList(HenshinElementTypes.TransformationUnit_2002));
+		entry.setId("createUnit5CreationTool"); //$NON-NLS-1$
+		entry.setSmallIcon(HenshinElementTypes
+				.getImageDescriptor(HenshinElementTypes.TransformationUnit_2002));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated NOT
+	 */
+	private ToolEntry createUnit5CreationTool() {
+		// Override the default image:
+		NodeToolEntry entry = (NodeToolEntry) createUnit5CreationToolGen();
+		entry.setSmallIcon(HenshinDiagramEditorPlugin
+				.getBundledImageDescriptor("icons/obj16/Unit.png"));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createInvocation6CreationToolGen() {
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Invocation6CreationTool_title,
+				Messages.Invocation6CreationTool_desc,
+				Collections
+						.singletonList(HenshinElementTypes.TransformationUnit_3003));
+		entry.setId("createInvocation6CreationTool"); //$NON-NLS-1$
+		entry.setSmallIcon(HenshinElementTypes
+				.getImageDescriptor(HenshinElementTypes.TransformationUnit_3003));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated NOT
+	 */
+	private ToolEntry createInvocation6CreationTool() {
+		// Override the default image:
+		NodeToolEntry entry = (NodeToolEntry) createInvocation6CreationToolGen();
+		entry.setSmallIcon(HenshinDiagramEditorPlugin
+				.getBundledImageDescriptor("icons/obj16/Invocation.png"));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private static class NodeToolEntry extends ToolEntry {
+
+		/**
+		 * @generated
+		 */
+		private final List<IElementType>  elementTypes;
+
+		/**
+		 * @generated
+		 */
+		private NodeToolEntry(String title, String description,
+				List<IElementType>  elementTypes) {
+			super(title, description, null, null);
+			this.elementTypes = elementTypes;
+		}
+
+		/**
+		 * @generated
+		 */
+		public Tool createTool() {
+			Tool tool = new UnspecifiedTypeCreationTool(elementTypes);
+			tool.setProperties(getToolProperties());
+			return tool;
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	private static class LinkToolEntry extends ToolEntry {
+
+		/**
+		 * @generated
+		 */
+		private final List<IElementType>  relationshipTypes;
+
+		/**
+		 * @generated
+		 */
+		private LinkToolEntry(String title, String description,
+				List<IElementType>  relationshipTypes) {
+			super(title, description, null, null);
+			this.relationshipTypes = relationshipTypes;
+		}
+
+		/**
+		 * @generated
+		 */
+		public Tool createTool() {
+			Tool tool = new UnspecifiedTypeConnectionTool(relationshipTypes);
+			tool.setProperties(getToolProperties());
+			return tool;
+		}
+	}
+
+}

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/Messages.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/Messages.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/part/Messages.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -17,444 +17,442 @@
   * @generated
   */
  public class Messages extends NLS {
-	
+
  	/**
  	 * @generated
  	 */
  	static {
  		NLS.initializeMessages("messages", Messages.class); //$NON-NLS-1$
  	}
-	
+
  	/**
  	 * @generated
  	 */
  	private Messages() {
  	}
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinCreationWizardTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinCreationWizard_DiagramModelFilePageTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinCreationWizard_DiagramModelFilePageDescription;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinCreationWizard_DomainModelFilePageTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinCreationWizard_DomainModelFilePageDescription;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinCreationWizardOpenEditorError;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinCreationWizardCreationError;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinCreationWizardPageExtensionError;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDiagramEditorUtil_OpenModelResourceErrorDialogTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDiagramEditorUtil_OpenModelResourceErrorDialogMessage;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDiagramEditorUtil_CreateDiagramProgressTask;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDiagramEditorUtil_CreateDiagramCommandLabel;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDocumentProvider_isModifiable;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDocumentProvider_handleElementContentChanged;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDocumentProvider_IncorrectInputError;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDocumentProvider_NoDiagramInResourceError;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDocumentProvider_DiagramLoadingError;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDocumentProvider_UnsynchronizedFileSaveError;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDocumentProvider_SaveDiagramTask;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDocumentProvider_SaveNextResourceTask;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDocumentProvider_SaveAsOperation;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String InitDiagramFile_ResourceErrorDialogTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String InitDiagramFile_ResourceErrorDialogMessage;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String InitDiagramFile_WizardTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String InitDiagramFile_OpenModelFileDialogTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinNewDiagramFileWizard_CreationPageName;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinNewDiagramFileWizard_CreationPageTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinNewDiagramFileWizard_CreationPageDescription;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinNewDiagramFileWizard_RootSelectionPageName;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinNewDiagramFileWizard_RootSelectionPageTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinNewDiagramFileWizard_RootSelectionPageDescription;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinNewDiagramFileWizard_RootSelectionPageSelectionTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinNewDiagramFileWizard_RootSelectionPageNoSelectionMessage;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinNewDiagramFileWizard_RootSelectionPageInvalidSelectionMessage;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinNewDiagramFileWizard_InitDiagramCommand;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinNewDiagramFileWizard_IncorrectRootError;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDiagramEditor_SavingDeletedFile;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDiagramEditor_SaveAsErrorTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDiagramEditor_SaveAsErrorMessage;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDiagramEditor_SaveErrorTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinDiagramEditor_SaveErrorMessage;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinElementChooserDialog_SelectModelElementTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String ModelElementSelectionPageMessage;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String ValidateActionMessage;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String Henshin1Group_title;
-	
+
  	public static String NodeCreationTool_title;
-	
+
  	public static String NodeCreationTool_desc;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String Rule1CreationTool_title;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String Rule1CreationTool_desc;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String Edge2CreationTool_title;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String Edge2CreationTool_desc;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String Attribute3CreationTool_title;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String Attribute3CreationTool_desc;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String Unit5CreationTool_title;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String Unit5CreationTool_desc;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String Invocation6CreationTool_title;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String Invocation6CreationTool_desc;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String RuleCompartmentEditPart_title;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NodeCompartmentEditPart_title;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String UnitCompartmentEditPart_title;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String CommandName_OpenDiagram;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_Node_3004_incominglinks;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_Node_3004_outgoinglinks;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_TransformationSystem_1000_links;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_Link_4002_target;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_Link_4002_source;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_TransformationUnit_3003_incominglinks;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_TransformationUnit_3003_outgoinglinks;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_Node_3001_incominglinks;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_Node_3001_outgoinglinks;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_Attribute_3002_incominglinks;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_Attribute_3002_outgoinglinks;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_TransformationUnit_2002_incominglinks;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_TransformationUnit_2002_outgoinglinks;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_Rule_2001_incominglinks;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_Rule_2001_outgoinglinks;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_Edge_4001_target;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorGroupName_Edge_4001_source;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String NavigatorActionProvider_OpenDiagramActionName;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String AbstractParser_UnexpectedValueType;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String AbstractParser_WrongStringConversion;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String AbstractParser_UnknownLiteral;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String MessageFormatParser_InvalidInputError;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinModelingAssistantProviderTitle;
-	
+
  	/**
  	 * @generated
  	 */
  	public static String HenshinModelingAssistantProviderMessage;
-	
+
  	public static String SingleEClassifierSelectionDialog_title;

  	public static String SingleEClassifierSelectionDialog_msg;

-
-	
  	// TODO: put accessor fields manually
  }

Modified: branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/providers/HenshinViewProvider.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/providers/HenshinViewProvider.java	2012-01-17 12:41:37 UTC (rev 1374)
+++ branches/model2011/org.eclipse.emf.henshin.diagram/src/org/eclipse/emf/henshin/diagram/providers/HenshinViewProvider.java	2012-01-19 13:39:31 UTC (rev 1379)
@@ -579,20 +579,20 @@
  	public Node createTransformationUnit_3003(EObject domainElement,
  			View containerView, int index, boolean persisted,
  			PreferencesHint preferencesHint) {
-		
+
  		// Create the view:
-		Node node = createTransformationUnit_3003Gen(domainElement, containerView, index, persisted, preferencesHint);
-		
+		Node node = createTransformationUnit_3003Gen(domainElement,
+				containerView, index, persisted, preferencesHint);
+
  		// Change the font to italic:
  		ViewUtil.setStructuralFeatureValue(node,
  				NotationPackage.eINSTANCE.getFontStyle_Italic(), true);
-		
-		
+
  		// Create the required symbols and links:
  		View unitView = (View) containerView.eContainer();
  		new HenshinSymbolUpdater(preferencesHint, persisted).update(unitView);
  		new HenshinLinkUpdater(preferencesHint, persisted).update(unitView);
-		
+
  		// Done.
  		return node;
  	}
@@ -789,5 +789,5 @@
  		}
  		return (IElementType) semanticAdapter.getAdapter(IElementType.class);
  	}
-	
+
  }



------------------------------

_______________________________________________
henshin-commits mailing list
henshin-commits@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/henshin-commits


End of henshin-commits Digest, Vol 8, Issue 20
**********************************************



Back to the top