1 package org.simantics.plant3d.actions;
3 import org.eclipse.jface.action.Action;
4 import org.simantics.g3d.scenegraph.base.INode;
5 import org.simantics.g3d.vtk.common.VTKNodeMap;
6 import org.simantics.plant3d.Activator;
7 import org.simantics.plant3d.scenegraph.PipeRun;
8 import org.simantics.plant3d.scenegraph.controlpoint.PipingRules;
10 public class ReversePipeRunAction extends Action{
12 private VTKNodeMap<?, ? extends INode> nodeMap;
15 public ReversePipeRunAction(VTKNodeMap<?, ? extends INode> nodeMap) {
17 setImageDescriptor(Activator.imageDescriptorFromPlugin("com.famfamfam.silk", "icons/arrow_refresh.png"));
18 this.nodeMap = nodeMap;
21 public void setNode(INode node) {
22 if (node instanceof PipeRun) {
33 PipingRules.reverse(run);
34 nodeMap.commit("Reverse run " + run.getName());