Search in sources :

Example 1 with ERSchemaEditDomain

use of com.cubrid.common.ui.er.editor.ERSchemaEditDomain in project cubrid-manager by CUBRID.

the class SchemaDiagramPart method getEditor.

public ERSchemaEditor getEditor() {
    EditPart parentP = getParent();
    if (parentP instanceof ScalableFreeformRootEditPart) {
        ScalableFreeformRootEditPart parentEditor = (ScalableFreeformRootEditPart) parentP;
        EditPartViewer viewer = parentEditor.getViewer();
        if (viewer instanceof ValidationGraphicalViewer) {
            ValidationGraphicalViewer gViewer = (ValidationGraphicalViewer) viewer;
            EditDomain domain = gViewer.getEditDomain();
            if (domain instanceof ERSchemaEditDomain) {
                ERSchemaEditDomain erEditorDomain = (ERSchemaEditDomain) domain;
                return (ERSchemaEditor) erEditorDomain.getEditorPart();
            }
        }
    }
    return null;
}
Also used : ValidationGraphicalViewer(com.cubrid.common.ui.er.ValidationGraphicalViewer) EditDomain(org.eclipse.gef.EditDomain) ERSchemaEditDomain(com.cubrid.common.ui.er.editor.ERSchemaEditDomain) ScalableFreeformRootEditPart(org.eclipse.gef.editparts.ScalableFreeformRootEditPart) ERSchemaEditor(com.cubrid.common.ui.er.editor.ERSchemaEditor) ScalableFreeformRootEditPart(org.eclipse.gef.editparts.ScalableFreeformRootEditPart) EditPart(org.eclipse.gef.EditPart) ERSchemaEditDomain(com.cubrid.common.ui.er.editor.ERSchemaEditDomain) EditPartViewer(org.eclipse.gef.EditPartViewer)

Aggregations

ValidationGraphicalViewer (com.cubrid.common.ui.er.ValidationGraphicalViewer)1 ERSchemaEditDomain (com.cubrid.common.ui.er.editor.ERSchemaEditDomain)1 ERSchemaEditor (com.cubrid.common.ui.er.editor.ERSchemaEditor)1 EditDomain (org.eclipse.gef.EditDomain)1 EditPart (org.eclipse.gef.EditPart)1 EditPartViewer (org.eclipse.gef.EditPartViewer)1 ScalableFreeformRootEditPart (org.eclipse.gef.editparts.ScalableFreeformRootEditPart)1