|
@@ -11,6 +11,7 @@ import org.graphstream.graph.Element;
|
|
import org.graphstream.graph.Node;
|
|
import org.graphstream.graph.Node;
|
|
|
|
|
|
import de.tu_darmstadt.informatik.tk.scopviz.debug.Debug;
|
|
import de.tu_darmstadt.informatik.tk.scopviz.debug.Debug;
|
|
|
|
+import de.tu_darmstadt.informatik.tk.scopviz.graphs.GraphHelper;
|
|
import de.tu_darmstadt.informatik.tk.scopviz.graphs.GraphManager;
|
|
import de.tu_darmstadt.informatik.tk.scopviz.graphs.GraphManager;
|
|
import de.tu_darmstadt.informatik.tk.scopviz.main.Layer;
|
|
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.main.Main;
|
|
@@ -122,6 +123,7 @@ public final class PropertiesManager {
|
|
itemVisibilityRules.put("mapping-parent", -2);
|
|
itemVisibilityRules.put("mapping-parent", -2);
|
|
itemVisibilityRules.put("mapping-parent-id", -2);
|
|
itemVisibilityRules.put("mapping-parent-id", -2);
|
|
itemVisibilityRules.put("ui.class", -2);
|
|
itemVisibilityRules.put("ui.class", -2);
|
|
|
|
+ itemVisibilityRules.put("originalNode", -2);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -152,27 +154,32 @@ public final class PropertiesManager {
|
|
Element selected = getSelected();
|
|
Element selected = getSelected();
|
|
|
|
|
|
// Type-Check the input
|
|
// Type-Check the input
|
|
- if (classType.equals(Integer.class) && newValue.matches(IS_INT)) {
|
|
|
|
|
|
+ if (classType.equals(Integer.class) && newValue.matches(IS_INT)){
|
|
|
|
+ GraphHelper.propagateAttribute(Main.getInstance().getGraphManager().getGraph(), selected, key, newValue);
|
|
selected.changeAttribute(key, Integer.valueOf(newValue));
|
|
selected.changeAttribute(key, Integer.valueOf(newValue));
|
|
editedPair.setValue(newValue);
|
|
editedPair.setValue(newValue);
|
|
Debug.out("Edited integer Attribute " + key);
|
|
Debug.out("Edited integer Attribute " + key);
|
|
|
|
|
|
} else if (classType.equals(Boolean.class) && newValue.matches(IS_BOOL)) {
|
|
} else if (classType.equals(Boolean.class) && newValue.matches(IS_BOOL)) {
|
|
|
|
+ GraphHelper.propagateAttribute(Main.getInstance().getGraphManager().getGraph(), selected, key, newValue);
|
|
selected.changeAttribute(key, Boolean.valueOf(newValue));
|
|
selected.changeAttribute(key, Boolean.valueOf(newValue));
|
|
editedPair.setValue(newValue);
|
|
editedPair.setValue(newValue);
|
|
Debug.out("Edited boolean Attribute " + key);
|
|
Debug.out("Edited boolean Attribute " + key);
|
|
|
|
|
|
} else if (classType.equals(Float.class) && newValue.matches(IS_FLOAT)) {
|
|
} else if (classType.equals(Float.class) && newValue.matches(IS_FLOAT)) {
|
|
|
|
+ GraphHelper.propagateAttribute(Main.getInstance().getGraphManager().getGraph(), selected, key, newValue);
|
|
selected.changeAttribute(key, Float.valueOf(newValue));
|
|
selected.changeAttribute(key, Float.valueOf(newValue));
|
|
editedPair.setValue(newValue);
|
|
editedPair.setValue(newValue);
|
|
Debug.out("Edited float Attribute " + key);
|
|
Debug.out("Edited float Attribute " + key);
|
|
|
|
|
|
} else if (classType.equals(Double.class) && newValue.matches(IS_FLOAT)) {
|
|
} else if (classType.equals(Double.class) && newValue.matches(IS_FLOAT)) {
|
|
|
|
+ GraphHelper.propagateAttribute(Main.getInstance().getGraphManager().getGraph(), selected, key, newValue);
|
|
selected.changeAttribute(key, Double.valueOf(newValue));
|
|
selected.changeAttribute(key, Double.valueOf(newValue));
|
|
editedPair.setValue(newValue);
|
|
editedPair.setValue(newValue);
|
|
Debug.out("Edited double Attribute " + key);
|
|
Debug.out("Edited double Attribute " + key);
|
|
|
|
|
|
} else if (classType.equals(String.class)) {
|
|
} else if (classType.equals(String.class)) {
|
|
|
|
+ GraphHelper.propagateAttribute(Main.getInstance().getGraphManager().getGraph(), selected, key, newValue);
|
|
selected.changeAttribute(key, newValue);
|
|
selected.changeAttribute(key, newValue);
|
|
editedPair.setValue(newValue);
|
|
editedPair.setValue(newValue);
|
|
Debug.out("Edited String Attribute " + key);
|
|
Debug.out("Edited String Attribute " + key);
|
|
@@ -181,7 +188,7 @@ public final class PropertiesManager {
|
|
editedPair.setValue(oldValue);
|
|
editedPair.setValue(oldValue);
|
|
t.getTableView().getItems().get(t.getTablePosition().getRow()).setKey(oldValue);
|
|
t.getTableView().getItems().get(t.getTablePosition().getRow()).setKey(oldValue);
|
|
setItemsProperties();
|
|
setItemsProperties();
|
|
- Debug.out("invalid input for this attribute type");
|
|
|
|
|
|
+ Debug.out("WARNING: invalid input for this attribute type", 2);
|
|
}
|
|
}
|
|
|
|
|
|
// Unselect row after updating Property
|
|
// Unselect row after updating Property
|