use of org.knime.workbench.editor2.EditorUISettingsDialog in project knime-core by knime.
the class ChangeEditorUIAction method runOnNodes.
/**
* {@inheritDoc}
*/
@Override
public void runOnNodes(final NodeContainerEditPart[] nodeParts) {
EditorUISettingsDialog dlg = new EditorUISettingsDialog(Display.getCurrent().getActiveShell(), getEditor().getCurrentEditorSettings());
if (dlg.open() == Window.OK) {
// store settings with the workflow (workflow is marked dirty)
getEditor().markDirty();
getEditor().applyEditorSettings(dlg.getSettings());
getEditor().getWorkflowManager().get().setEditorUIInformation(dlg.getSettings());
// refresh workflow editor
// TODO this doesn't work - it doesn't refresh the ConnectionContainerEditParts
// WorkflowRootEditPart editorPart = (WorkflowRootEditPart)
// provider.getRootEditPart().getChildren().get(0);
// editorPart.refresh();
// workaround to refresh all connection container edit parts
getEditor().getWorkflowManager().get().getConnectionContainers().forEach(cc -> cc.setUIInfo(cc.getUIInfo()));
}
}
Aggregations