Search in sources :

Example 1 with OpenSerialDetailInfoPartProgress

use of com.cubrid.common.ui.spi.progress.OpenSerialDetailInfoPartProgress in project cubrid-manager by CUBRID.

the class SerialDashboardEditorPart method refresh.

public void refresh() {
    OpenSerialDetailInfoPartProgress progress = new OpenSerialDetailInfoPartProgress(database);
    progress.loadSerialInfoList();
    if (progress.isSuccess()) {
        serialList = progress.getSerialList();
        setInputs();
    }
    serialChangeFlag = false;
}
Also used : OpenSerialDetailInfoPartProgress(com.cubrid.common.ui.spi.progress.OpenSerialDetailInfoPartProgress)

Example 2 with OpenSerialDetailInfoPartProgress

use of com.cubrid.common.ui.spi.progress.OpenSerialDetailInfoPartProgress in project cubrid-manager by CUBRID.

the class OpenTargetAction method openSerialsDetailInfoEditor.

/**
	 * open serial detail info part
	 * @param database
	 */
public void openSerialsDetailInfoEditor(CubridDatabase database, String serialName) {
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (null == window) {
        return;
    }
    if (database == null) {
        return;
    }
    /*Check it open same editor*/
    IEditorPart editorPart = getOpenedEditorPart(database, SerialDashboardEditorPart.ID);
    if (editorPart == null) {
        OpenSerialDetailInfoPartProgress progress = new OpenSerialDetailInfoPartProgress(database);
        progress.loadSerialInfoList();
        if (progress.isSuccess()) {
            SerialDashboardInput input = new SerialDashboardInput(database, progress.getSerialList());
            try {
                SerialDashboardEditorPart serialDetailInfoPart = null;
                serialDetailInfoPart = (SerialDashboardEditorPart) window.getActivePage().openEditor(input, SerialDashboardEditorPart.ID);
                serialDetailInfoPart.select(serialName);
            } catch (PartInitException e) {
                LOGGER.error("Can not initialize the serial view list UI.", e);
            }
        }
    } else {
        SerialDashboardEditorPart serialDetailInfoPart = (SerialDashboardEditorPart) editorPart;
        window.getActivePage().activate(serialDetailInfoPart);
        serialDetailInfoPart.refresh();
        serialDetailInfoPart.select(serialName);
    }
}
Also used : IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) OpenSerialDetailInfoPartProgress(com.cubrid.common.ui.spi.progress.OpenSerialDetailInfoPartProgress) SerialDashboardEditorPart(com.cubrid.common.ui.cubrid.serial.editor.SerialDashboardEditorPart) SerialDashboardInput(com.cubrid.common.ui.cubrid.serial.editor.SerialDashboardInput) IEditorPart(org.eclipse.ui.IEditorPart) PartInitException(org.eclipse.ui.PartInitException)

Aggregations

OpenSerialDetailInfoPartProgress (com.cubrid.common.ui.spi.progress.OpenSerialDetailInfoPartProgress)2 SerialDashboardEditorPart (com.cubrid.common.ui.cubrid.serial.editor.SerialDashboardEditorPart)1 SerialDashboardInput (com.cubrid.common.ui.cubrid.serial.editor.SerialDashboardInput)1 IEditorPart (org.eclipse.ui.IEditorPart)1 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)1 PartInitException (org.eclipse.ui.PartInitException)1