Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IProgressMonitor


                    try{
                        c=behaviour.getCommand(handler);
                        if( c==null )
                            continue;
                        c.setMap(getMap());
                        IProgressMonitor submonitor = new SubProgressMonitor(monitor, 10);
                        if (c instanceof PostDeterminedEffectCommand) {
                            PostDeterminedEffectCommand command = (PostDeterminedEffectCommand) c;
                            if( command.execute(submonitor) )
                                commandsRan.add(command);
                        }else{
                        c.run(submonitor);
                        commandsRan.add(c);
                        }
                        submonitor.done();
                    }catch(Exception e){
                      EditPlugin.trace( e.getClass().getName()+" executing "+c+":"+e.getMessage(), e);
                        behaviour.handleError(handler, e, c);
                    }
                }
            }
        }else{
            monitor.beginTask(getName(), commandsRan.size()*12);
            monitor.worked(2);
            for( UndoableMapCommand command : commandsRan ) {
                command.setMap(getMap());
                IProgressMonitor submonitor = new SubProgressMonitor(monitor, 10);
                if (command instanceof PostDeterminedEffectCommand) {
                    ((PostDeterminedEffectCommand)command).execute(submonitor);
                }else{
                    command.run(submonitor);
                }
                submonitor.done();
            }
        }
        return !commandsRan.isEmpty();
    }
View Full Code Here


    public void rollback( IProgressMonitor monitor ) throws Exception {
        monitor.beginTask(getName(), commandsRan.size()*12);
        monitor.worked(2);
        for( UndoableMapCommand command : commandsRan ) {
            command.setMap(getMap());
            IProgressMonitor submonitor = new SubProgressMonitor(monitor, 10);
            command.rollback(submonitor);
            submonitor.done();
        }
    }
View Full Code Here

        parent.setLayout(new GridLayout());
        GridData gridData2 = new GridData(SWT.FILL, SWT.FILL, true, true);
        gridData2.heightHint = 500;
        parent.setLayoutData(gridData2);
        //create the featureCollection
        IProgressMonitor monitor = new NullProgressMonitor();
        try {
            source = getSelectedLayer().getResource(FeatureSource.class, monitor); //monitor
            if (source == null) return;
            collection = source.getFeatures();
        } catch (IOException e) {
View Full Code Here

    /**
     * Starts the workflow by moving to the first state. This method must only be called once. This
     * method executes synchronously performing work in the current thread and blocks.
     */
    public void start( final IProgressMonitor monitor ) {
        final IProgressMonitor progressMonitor = checkMonitor(monitor);

        threading.init();

        Runnable request = new Runnable(){
            public void run() {
View Full Code Here

     *
     * @return True if the state
     */
    public void next( final IProgressMonitor monitor ) {

        final IProgressMonitor progressMonitor = checkMonitor(monitor);

        Runnable request = new Runnable(){
            public void run() {
                doNextInternal(progressMonitor);
            }
View Full Code Here

    private IProgressMonitor checkMonitor( final IProgressMonitor monitor ) {
        if (monitor == null) {
            throw new NullPointerException("monitor is null"); //$NON-NLS-1$
        }

        final IProgressMonitor progressMonitor;
        if (monitor instanceof OffThreadProgressMonitor) {
            progressMonitor = monitor;
        } else {
            progressMonitor = new OffThreadProgressMonitor(monitor);
        }
View Full Code Here

    /**
     * Moves the workflow to the previous state. This method executes synchronously performing work
     * in the current thread and blocks.
     */
    public void previous( final IProgressMonitor monitor ) {
        final IProgressMonitor progressMonitor = checkMonitor(monitor);

        Runnable request = new Runnable(){
            public void run() {
                try {
                    assertStarted();
View Full Code Here

* Add an additional binary type
* @param binaryType
* @param packageBinding
*/
public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) {
  IProgressMonitor progressMonitor = this.builder.hierarchy.progressMonitor;
  if (progressMonitor != null && progressMonitor.isCanceled())
    throw new OperationCanceledException();

  BinaryTypeBinding typeBinding = this.lookupEnvironment.createBinaryTypeFrom(binaryType, packageBinding, accessRestriction);
  try {
    this.remember(binaryType, typeBinding);
View Full Code Here

* Add additional source types
* @param sourceTypes
* @param packageBinding
*/
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) {
  IProgressMonitor progressMonitor = this.builder.hierarchy.progressMonitor;
  if (progressMonitor != null && progressMonitor.isCanceled())
    throw new OperationCanceledException();

  // find most enclosing type first (needed when explicit askForType(...) is done
  // with a member type (e.g. p.A$B))
  ISourceType sourceType = sourceTypes[0];
View Full Code Here

  // be resilient and fix super type bindings
  fixSupertypeBindings();

  int objectIndex = -1;
  IProgressMonitor progressMonitor = this.builder.hierarchy.progressMonitor;
  for (int current = this.typeIndex; current >= 0; current--) {
    if (progressMonitor != null && progressMonitor.isCanceled())
      throw new OperationCanceledException();
   
    ReferenceBinding typeBinding = this.typeBindings[current];

    // java.lang.Object treated at the end
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.IProgressMonitor

Copyright © 2018 www.massapicom. 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.