public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { try { runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Exception e) { return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } return Status.OK_STATUS; } }
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { JavaCore.run(fWorkspaceRunnable, fRule, monitor); } catch (OperationCanceledException e) { throw new InterruptedException(e.getMessage()); } catch (CoreException e) { throw new InvocationTargetException(e); } }
public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { try { runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Exception e) { return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } return Status.OK_STATUS; } }
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { ResourcesPlugin.getWorkspace().run(workspaceRunnable, rule, IWorkspace.AVOID_UPDATE, monitor); } catch (OperationCanceledException e) { throw new InterruptedException(e.getMessage()); } catch (CoreException e) { throw new InvocationTargetException(e); } } }
public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { try { runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Exception e) { return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } return Status.OK_STATUS; } }
/** * {@inheritDoc} */ public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { try { runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Exception e) { return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } return Status.OK_STATUS; }
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { JavaCore.run(fWorkspaceRunnable, fRule, monitor); } catch (OperationCanceledException e) { throw new InterruptedException(e.getMessage()); } catch (CoreException e) { throw new InvocationTargetException(e); } }
@Override public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { JavaCore.run(fWorkspaceRunnable, fRule, monitor); } catch (OperationCanceledException e) { throw new InterruptedException(e.getMessage()); } catch (CoreException e) { throw new InvocationTargetException(e); } }
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { ResourcesPlugin.getWorkspace().run(fWorkspaceRunnable, fRule, IWorkspace.AVOID_UPDATE, monitor); } catch (OperationCanceledException e) { throw new InterruptedException(e.getMessage()); } catch (CoreException e) { throw new InvocationTargetException(e); } } }
public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { try { runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Exception e) { return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } return Status.OK_STATUS; } }
@Override public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { try { runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Exception e) { return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } return Status.OK_STATUS; } }
public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { try { runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Exception e) { return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } return Status.OK_STATUS; }
/** * {@inheritDoc} */ public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { try { runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Exception e) { return new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } return Status.OK_STATUS; }
public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { IStatus result = null; synchronized (this) { try { disableSave = true; runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Throwable e) { result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } finally { disableSave = false; try { save(); } catch (Exception e) { if (result != null) result = new MultiStatus(Activator.ID, IStatus.ERROR, new IStatus[] {result}, e.getMessage(), e); else result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } } } if (result == null) result = Status.OK_STATUS; return result; }
@Override public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { IStatus result = null; synchronized (this) { try { disableSave = true; runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Throwable e) { result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } finally { disableSave = false; try { save(); } catch (Exception e) { if (result != null) result = new MultiStatus(Activator.ID, IStatus.ERROR, new IStatus[] {result}, e.getMessage(), e); else result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } } } if (result == null) result = Status.OK_STATUS; return result; }
public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { IStatus result = null; synchronized (this) { try { disableSave = true; runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Throwable e) { result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } finally { disableSave = false; try { save(); } catch (Exception e) { if (result != null) result = new MultiStatus(Activator.ID, IStatus.ERROR, new IStatus[] {result}, e.getMessage(), e); else result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } } } if (result == null) result = Status.OK_STATUS; return result; }
public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { IStatus result = null; synchronized (this) { try { disableSave = true; runnable.run(monitor); } catch (OperationCanceledException oce) { return new Status(IStatus.CANCEL, Activator.ID, oce.getMessage(), oce); } catch (Throwable e) { result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } finally { disableSave = false; try { save(); } catch (Exception e) { if (result != null) result = new MultiStatus(Activator.ID, IStatus.ERROR, new IStatus[] {result}, e.getMessage(), e); else result = new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e); } } } if (result == null) result = Status.OK_STATUS; return result; }
@Override public void run() { IJobManager manager = Job.getJobManager(); try { manager.beginRule(rule, getEventLoopMonitor()); context.run(false, false, runnable); } catch (InvocationTargetException e) { status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e); } catch (InterruptedException e) { status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e); } catch (OperationCanceledException e) { status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e); } finally { manager.endRule(rule); } }
public void stop(BundleContext context) throws Exception { super.stop(context); ResourcesPlugin.getWorkspace().removeResourceChangeListener(J2EEComponentClasspathUpdater.getInstance()); try { org.eclipse.core.runtime.Platform.getJobManager().join( J2EEElementChangedListener.PROJECT_COMPONENT_UPDATE_JOB_FAMILY, new NullProgressMonitor() ); } catch (OperationCanceledException e) { Logger.getLogger().logError(e.getMessage()); } catch (InterruptedException e) { Logger.getLogger().logError(e.getMessage()); } }
@Override public void run(IProgressMonitor monitor) throws CoreException { try { doApplicationOperation(monitor); getBehaviour().getRefreshHandler().scheduleRefreshForDeploymentChange(getModule()); } catch (OperationCanceledException e) { // ignore so webtools does not show an exception ((Server) getBehaviour().getServer()).setModuleState(getModules(), IServer.STATE_UNKNOWN); // If application operations, like Restart, Start, or PushApplication are canceled, then the publish state is 'indeterminate' // TODO: Don't reference internal Server class. We need to revisit this change and revert back to the original state. ((Server) getBehaviour().getServer()).setServerPublishState(IServer.PUBLISH_STATE_INCREMENTAL); ((Server) getBehaviour().getServer()).setModulePublishState(modules, IServer.PUBLISH_STATE_INCREMENTAL); // Record the canceled operation 'description' to the log file. CloudFoundryPlugin.logWarning(e.getMessage()); } }