use of org.jkiss.dbeaver.ext.erd.editor.ERDEditorPart in project dbeaver by dbeaver.
the class FlyoutChangeLayoutAction method run.
@Override
public void run() {
if (editor instanceof ERDEditorPart) {
ERDEditorPart erdEditor = (ERDEditorPart) editor;
EntityDiagram entityDiagram = erdEditor.getDiagram();
boolean isManual = entityDiagram.isLayoutManualDesired();
entityDiagram.setLayoutManualDesired(!isManual);
erdEditor.getDiagramPart().changeLayout();
checked = !isManual;
setChecked(checked);
}
}
use of org.jkiss.dbeaver.ext.erd.editor.ERDEditorPart in project dbeaver by dbeaver.
the class FlyoutChangeLayoutAction method isChecked.
/**
* @see org.eclipse.jface.action.IAction#isChecked()
*/
public boolean isChecked(IEditorPart editor) {
if (editor instanceof ERDEditorPart) {
ERDEditorPart schemaEditor = (ERDEditorPart) editor;
EntityDiagram entityDiagram = schemaEditor.getDiagram();
boolean checkTrue = entityDiagram.isLayoutManualDesired();
return (!checkTrue);
} else {
return false;
}
}
Aggregations