Search in sources :

Example 1 with OpenJobAutomationInfoPartProgress

use of com.cubrid.cubridmanager.ui.cubrid.jobauto.progress.OpenJobAutomationInfoPartProgress in project cubrid-manager by CUBRID.

the class OpenJobAutomationInfoAction method openJobsDetailInfoEditor.

/**
		 * open job detail info part
		 * @param database
		 */
public void openJobsDetailInfoEditor(CubridDatabase database) {
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (null == window) {
        return;
    }
    if (database == null) {
        return;
    }
    /*Check it open same editor*/
    IEditorPart editorPart = getOpenedEditorPart(database, JobAutoDashboardEditorPart.ID);
    if (editorPart == null) {
        OpenJobAutomationInfoPartProgress progress = new OpenJobAutomationInfoPartProgress(database);
        progress.loadJobAutomationInfoList();
        if (progress.isSuccess()) {
            JobAutoDashboardInput input = new JobAutoDashboardInput(database, progress.getBackupPlanInfoList(), progress.getQueryPlanInfoList());
            try {
                window.getActivePage().openEditor(input, JobAutoDashboardEditorPart.ID);
            } catch (PartInitException e) {
                LOGGER.error("Can not initialize the trigger view list UI.", e);
            }
        }
    } else {
        JobAutoDashboardEditorPart jobAutoDetailInfoPart = (JobAutoDashboardEditorPart) editorPart;
        window.getActivePage().activate(jobAutoDetailInfoPart);
        jobAutoDetailInfoPart.refreshAll();
    }
}
Also used : IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) OpenJobAutomationInfoPartProgress(com.cubrid.cubridmanager.ui.cubrid.jobauto.progress.OpenJobAutomationInfoPartProgress) JobAutoDashboardInput(com.cubrid.cubridmanager.ui.cubrid.jobauto.editor.JobAutoDashboardInput) JobAutoDashboardEditorPart(com.cubrid.cubridmanager.ui.cubrid.jobauto.editor.JobAutoDashboardEditorPart) IEditorPart(org.eclipse.ui.IEditorPart) PartInitException(org.eclipse.ui.PartInitException)

Example 2 with OpenJobAutomationInfoPartProgress

use of com.cubrid.cubridmanager.ui.cubrid.jobauto.progress.OpenJobAutomationInfoPartProgress in project cubrid-manager by CUBRID.

the class JobAutoDashboardEditorPart method refreshAll.

public void refreshAll() {
    OpenJobAutomationInfoPartProgress progress = new OpenJobAutomationInfoPartProgress(database);
    progress.loadJobAutomationInfoList();
    if (progress.isSuccess()) {
        backupPlanInfoList = progress.getBackupPlanInfoList();
        queryPlanInfoList = progress.getQueryPlanInfoList();
        setInputs(true, true);
    }
    backupPlanInfoFlag = false;
    queryPlanInfoFlag = false;
}
Also used : OpenJobAutomationInfoPartProgress(com.cubrid.cubridmanager.ui.cubrid.jobauto.progress.OpenJobAutomationInfoPartProgress)

Example 3 with OpenJobAutomationInfoPartProgress

use of com.cubrid.cubridmanager.ui.cubrid.jobauto.progress.OpenJobAutomationInfoPartProgress in project cubrid-manager by CUBRID.

the class JobAutoDashboardEditorPart method refreshBackupPlan.

public void refreshBackupPlan() {
    OpenJobAutomationInfoPartProgress progress = new OpenJobAutomationInfoPartProgress(database, true, false);
    progress.loadJobAutomationInfoList();
    if (progress.isSuccess()) {
        backupPlanInfoList = progress.getBackupPlanInfoList();
        setInputs(true, false);
    }
    backupPlanInfoFlag = false;
}
Also used : OpenJobAutomationInfoPartProgress(com.cubrid.cubridmanager.ui.cubrid.jobauto.progress.OpenJobAutomationInfoPartProgress)

Example 4 with OpenJobAutomationInfoPartProgress

use of com.cubrid.cubridmanager.ui.cubrid.jobauto.progress.OpenJobAutomationInfoPartProgress in project cubrid-manager by CUBRID.

the class JobAutoDashboardEditorPart method refreshQueryPlan.

public void refreshQueryPlan() {
    OpenJobAutomationInfoPartProgress progress = new OpenJobAutomationInfoPartProgress(database, false, true);
    progress.loadJobAutomationInfoList();
    if (progress.isSuccess()) {
        queryPlanInfoList = progress.getQueryPlanInfoList();
        setInputs(false, true);
    }
    queryPlanInfoFlag = false;
}
Also used : OpenJobAutomationInfoPartProgress(com.cubrid.cubridmanager.ui.cubrid.jobauto.progress.OpenJobAutomationInfoPartProgress)

Aggregations

OpenJobAutomationInfoPartProgress (com.cubrid.cubridmanager.ui.cubrid.jobauto.progress.OpenJobAutomationInfoPartProgress)4 JobAutoDashboardEditorPart (com.cubrid.cubridmanager.ui.cubrid.jobauto.editor.JobAutoDashboardEditorPart)1 JobAutoDashboardInput (com.cubrid.cubridmanager.ui.cubrid.jobauto.editor.JobAutoDashboardInput)1 IEditorPart (org.eclipse.ui.IEditorPart)1 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)1 PartInitException (org.eclipse.ui.PartInitException)1