use of org.eclipse.ui.progress.IProgressService in project erlide_eclipse by erlang.
the class ControlPanelView method fillProcessesList.
private void fillProcessesList(final TableViewer tableViewer) {
final IProgressService ps = PlatformUI.getWorkbench().getProgressService();
try {
ps.busyCursorWhile(pm -> {
final TracedProcess[] processesList = ProcessHelper.getProcsOnTracedNodes();
TraceBackend.getInstance().setProcesses(processesList);
});
} catch (final Exception e) {
ErlLogger.error(e);
}
}
use of org.eclipse.ui.progress.IProgressService in project tmdm-studio-se by Talend.
the class ExportDataContentProcess method processDatas.
/*
* (non-Javadoc)
*
* @see
* org.talend.mdm.repository.core.datacontent.IDataContentProcess#processDatas(org.eclipse.core.runtime.IProgressMonitor
* )
*/
public void processDatas(DataProcessRule rule) throws InterruptedException, InvocationTargetException {
IProgressService progressService = getProcessService();
ExportProcess process = new ExportProcess(rule);
progressService.run(true, true, process);
}
use of org.eclipse.ui.progress.IProgressService in project tmdm-studio-se by Talend.
the class DeployService method runCommands.
public IStatus runCommands(List<AbstractDeployCommand> commands, MDMServerDef serverDef) {
filterInvalidCommands(commands);
reorderCommandObjects(commands);
CommandManager manager = CommandManager.getInstance();
List<ICommand> compundCommands = manager.convertToDeployCompundCommands(commands, serverDef);
manager.arrangeForJobCommands(compundCommands);
//
try {
IProgressService progressService = null;
if (PlatformUI.isWorkbenchRunning()) {
progressService = PlatformUI.getWorkbench().getProgressService();
} else {
progressService = ConsoleProgressService.getInstance();
}
DeployProcess runnable = new DeployProcess(compundCommands);
progressService.run(true, true, runnable);
return runnable.getStatus();
} catch (InvocationTargetException e) {
log.error(e.getMessage(), e);
} catch (InterruptedException e) {
}
return Status.CANCEL_STATUS;
}
Aggregations