Search in sources :

Example 36 with IProgressService

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);
    }
}
Also used : TracedProcess(org.erlide.tracing.core.mvc.model.TracedProcess) IProgressService(org.eclipse.ui.progress.IProgressService)

Example 37 with IProgressService

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);
}
Also used : IProgressService(org.eclipse.ui.progress.IProgressService)

Example 38 with IProgressService

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;
}
Also used : CommandManager(org.talend.mdm.repository.core.command.CommandManager) ICommand(org.talend.mdm.repository.core.command.ICommand) IProgressService(org.eclipse.ui.progress.IProgressService) InvocationTargetException(java.lang.reflect.InvocationTargetException)

Aggregations

IProgressService (org.eclipse.ui.progress.IProgressService)38 InvocationTargetException (java.lang.reflect.InvocationTargetException)18 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)17 IRunnableWithProgress (org.eclipse.jface.operation.IRunnableWithProgress)15 IStatus (org.eclipse.core.runtime.IStatus)11 IOException (java.io.IOException)7 Status (org.eclipse.core.runtime.Status)6 IWorkbench (org.eclipse.ui.IWorkbench)6 File (java.io.File)5 CoreException (org.eclipse.core.runtime.CoreException)5 IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)4 IContext (org.talend.core.model.process.IContext)4 ProcessorException (org.talend.designer.runprocess.ProcessorException)4 MessageFormat (java.text.MessageFormat)3 Date (java.util.Date)3 IProject (org.eclipse.core.resources.IProject)3 OperationCanceledException (org.eclipse.core.runtime.OperationCanceledException)3 ILaunchConfiguration (org.eclipse.debug.core.ILaunchConfiguration)3 IProcessor (org.talend.designer.runprocess.IProcessor)3 ClearPerformanceAction (org.talend.designer.runprocess.ui.actions.ClearPerformanceAction)3