package org.simantics.plant3d.editor;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
if (parentElement instanceof P3DRootNode) {
return ((P3DRootNode)parentElement).getChild().toArray();
}
- if (!DEBUG) {
- if (parentElement instanceof PipeRun) {
- return ((PipeRun)parentElement).getSortedChild().toArray();
- }
- } else {
+ if (parentElement instanceof PipeRun) {
+ if (DEBUG) {
+ List<Object> list = new ArrayList<Object>();
+ list.addAll(((PipeRun)parentElement).getControlPoints());
+ list.addAll(((PipeRun)parentElement).getSortedChild());
+ return list.toArray();
+ }
+ return ((PipeRun)parentElement).getSortedChild().toArray();
+ }
+ if (DEBUG) {
if (parentElement instanceof PipelineComponent) {
return new Object[]{((PipelineComponent) parentElement).getControlPoint()};
} else if (parentElement instanceof PipeControlPoint) {