Search in sources :

Example 1 with OracleProcedurePackaged

use of org.jkiss.dbeaver.ext.oracle.model.OracleProcedurePackaged in project dbeaver by serge-rider.

the class PackageNavigateHandler method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    final OracleProcedurePackaged procedure = getSelectedProcedure(event);
    if (procedure != null) {
        OraclePackage procPackage = procedure.getParentObject();
        IEditorPart entityEditor = NavigatorHandlerObjectOpen.openEntityEditor(procPackage);
        if (entityEditor instanceof EntityEditor) {
            ((EntityEditor) entityEditor).switchFolder("source.definition");
            SQLEditorBase sqlEditor = entityEditor.getAdapter(SQLEditorBase.class);
            if (sqlEditor != null) {
                new NavigateJob(procedure, sqlEditor).schedule();
            }
        }
    }
    return null;
}
Also used : OracleProcedurePackaged(org.jkiss.dbeaver.ext.oracle.model.OracleProcedurePackaged) OraclePackage(org.jkiss.dbeaver.ext.oracle.model.OraclePackage) SQLEditorBase(org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase) EntityEditor(org.jkiss.dbeaver.ui.editors.entity.EntityEditor) IEditorPart(org.eclipse.ui.IEditorPart)

Aggregations

IEditorPart (org.eclipse.ui.IEditorPart)1 OraclePackage (org.jkiss.dbeaver.ext.oracle.model.OraclePackage)1 OracleProcedurePackaged (org.jkiss.dbeaver.ext.oracle.model.OracleProcedurePackaged)1 EntityEditor (org.jkiss.dbeaver.ui.editors.entity.EntityEditor)1 SQLEditorBase (org.jkiss.dbeaver.ui.editors.sql.SQLEditorBase)1