Skip to content

Commit

Permalink
[60] Remove unnecessary dependencies to IGraphicalEditPart
Browse files Browse the repository at this point in the history
  • Loading branch information
ddscharfe authored and pcdavid committed Apr 25, 2024
1 parent 0e3485a commit b22c586
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.Request;
import org.eclipse.gef.SharedCursors;
import org.eclipse.gef.commands.Command;
Expand All @@ -29,7 +30,6 @@
import org.eclipse.gef.tools.DragEditPartsTracker;
import org.eclipse.gef.tools.ToolUtilities;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GroupEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.internal.ruler.SnapToHelperUtil;
import org.eclipse.gmf.runtime.diagram.ui.requests.DuplicateRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
Expand Down Expand Up @@ -94,7 +94,7 @@ protected void addSourceCommands(boolean isMove, CompoundCommand command) {
if (request instanceof ChangeBoundsRequest) {
Point delta = ((ChangeBoundsRequest) request).getMoveDelta();
MapModeUtil.getMapMode(
((IGraphicalEditPart) getTargetEditPart()).getFigure())
((GraphicalEditPart) getTargetEditPart()).getFigure())
.DPtoLP(delta);

duplicateRequest.setOffset(delta);
Expand Down Expand Up @@ -152,8 +152,8 @@ protected void executeCurrentCommand() {
super.executeCurrentCommand();
if (isActive()) {
if (getOperationSet().size() > 0) {
if (getOperationSet().get(0) instanceof IGraphicalEditPart) {
IGraphicalEditPart editpart = (IGraphicalEditPart) getOperationSet()
if (getOperationSet().get(0) instanceof GraphicalEditPart) {
GraphicalEditPart editpart = (GraphicalEditPart) getOperationSet()
.get(0);
if ((editpart.getFigure() == null)
|| (editpart.getFigure().getParent() == null)
Expand Down Expand Up @@ -289,7 +289,7 @@ protected void snapPoint(ChangeBoundsRequest request) {
protected boolean handleKeyDown(KeyEvent e) {
if (acceptArrowKey(e)) {
if (isInState(STATE_INITIAL)) {
IGraphicalEditPart ep = (IGraphicalEditPart) getSourceEditPart();
GraphicalEditPart ep = (GraphicalEditPart) getSourceEditPart();
if (ep != null) {
Point location = ep.getFigure().getBounds().getCenter();
ep.getFigure().translateToAbsolute(location);
Expand Down

0 comments on commit b22c586

Please sign in to comment.