use of org.jkiss.dbeaver.erd.ui.editor.ERDEditorPart in project dbeaver by serge-rider.
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;
}
}
use of org.jkiss.dbeaver.erd.ui.editor.ERDEditorPart in project dbeaver by serge-rider.
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);
}
}
Aggregations