Search in sources :

Example 1 with UsersDashboardInput

use of com.cubrid.common.ui.cubrid.user.editor.UsersDashboardInput in project cubrid-manager by CUBRID.

the class OpenTargetAction method openUsersDetailInfoEditor.

/**
	 * open users detail info part
	 * @param database
	 */
public void openUsersDetailInfoEditor(CubridDatabase database) {
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (null == window) {
        return;
    }
    if (database == null) {
        return;
    }
    /*Check it open same editor*/
    IEditorPart editorPart = getOpenedEditorPart(database, UserDashboardEditorPart.ID);
    if (editorPart == null) {
        UsersDashboardInput input = new UsersDashboardInput(database);
        try {
            editorPart = window.getActivePage().openEditor(input, UserDashboardEditorPart.ID);
        } catch (PartInitException e) {
            LOGGER.error("Can not initialize the users view list UI.", e);
        }
    } else {
        UserDashboardEditorPart userDetailInfoPart = (UserDashboardEditorPart) editorPart;
        window.getActivePage().activate(userDetailInfoPart);
        userDetailInfoPart.refresh();
    }
}
Also used : UserDashboardEditorPart(com.cubrid.common.ui.cubrid.user.editor.UserDashboardEditorPart) IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) UsersDashboardInput(com.cubrid.common.ui.cubrid.user.editor.UsersDashboardInput) IEditorPart(org.eclipse.ui.IEditorPart) PartInitException(org.eclipse.ui.PartInitException)

Aggregations

UserDashboardEditorPart (com.cubrid.common.ui.cubrid.user.editor.UserDashboardEditorPart)1 UsersDashboardInput (com.cubrid.common.ui.cubrid.user.editor.UsersDashboardInput)1 IEditorPart (org.eclipse.ui.IEditorPart)1 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)1 PartInitException (org.eclipse.ui.PartInitException)1