Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.SubProgressMonitor.done()


              if (exec.isConnected()) {
                exec.disconnect();
              }

              sub.done();

              monitor.done();
              doRefresh();
            } catch (Exception e) {
              log.log(Level.SEVERE, "", e);
View Full Code Here


            int steps=(int)((double)99/(double)members.size());
            for( IResolve resolve : members ) {
                try {
                    SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitor, steps);
                    resolve.dispose( subProgressMonitor);
                    subProgressMonitor.done();
                } catch (Throwable e) {
                    ErrorManager.get().displayException(e, "Error disposing members of catalog: "+getIdentifier(), CatalogPlugin.ID); //$NON-NLS-1$
                }
            }
       
View Full Code Here

                    boolean forced ) throws Exception {
                ISearch[] toDispose = getCatalogs();
                monitor.beginTask(Messages.CatalogPlugin_SavingCatalog, 4 + (4 * toDispose.length));
                SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitor, 4);
                storeToPreferences(subProgressMonitor);
                subProgressMonitor.done();
                for( ISearch catalog : toDispose ) {
                    subProgressMonitor = new SubProgressMonitor(monitor, 4);
                    catalog.dispose(subProgressMonitor);
                    subProgressMonitor.done();
                }
View Full Code Here

                storeToPreferences(subProgressMonitor);
                subProgressMonitor.done();
                for( ISearch catalog : toDispose ) {
                    subProgressMonitor = new SubProgressMonitor(monitor, 4);
                    catalog.dispose(subProgressMonitor);
                    subProgressMonitor.done();
                }
                return true;
            }

        });
View Full Code Here

                                commandsRan.add(command);
                        }else{
                        c.run(submonitor);
                        commandsRan.add(c);
                        }
                        submonitor.done();
                    }catch(Exception e){
                        behaviour.handleError(handler, e, c);
                    }
                }
            }
View Full Code Here

                if (command instanceof PostDeterminedEffectCommand) {
                    ((PostDeterminedEffectCommand)command).execute(submonitor);
                }else{
                    command.run(submonitor);
                }
                submonitor.done();
            }
        }
        monitor.done();
        return !commandsRan.isEmpty();
    }
View Full Code Here

        monitor.worked(2);
        for( UndoableMapCommand command : commandsRan ) {
            command.setMap(getMap());
            IProgressMonitor submonitor = new SubProgressMonitor(monitor, 10);
            command.rollback(submonitor);
            submonitor.done();
        }
    }

    public void run( IProgressMonitor monitor ) throws Exception {
        throw new UnsupportedOperationException("PostDeterminedEffectCommands do not use the run method"); //$NON-NLS-1$
View Full Code Here

                    .execute(subProgressMonitor);
        } else {
            command.run(subProgressMonitor);
            changed = true;
        }
        subProgressMonitor.done();
        return changed;
    }

    @Override
  public void rollback( IProgressMonitor monitor ) throws Exception {
View Full Code Here

                drawMonitor.worked(1);

                if (drawMonitor.isCanceled())
                    break;
            }
            drawMonitor.done();           
        } catch (IOException e) {
            throw new RenderException(e); // rethrow any exceptions encountered
        } catch (FactoryException e) {
            throw new RenderException(e); // rethrow any exceptions encountered
        } finally {
View Full Code Here

                    try{
                        URL identifier = service.getIdentifier();
                        monitor.setTaskName(MessageFormat.format(Messages.ResourceSelectionState_taskName, new Object[] {identifier.getProtocol()+"://"+identifier.getPath()})); //$NON-NLS-1$
                    count += service.resources(subMonitor).size();
                    }finally{
                        subMonitor.done();
                    }
                }
                }finally{
                monitor.done();
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.