use of com.cubrid.cubridmanager.core.broker.task.StartBrokerEnvTask in project cubrid-manager by CUBRID.
the class StartBrokerEnvAction method run.
/**
* Override the run method in order to complete starting broker environment
*
*/
public void run() {
final Object[] obj = this.getSelectedObj();
CubridBrokerFolder selection = (CubridBrokerFolder) obj[0];
if (null == selection) {
return;
}
ServerInfo serverInfo = selection.getServer().getServerInfo();
StartBrokerEnvTask task = new StartBrokerEnvTask(serverInfo);
TaskExecutor taskExecutor = new CommonTaskExec(Messages.startBrokerEnvTaskName);
taskExecutor.addTask(task);
new ExecTaskWithProgress(taskExecutor).exec();
if (!taskExecutor.isSuccess()) {
return;
}
selection.setRunning(true);
TreeViewer treeViewer = (TreeViewer) this.getSelectionProvider();
CommonUITool.refreshNavigatorTree(treeViewer, selection);
ActionManager.getInstance().fireSelectionChanged(getSelection());
}
Aggregations