diff options
Diffstat (limited to 'jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/feature/MoveEntityShapeFeature.java')
-rw-r--r-- | jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/feature/MoveEntityShapeFeature.java | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/feature/MoveEntityShapeFeature.java b/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/feature/MoveEntityShapeFeature.java deleted file mode 100644 index 4d167a7bc4..0000000000 --- a/jpa_diagram_editor/plugins/org.eclipse.jpt.jpadiagrameditor.ui/src/org/eclipse/jpt/jpadiagrameditor/ui/internal/feature/MoveEntityShapeFeature.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * <copyright> - * - * Copyright (c) 2005, 2010 SAP AG. - * 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: - * Stefan Dimov - initial API, implementation and documentation - * - * </copyright> - * - *******************************************************************************/ -package org.eclipse.jpt.jpadiagrameditor.ui.internal.feature; - -import java.util.Collection; -import java.util.Iterator; - -import org.eclipse.emf.transaction.RecordingCommand; -import org.eclipse.emf.transaction.TransactionalEditingDomain; -import org.eclipse.emf.transaction.util.TransactionUtil; -import org.eclipse.graphiti.features.IFeatureProvider; -import org.eclipse.graphiti.features.context.IMoveShapeContext; -import org.eclipse.graphiti.features.impl.DefaultMoveShapeFeature; -import org.eclipse.graphiti.mm.pictograms.ContainerShape; -import org.eclipse.graphiti.mm.pictograms.PictogramElement; -import org.eclipse.jpt.jpadiagrameditor.ui.internal.provider.IJPAEditorFeatureProvider; -import org.eclipse.jpt.jpadiagrameditor.ui.internal.util.JPAEditorUtil; - - -public class MoveEntityShapeFeature extends DefaultMoveShapeFeature { - - public MoveEntityShapeFeature(IFeatureProvider fp) { - super(fp); - } - - protected void moveAllBendpoints(IMoveShapeContext context) { - } - - protected void postMoveShape(IMoveShapeContext context) { - ContainerShape cs = (ContainerShape)context.getShape(); - JPAEditorUtil.rearrangeAllConnections(cs, getFeatureProvider(), false); - Collection<ContainerShape> css = JPAEditorUtil.getRelatedShapes(cs); - Iterator<ContainerShape> csIt = css.iterator(); - while (csIt.hasNext()) { - ContainerShape cs1 = csIt.next(); - JPAEditorUtil.rearrangeAllConnections(cs1, getFeatureProvider(), true); - } - } - - @Override - protected void internalMove(final IMoveShapeContext context) { - PictogramElement el = context.getPictogramElement(); - TransactionalEditingDomain ted = TransactionUtil.getEditingDomain(el); - ted.getCommandStack().execute(new RecordingCommand(ted) { - protected void doExecute() { - move(context); - } - }); - } - - public void move(IMoveShapeContext context){ - super.internalMove(context); - } - - public IJPAEditorFeatureProvider getFeatureProvider() { - return (IJPAEditorFeatureProvider)super.getFeatureProvider(); - } - -} |