Search in sources :

Example 1 with DatabaseLogListDialog

use of com.cubrid.cubridmanager.ui.mondashboard.dialog.DatabaseLogListDialog in project cubrid-manager by CUBRID.

the class OpenDatabaseLogAction method run.

/**
	 * open database log
	 * 
	 * @see org.eclipse.jface.action.Action#run()
	 */
public void run() {
    Object[] objArr = this.getSelectedObj();
    if (objArr == null || objArr.length <= 0 || !isSupported(objArr[0])) {
        setEnabled(false);
        return;
    }
    DatabaseMonitorPart dbMonPart = (DatabaseMonitorPart) objArr[0];
    DatabaseNode dbNode = (DatabaseNode) dbMonPart.getModel();
    String dbName = dbNode.getDbName();
    HostNode hostNode = dbNode.getParent();
    ServerInfo serverInfo = hostNode.getServerInfo();
    Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    DatabaseLogListDialog dialog = new DatabaseLogListDialog(shell, dbName, serverInfo);
    dialog.open();
}
Also used : Shell(org.eclipse.swt.widgets.Shell) DatabaseNode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.DatabaseNode) ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) HostNode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.HostNode) DatabaseLogListDialog(com.cubrid.cubridmanager.ui.mondashboard.dialog.DatabaseLogListDialog) DatabaseMonitorPart(com.cubrid.cubridmanager.ui.mondashboard.editor.parts.DatabaseMonitorPart)

Aggregations

ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)1 DatabaseLogListDialog (com.cubrid.cubridmanager.ui.mondashboard.dialog.DatabaseLogListDialog)1 DatabaseNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.DatabaseNode)1 HostNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.HostNode)1 DatabaseMonitorPart (com.cubrid.cubridmanager.ui.mondashboard.editor.parts.DatabaseMonitorPart)1 Shell (org.eclipse.swt.widgets.Shell)1