model.setValue((String) id, defaultValue);
}
@Override
public void setPropertyValue(Object id, Object value) {
Graph graph;
if (model instanceof Vertex) {
graph = ((Vertex) model).getParent();
} else if (model instanceof Edge) {
graph = ((Edge) model).getParent();
} else {
graph = (Graph) model;
}
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchPage page = workbench.getActiveWorkbenchWindow()
.getActivePage();
try {
IEditorPart part = IDE.openEditor(page, graph.getFile());
if (part instanceof GraphEditor) {
String parameterName = (String) id;
// only update value if it is different than before
Object oldValue = model.getValue(parameterName);