use of com.cubrid.cubridmanager.ui.service.editor.ServiceDashboardEditorInput in project cubrid-manager by CUBRID.
the class ServiceDashboardAction method run.
/**
* @see org.eclipse.jface.action.Action#run() Override the run method in
* order to complete showing brokers status server to a broker
*/
public void run() {
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (null == window) {
return;
}
/*Check it open same editor*/
ServiceDashboardEditor editorPart = findOpenedEditorPart();
if (editorPart == null) {
ServiceDashboardEditorInput editorInput = new ServiceDashboardEditorInput();
editorInput.setName("");
editorInput.setToolTipText(Messages.serviceDashboardPartToolTip);
try {
editorPart = (ServiceDashboardEditor) window.getActivePage().openEditor(editorInput, ServiceDashboardEditor.ID);
editorPart.loadAllData();
} catch (PartInitException ex) {
LOGGER.error(ex.getMessage());
}
} else {
window.getActivePage().activate(editorPart);
editorPart.loadAllData();
}
}
Aggregations