diff options
Diffstat (limited to 'plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/RemoveBendpointsFeature.java')
-rw-r--r-- | plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/RemoveBendpointsFeature.java | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/RemoveBendpointsFeature.java b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/RemoveBendpointsFeature.java index d3a79691b..7120531e2 100644 --- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/RemoveBendpointsFeature.java +++ b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/support/RemoveBendpointsFeature.java @@ -1,61 +1,61 @@ -/*******************************************************************************
- * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
- * 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:
- * Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.ui.common.support;
-
-import org.eclipse.graphiti.features.IFeatureProvider;
-import org.eclipse.graphiti.features.context.ICustomContext;
-import org.eclipse.graphiti.features.custom.AbstractCustomFeature;
-import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
-import org.eclipse.graphiti.mm.pictograms.PictogramElement;
-
-/**
- * @author Henrik Rentz-Reichert
- *
- */
-public class RemoveBendpointsFeature extends AbstractCustomFeature {
-
- /**
- * @param fp
- */
- public RemoveBendpointsFeature(IFeatureProvider fp) {
- super(fp);
- }
-
- @Override
- public String getName() {
- return "Remove All Bend Points";
- }
-
- @Override
- public String getDescription() {
- return "remove all bend points of the selected connection(s)";
- }
-
- public boolean canExecute(ICustomContext context) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.graphiti.features.custom.ICustomFeature#execute(org.eclipse.graphiti.features.context.ICustomContext)
- */
- @Override
- public void execute(ICustomContext context) {
- for (PictogramElement pe : context.getPictogramElements()) {
- if (pe instanceof FreeFormConnection) {
- FreeFormConnection conn = (FreeFormConnection) pe;
- conn.getBendpoints().clear();
- }
- }
- }
-
-}
+/******************************************************************************* + * Copyright (c) 2013 protos software gmbh (http://www.protos.de). + * 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: + * Henrik Rentz-Reichert (initial contribution) + * + *******************************************************************************/ + +package org.eclipse.etrice.ui.common.support; + +import org.eclipse.graphiti.features.IFeatureProvider; +import org.eclipse.graphiti.features.context.ICustomContext; +import org.eclipse.graphiti.features.custom.AbstractCustomFeature; +import org.eclipse.graphiti.mm.pictograms.FreeFormConnection; +import org.eclipse.graphiti.mm.pictograms.PictogramElement; + +/** + * @author Henrik Rentz-Reichert + * + */ +public class RemoveBendpointsFeature extends AbstractCustomFeature { + + /** + * @param fp + */ + public RemoveBendpointsFeature(IFeatureProvider fp) { + super(fp); + } + + @Override + public String getName() { + return "Remove All Bend Points"; + } + + @Override + public String getDescription() { + return "remove all bend points of the selected connection(s)"; + } + + public boolean canExecute(ICustomContext context) { + return true; + } + + /* (non-Javadoc) + * @see org.eclipse.graphiti.features.custom.ICustomFeature#execute(org.eclipse.graphiti.features.context.ICustomContext) + */ + @Override + public void execute(ICustomContext context) { + for (PictogramElement pe : context.getPictogramElements()) { + if (pe instanceof FreeFormConnection) { + FreeFormConnection conn = (FreeFormConnection) pe; + conn.getBendpoints().clear(); + } + } + } + +} |