Browse Source

Merge remote-tracking branch 'origin/Jascha'

Jan Enders 7 years ago
parent
commit
76b18d8c4c

+ 3 - 0
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/graphs/GraphManager.java

@@ -572,6 +572,9 @@ public class GraphManager {
 	 */
 	protected void deselectNodesAfterEdgeCreation(String nodeID) {
 		Node n = getGraph().getNode(nodeID);
+		if (n == null) {
+			return;
+		}
 		if (!hasClass(n, UI_CLASS_PROCESSING_ENABLED) || !GraphDisplayManager.getCurrentLayer().equals(Layer.MAPPING)) {
 			n.removeAttribute("ui.style");
 			n.changeAttribute("ui.style", "fill-color: #000000; size: 15px;");

+ 8 - 2
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/graphs/MyGraph.java

@@ -8,6 +8,8 @@ import org.graphstream.graph.Node;
 import org.graphstream.graph.implementations.SingleGraph;
 
 import de.tu_darmstadt.informatik.tk.scopviz.main.Layer;
+import de.tu_darmstadt.informatik.tk.scopviz.main.Main;
+import de.tu_darmstadt.informatik.tk.scopviz.ui.OptionsManager;
 import de.tu_darmstadt.informatik.tk.scopviz.ui.ToolboxManager;
 
 /**
@@ -99,8 +101,12 @@ public class MyGraph extends SingleGraph {
 	 *            the Edge that was just created
 	 */
 	private void edgeCreatedNotify(Edge e) {
-		if (Layer.UNDERLAY.equals(this.getAttribute("layer"))) {
-			ToolboxManager.createWeighDialog(e);
+		boolean doWeight = Layer.UNDERLAY.equals(this.getAttribute("layer")) 
+				&& (e.getAttribute("weight") == null
+				|| (e.getAttribute("weight") != null
+				&& (OptionsManager.getDefaultWeight() == Main.getInstance().convertAttributeTypes(e.getAttribute("weight"), new Double(0.0)))));
+		if (doWeight) {
+			ToolboxManager.createWeightDialog(e);
 		}
 		for (EdgeCreatedListener list : allEdgeListeners) {
 			list.edgeCreated(e, id);

+ 1 - 2
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/io/MySourceBase.java

@@ -40,7 +40,6 @@ import java.util.List;
 import java.util.Stack;
 
 import org.graphstream.graph.implementations.AbstractElement.AttributeChangeEvent;
-import org.graphstream.graph.implementations.SingleGraph;
 import org.graphstream.stream.AttributeSink;
 import org.graphstream.stream.ElementSink;
 import org.graphstream.stream.Sink;
@@ -196,7 +195,7 @@ public class MySourceBase implements Source {
 		addElementSink(sink);
 		resetSubGraphs();
 		try {
-			superID = ((SingleGraph) sink).getId();
+			superID = ((MyGraph) sink).getId();
 		} catch (Exception e) {
 			Debug.out(e.toString() + "\n" + e.getStackTrace().toString());
 		}

+ 99 - 0
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/metrics/BasicMappingOperator.java

@@ -0,0 +1,99 @@
+package de.tu_darmstadt.informatik.tk.scopviz.metrics;
+
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.LinkedList;
+
+import org.graphstream.graph.Node;
+
+import de.tu_darmstadt.informatik.tk.scopviz.debug.Debug;
+import de.tu_darmstadt.informatik.tk.scopviz.graphs.GraphManager;
+import de.tu_darmstadt.informatik.tk.scopviz.graphs.MappingGraphManager;
+import de.tu_darmstadt.informatik.tk.scopviz.main.Main;
+import de.tu_darmstadt.informatik.tk.scopviz.metrics.interfaces.ScopvizGraphOperator;
+
+public class BasicMappingOperator implements ScopvizGraphOperator {
+
+	@Override
+	public void calculate(GraphManager g) {
+		// check if you are using a Mapping Graph
+		MappingGraphManager map;
+		if (g instanceof MappingGraphManager) {
+			map = (MappingGraphManager) g;
+		} else {
+			Debug.out("ERROR: can only invoke " + getName() + " on a Mapping Graph", 3);
+			return;
+		}
+
+		// find the Nodes that have to be mapped and where they can be mapped to
+		LinkedList<Node> operatorNodes = getOperatorNodes(map);
+		LinkedList<Node> procEnNodes = getProcEnNodes(map);
+
+		// Map the Nodes (beginning with the operatorNode with the highest
+		// Processing requirement)
+		operatorNodes.sort(operatorComparator);
+		Iterator<Node> procEnIterator;
+		Boolean successfull;
+		for (Node n : operatorNodes) {
+			procEnIterator = procEnNodes.iterator();
+			successfull = false;
+			while (procEnIterator.hasNext() && !successfull) {
+				successfull = map.createEdge(procEnIterator.next().getId(), n.getId());
+				Debug.out(new Boolean(successfull).toString());
+			}
+			if (!successfull) {
+				Debug.out("WARNING: BasicMappingOperator could not map all Nodes");
+			}
+
+		}
+	}
+
+	@Override
+	public String getName() {
+		return "Basic Automapping";
+	}
+
+	protected LinkedList<Node> getProcEnNodes(GraphManager g) {
+		LinkedList<Node> result = new LinkedList<Node>();
+		Iterator<Node> nodeIter = g.getGraph().getNodeIterator();
+		while (nodeIter.hasNext()) {
+			Node n = nodeIter.next();
+			if ("procEn".equals(n.getAttribute("typeofNode"))) {
+				result.add(n);
+			}
+		}
+		return result;
+	}
+
+	protected LinkedList<Node> getOperatorNodes(GraphManager g) {
+		LinkedList<Node> result = new LinkedList<Node>();
+		Iterator<Node> nodeIter = g.getGraph().getNodeIterator();
+		while (nodeIter.hasNext()) {
+			Node n = nodeIter.next();
+			if ("operator".equals(n.getAttribute("typeofNode"))) {
+				result.add(n);
+			}
+		}
+		return result;
+	}
+
+	protected Comparator<Node> operatorComparator = new Comparator<Node>() {
+
+		@Override
+		public int compare(Node o1, Node o2) {
+			Main m = Main.getInstance();
+
+			// this does: process-need(o1) - process-need(o2)
+			Double result = m.convertAttributeTypes(o1.getAttribute("process-need"), new Double(0))
+					- m.convertAttributeTypes(o2.getAttribute("process-need"), new Double(0));
+			if (result == 0.0) {
+				return 0;
+			} else if (result < 0.0) {
+				return -1;
+			} else {
+				return 1;
+			}
+		}
+	};
+
+}

+ 25 - 0
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/metrics/TestOperator.java

@@ -0,0 +1,25 @@
+package de.tu_darmstadt.informatik.tk.scopviz.metrics;
+
+import java.util.Iterator;
+
+import org.graphstream.graph.Node;
+
+import de.tu_darmstadt.informatik.tk.scopviz.graphs.GraphManager;
+import de.tu_darmstadt.informatik.tk.scopviz.metrics.interfaces.ScopvizGraphOperator;
+
+public class TestOperator implements ScopvizGraphOperator {
+
+	@Override
+	public void calculate(GraphManager g) {
+		Iterator<Node> nodeIter = g.getGraph().getNodeIterator();
+		while (nodeIter.hasNext()) {
+			nodeIter.next().addAttribute("ui.style", "fill-color: blue;");
+		}
+	}
+
+	@Override
+	public String getName() {
+		return "TestOperator";
+	}
+
+}

+ 2 - 14
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/metrics/interfaces/ScopvizGraphOperator.java

@@ -1,17 +1,9 @@
 package de.tu_darmstadt.informatik.tk.scopviz.metrics.interfaces;
 
-import java.util.LinkedList;
-
-import de.tu_darmstadt.informatik.tk.scopviz.graphs.MyGraph;
+import de.tu_darmstadt.informatik.tk.scopviz.graphs.GraphManager;
 
 public interface ScopvizGraphOperator {
 
-	/**
-	 * Metric Returns true if the GraphOperator requires the Setup() to be
-	 * called if this is false setup() will not be called.
-	 */
-	public boolean isSetupRequired();
-
 	/**
 	 * calculates a new Version of the Graph using the given operator.
 	 * 
@@ -20,15 +12,11 @@ public interface ScopvizGraphOperator {
 	 * @return a list of Graphs that is the result of the operator on the Graph
 	 *         g
 	 */
-	public LinkedList<MyGraph> calculate(MyGraph g);
+	public void calculate(GraphManager g);
 
 	/**
 	 * returns the name of the Metric.
 	 */
 	public String getName();
 
-	/**
-	 * sets up the metric for the first use.
-	 */
-	public void setup();
 }

+ 15 - 0
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/ButtonManager.java

@@ -4,7 +4,10 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashSet;
 
+<<<<<<< HEAD
 import org.jxmapviewer.viewer.GeoPosition;
+=======
+>>>>>>> branch 'Jascha' of https://git.tk.informatik.tu-darmstadt.de/julien.gedeon/bp-scopviz.git
 import org.jxmapviewer.viewer.WaypointPainter;
 
 import de.tu_darmstadt.informatik.tk.scopviz.main.Layer;
@@ -262,7 +265,19 @@ public final class ButtonManager {
 
 		if (!(GraphDisplayManager.getCurrentLayer().equals(Layer.SYMBOL))) {
 
+<<<<<<< HEAD
+=======
+			// add a copy of the underlay graph to the the symbol layer
+			// TODO fix problem with underlay weight popups
+			// MyGraph gClone = (MyGraph)
+			// Graphs.clone(GraphDisplayManager.getGraphManager(Layer.UNDERLAY).getGraph());
+			// gClone.removeAttribute("layer");
+>>>>>>> branch 'Jascha' of https://git.tk.informatik.tu-darmstadt.de/julien.gedeon/bp-scopviz.git
 			GraphDisplayManager.setCurrentLayer(Layer.SYMBOL);
+<<<<<<< HEAD
+=======
+			// GraphDisplayManager.addGraph(gClone, true);
+>>>>>>> branch 'Jascha' of https://git.tk.informatik.tu-darmstadt.de/julien.gedeon/bp-scopviz.git
 			controller.topLeftAPane.getChildren().add(controller.symbolToolVBox);
 
 		}

+ 2 - 1
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/GUIController.java

@@ -216,6 +216,7 @@ public class GUIController implements Initializable {
 		ToolboxManager.initializeItems();
 		PropertiesManager.initializeItems(properties);
 		ConsoleManager.initialize(this);
+		OperatorManager.initialize(this);
 
 		GraphDisplayManager.init(this);
 
@@ -280,7 +281,7 @@ public class GUIController implements Initializable {
 		quit.setOnAction((event) -> MenuBarManager.quitAction(event));
 		delete.setOnAction((event) -> MenuBarManager.deleteAction(event));
 		undelete.setOnAction((event) -> MenuBarManager.undeleteAction(event));
-		operators.setOnAction((event) -> MenuBarManager.undeleteAction(event));
+		operators.setOnAction((event) -> OperatorManager.openOperatorsDialog());
 		resetMapping.setOnAction((event) -> GraphDisplayManager.initMappingLayer(true));
 		updateMetricMI.setOnAction((event) -> MetricboxManager.updateMetrics());
 		updateMetricMI.setDisable(true);

+ 1 - 0
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/MenuBarManager.java

@@ -88,6 +88,7 @@ public final class MenuBarManager {
 		if (v.getSelectedNodeID() != null) {
 			v.deleteNode(v.getSelectedNodeID());
 		}
+		PropertiesManager.showNewDataSet(null);
 	}
 
 	/**

+ 86 - 0
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/OperatorManager.java

@@ -0,0 +1,86 @@
+package de.tu_darmstadt.informatik.tk.scopviz.ui;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import de.tu_darmstadt.informatik.tk.scopviz.main.Main;
+import de.tu_darmstadt.informatik.tk.scopviz.metrics.BasicMappingOperator;
+import de.tu_darmstadt.informatik.tk.scopviz.metrics.TestOperator;
+import de.tu_darmstadt.informatik.tk.scopviz.metrics.interfaces.ScopvizGraphOperator;
+import javafx.application.Platform;
+import javafx.collections.FXCollections;
+import javafx.geometry.Insets;
+import javafx.scene.control.ButtonBar.ButtonData;
+import javafx.scene.control.ButtonType;
+import javafx.scene.control.ChoiceBox;
+import javafx.scene.control.Dialog;
+import javafx.scene.control.Label;
+import javafx.scene.layout.GridPane;
+
+public class OperatorManager {
+
+	private static GUIController guiController;
+
+	private static HashMap<String, ScopvizGraphOperator> operators = new HashMap<String, ScopvizGraphOperator>();
+
+	/**
+	 * Initializes all GraphOperators for employment
+	 * 
+	 * ****Central method to add a new metric***** Add line: addOperator(new
+	 * YourMetric()); for using it in the Operatordialog
+	 * **************************************************************
+	 * 
+	 */
+	private static void initializeGraphOperators() {
+		addOperator(new TestOperator());
+		addOperator(new BasicMappingOperator());
+	}
+
+	public static void openOperatorsDialog() {
+		Dialog<ArrayList<String>> addPropDialog = new Dialog<>();
+		addPropDialog.setTitle("GraphOperators");
+
+		ButtonType addButtonType = new ButtonType("invoke on current graph", ButtonData.OK_DONE);
+		addPropDialog.getDialogPane().getButtonTypes().addAll(addButtonType, ButtonType.CANCEL);
+
+		// create grid
+		GridPane grid = new GridPane();
+		grid.setHgap(10);
+		grid.setVgap(10);
+		grid.setPadding(new Insets(20, 150, 10, 10));
+
+		// set DropDown Menu
+		ChoiceBox<String> operatorChooser = new ChoiceBox<>();
+		operatorChooser.setItems(FXCollections.observableArrayList(operators.keySet()));
+
+		// adding elements to grid
+		grid.add(new Label("Please select the operator you want to invoke on the current Gaph"), 0, 0);
+		grid.add(operatorChooser, 0, 1);
+
+		addPropDialog.getDialogPane().setContent(grid);
+
+		Platform.runLater(() -> operatorChooser.requestFocus());
+
+		// get new property values
+		addPropDialog.setResultConverter(dialogButton -> {
+			if (dialogButton == addButtonType) {
+				operators.get(operatorChooser.getSelectionModel().getSelectedItem())
+						.calculate(Main.getInstance().getGraphManager());
+				return null;
+			} else
+				return null;
+
+		});
+		addPropDialog.showAndWait();
+
+	}
+
+	public static void addOperator(ScopvizGraphOperator op) {
+		operators.put(op.getName(), op);
+	}
+
+	public static void initialize(GUIController g) {
+		initializeGraphOperators();
+		guiController = g;
+	}
+}

+ 4 - 4
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/OptionsManager.java

@@ -30,7 +30,7 @@ import javafx.scene.layout.GridPane;
 public final class OptionsManager {
 	// SETTINGS
 	/** The Default Weight for all new Edges. */
-	private static int defaultWeight = 0;
+	private static double defaultWeight = 0;
 	/** Flag whether to show the weight labels on Edges. */
 	private static boolean showWeight = true;
 	/** The default latitude of nodes (defaults to Piloty Building) */
@@ -63,7 +63,7 @@ public final class OptionsManager {
 		grid.setVgap(10);
 		grid.setPadding(new Insets(20, 150, 10, 10));
 		// create dialog elements
-		TextField defaultWeightField = new TextField(Integer.toString(defaultWeight));
+		TextField defaultWeightField = new TextField(Double.toString(defaultWeight));
 
 		RadioButton showWeightButton = new RadioButton();
 		showWeightButton.setSelected(showWeight);
@@ -186,7 +186,7 @@ public final class OptionsManager {
 		addPropDialog.setResultConverter(dialogButton -> {
 			if (dialogButton == addButtonType) {
 				try {
-					defaultWeight = Integer.parseInt(defaultWeightField.getText());
+					defaultWeight = Double.parseDouble(defaultWeightField.getText());
 					if (defaultLat != Double.parseDouble(defaultLatitudeField.getText())
 							|| defaultLong != Double.parseDouble(defaultLongitudeField.getText())) {
 						coordinatesChanged = true;
@@ -247,7 +247,7 @@ public final class OptionsManager {
 	 * 
 	 * @return the default weight
 	 */
-	public static int getDefaultWeight() {
+	public static double getDefaultWeight() {
 		return defaultWeight;
 	}
 

+ 10 - 1
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/PropertiesManager.java

@@ -295,12 +295,21 @@ public final class PropertiesManager {
 						&& Layer.OPERATOR == Main.getInstance().getGraphManager().getGraph().getAttribute("layer")) {
 					break;
 				}
+				Object actualAttribute = selected.getAttribute(key);
+				if (actualAttribute != null) {
+					newData.add(new KeyValuePair(key, String.valueOf(actualAttribute), actualAttribute.getClass()));
+				}
 				break;
 			case "process-need":
+				Debug.out(key);
 				if (selected instanceof Node
 						&& Layer.UNDERLAY == Main.getInstance().getGraphManager().getGraph().getAttribute("layer")) {
 					break;
 				}
+				actualAttribute = selected.getAttribute(key);
+				if (actualAttribute != null) {
+					newData.add(new KeyValuePair(key, String.valueOf(actualAttribute), actualAttribute.getClass()));
+				}
 				break;
 			case "process-max":
 				if (selected instanceof Node
@@ -313,7 +322,7 @@ public final class PropertiesManager {
 					break;
 				}
 			default:
-				Object actualAttribute = selected.getAttribute(key);
+				actualAttribute = selected.getAttribute(key);
 				if (actualAttribute != null) {
 					newData.add(new KeyValuePair(key, String.valueOf(actualAttribute), actualAttribute.getClass()));
 				}

+ 41 - 3
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/ToolboxManager.java

@@ -269,19 +269,19 @@ public final class ToolboxManager {
 	 * @param e
 	 *            the new Edge that needs a weight
 	 */
-	public static void createWeighDialog(Edge e) {
+	public static void createWeightDialog(Edge e) {
 		if (e.equals(lastCreatedEdge)) {
 			return;
 		}
 		lastCreatedEdge = e;
 		Platform.runLater(() -> {
-			TextInputDialog weightDialog = new TextInputDialog(Integer.toString(OptionsManager.getDefaultWeight()));
+			TextInputDialog weightDialog = new TextInputDialog(Double.toString(OptionsManager.getDefaultWeight()));
 			weightDialog.setTitle("Edge Weight");
 			weightDialog.setHeaderText("Please enter the weight of the Edge");
 			weightDialog.setContentText("Edge Weight");
 			Optional<String> result = weightDialog.showAndWait();
 			if (result.isPresent()) {
-				e.addAttribute("weight", result.get());
+				e.addAttribute("weight", Double.parseDouble(result.get()));
 			}
 		});
 	}
@@ -353,4 +353,42 @@ public final class ToolboxManager {
 			}
 		}
 	}
+
+	
+	private static org.graphstream.graph.Node lastCreatedNode = null;
+	
+	
+	public static void createProcMaxDialog(org.graphstream.graph.Node n) {
+		if (n.equals(lastCreatedNode)) {
+			return;
+		}
+		lastCreatedNode = n;
+		Platform.runLater(() -> {
+			TextInputDialog weightDialog = new TextInputDialog(Double.toString(OptionsManager.getDefaultWeight()));
+			weightDialog.setTitle("Maximum Processing Power");
+			weightDialog.setHeaderText("Please enter the maximum processing power of the Node");
+			weightDialog.setContentText("processing power");
+			Optional<String> result = weightDialog.showAndWait();
+			if (result.isPresent()) {
+				n.addAttribute("process-max", Double.parseDouble(result.get()));
+			}
+		});
+	}
+
+	public static void createProcNeedDialog(org.graphstream.graph.Node n) {
+		if (n.equals(lastCreatedNode)) {
+			return;
+		}
+		lastCreatedNode = n;
+		Platform.runLater(() -> {
+			TextInputDialog weightDialog = new TextInputDialog(Double.toString(OptionsManager.getDefaultWeight()));
+			weightDialog.setTitle("needed Processing power");
+			weightDialog.setHeaderText("Please enter the amount of processing power the node needs");
+			weightDialog.setContentText("neede Power");
+			Optional<String> result = weightDialog.showAndWait();
+			if (result.isPresent()) {
+				n.addAttribute("process-need", Double.parseDouble(result.get()));
+			}
+		});
+	}
 }

+ 13 - 8
scopviz/src/main/java/de/tu_darmstadt/informatik/tk/scopviz/ui/handlers/MyMouseManager.java

@@ -16,6 +16,7 @@ import de.tu_darmstadt.informatik.tk.scopviz.main.CreationMode;
 import de.tu_darmstadt.informatik.tk.scopviz.main.EdgeSelectionHelper;
 import de.tu_darmstadt.informatik.tk.scopviz.main.Main;
 import de.tu_darmstadt.informatik.tk.scopviz.ui.PropertiesManager;
+import de.tu_darmstadt.informatik.tk.scopviz.ui.ToolboxManager;
 
 /**
  * Mouse Manager to handle all Mouse based Interaction on the Graph Display
@@ -90,7 +91,7 @@ public class MyMouseManager extends DefaultMouseManager {
 			n.setAttribute("ui.class", "standard");
 			n.setAttribute("typeofNode", "standard");
 			graphManager.selectNode(n.getId());
-			Debug.out("Added Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y + ")");
+			Debug.out("INFORMATION: Added Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y + ")", 1);
 
 			break;
 
@@ -100,8 +101,8 @@ public class MyMouseManager extends DefaultMouseManager {
 			n.setAttribute("ui.class", "source");
 			n.setAttribute("typeofNode", "source");
 			graphManager.selectNode(n.getId());
-			Debug.out("Added Source Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y
-					+ ")");
+			Debug.out("INFORMATION: Added Source Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y
+					+ ")", 1);
 
 			break;
 
@@ -112,7 +113,7 @@ public class MyMouseManager extends DefaultMouseManager {
 			n.setAttribute("typeofNode", "sink");
 			graphManager.selectNode(n.getId());
 			Debug.out(
-					"Added Sink Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y + ")");
+					"INFORMATION: Added Sink Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y + ")", 1);
 
 			break;
 
@@ -121,9 +122,11 @@ public class MyMouseManager extends DefaultMouseManager {
 			n.setAttribute("xyz", cursorPos);
 			n.setAttribute("ui.class", "procEn");
 			n.setAttribute("typeofNode", "procEn");
+			ToolboxManager.createProcMaxDialog(n);
+			
 			graphManager.selectNode(n.getId());
-			Debug.out("Added ProcEn Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y
-					+ ")");
+			Debug.out("INFORMATION: Added ProcEn Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y
+					+ ")", 1);
 
 			break;
 
@@ -132,9 +135,11 @@ public class MyMouseManager extends DefaultMouseManager {
 			n.setAttribute("xyz", cursorPos);
 			n.setAttribute("ui.class", "operator");
 			n.setAttribute("typeofNode", "operator");
+			ToolboxManager.createProcNeedDialog(n);
+			
 			graphManager.selectNode(n.getId());
-			Debug.out("Added Operator Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y
-					+ ")");
+			Debug.out("INFORMATION: Added Operator Node with ID " + n.getId() + " at Position (" + cursorPos.x + "/" + cursorPos.y
+					+ ")", 1);
 
 			break;