Package org.eclipse.core.runtime

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


                                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);
                    }
                }
View Full Code Here


                if (command instanceof PostDeterminedEffectCommand) {
                    ((PostDeterminedEffectCommand)command).execute(submonitor);
                }else{
                    command.run(submonitor);
                }
                submonitor.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 {
View Full Code Here

                if( Platform.inDevelopmentMode() ){
                  System.out.println( "Could not "+current.getName()+":"+t.getLocalizedMessage() );
                  t.printStackTrace();
                }
            } finally {
                subProgressMonitor.done();
            }

            if (ok) {
                // dispatch the event
                dispatchPassed(current);
View Full Code Here

                    next.setPrevious(current);
                    try {
                        subProgressMonitor = new SubProgressMonitor(monitor, 10);
                        next.init(subProgressMonitor);
                    } finally {
                        subProgressMonitor.done();
                    }
                    State prev = current;
                    current = next;

                    dispatchForward(current, prev);
View Full Code Here

            addFeatureCommand.setMap(getMap());
            SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitor, 10);
           
            // run the addFeature command (should result in a featureId we can use for selection)
            addFeatureCommand.run(subProgressMonitor);
            subProgressMonitor.done();

            this.oldFeature = getMap().getEditManager().getEditFeature();
            this.oldLayer = getMap().getEditManager().getEditLayer();
            this.oldID = geom.getFeatureIDRef().get();
           
View Full Code Here

            layer.eSetDeliver(false);
            layer.setFilter(oldSelection);

            SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitor, 10);
            addFeatureCommand.rollback(subProgressMonitor);
            subProgressMonitor.done();
            geom.getFeatureIDRef().set(oldID);

            getMap().getEditManagerInternal().setEditFeature(oldFeature, (Layer) oldLayer);
            if (deselectCreatedFeature) {
                EditBlackboard bb = geom.getEditBlackboard();
View Full Code Here

            layer.eSetDeliver(false);
            addFeatureCommand = new AddFeatureCommand(feature, layer);
            addFeatureCommand.setMap(getMap());
            SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitor, 10);
            addFeatureCommand.run(subProgressMonitor);
            subProgressMonitor.done();

            this.oldFeature = getMap().getEditManager().getEditFeature();
            this.oldLayer = getMap().getEditManager().getEditLayer();
            this.oldID = geom.getFeatureIDRef().get();
            geom.getFeatureIDRef().set(addFeatureCommand.getFid());
View Full Code Here

            layer.eSetDeliver(false);
            layer.setFilter(oldSelection);

            SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitor, 10);
            addFeatureCommand.rollback(subProgressMonitor);
            subProgressMonitor.done();
            geom.getFeatureIDRef().set(oldID);

            getMap().getEditManagerInternal().setEditFeature(oldFeature, (Layer) oldLayer);
            if (deselectCreatedFeature) {
                EditBlackboard bb = geom.getEditBlackboard();
View Full Code Here

            for( UndoableMapCommand command : commands ) {
                command.setMap(getMap());
                index+=inc;
                SubProgressMonitor subProgressMonitor = new SubProgressMonitor(monitor, (int) index);
                command.run(subProgressMonitor);
                subProgressMonitor.done();
                if( index>1 ){
                    index=0;
                }
            }
        }finally{
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.