Examples of run()


Examples of org.locationtech.udig.project.command.UndoableComposite.run()

        if( handler.getCurrentState()==EditState.CREATING)
            commands.add(new SetEditStateCommand(handler, EditState.MODIFYING));
        UndoableComposite undoableComposite = new UndoableComposite(commands);
        undoableComposite.setMap(handler.getContext().getMap());
        try {
            undoableComposite.run(new NullProgressMonitor());
        } catch (Exception e1) {
            throw new RuntimeException(e1);
        }
        return new UndoRedoCommand(undoableComposite);
    }
View Full Code Here

Examples of org.locationtech.udig.project.command.UndoableMapCommand.run()

                        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){
                        behaviour.handleError(handler, e, c);
View Full Code Here

Examples of org.locationtech.udig.project.interceptor.FeatureInterceptor.run()

            String id = element.getAttribute("id");
            if (FeatureInterceptor.CREATED_ID.equals(element.getName())) {
                try {
                    FeatureInterceptor interceptor = (FeatureInterceptor) element
                            .createExecutableExtension("class");
                    interceptor.run(feature);
                } catch (Exception e) {
                    ProjectPlugin.log("FeatureInterceptor " + id + ":" + e, e);
                }
            }
        }
View Full Code Here

Examples of org.locationtech.udig.project.interceptor.LayerInterceptor.run()

            if (element.getName().equals(LayerInterceptor.CREATED_ID)) {
                String attribute = element.getAttribute("name"); //$NON-NLS-1$
                try {
                    LayerInterceptor interceptor = (LayerInterceptor) element
                            .createExecutableExtension("class"); //$NON-NLS-1$
                    interceptor.run(layer);
                } catch (CoreException e) {
                    ProjectPlugin
                            .log("Error creating class: " + element.getAttribute("class") + " part of layer interceptor: " + attribute, e); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
                } catch (Throwable t) {
                    ProjectPlugin.log("Error running interceptor: " + attribute, t); //$NON-NLS-1$
View Full Code Here

Examples of org.locationtech.udig.project.interceptor.MapInterceptor.run()

            if (!MapInterceptor.CLOSING_ID.equals(element.getName())) //$NON-NLS-1$
                continue;
            try {
                MapInterceptor interceptor = (MapInterceptor) element
                        .createExecutableExtension("class"); //$NON-NLS-1$
                interceptor.run(getMap());
            } catch (Exception e) {
                ProjectPlugin.log("", e); //$NON-NLS-1$
            }
        }
    }
View Full Code Here

Examples of org.locationtech.udig.project.internal.SetDefaultStyleProcessor.run()

            IGeoResource geoResource = layer.getGeoResource();
            if( geoResource == null ){
                throw new NullPointerException("Layer requires GeoResource to determine default style");
            }
            SetDefaultStyleProcessor defaultStyleProcessor = createDefaultStyles(geoResource, layer);
            defaultStyleProcessor.run();
        }
    }

    /**
     * Creates a default style from each styleContent extension and puts them on the style blackboard of the layer.
View Full Code Here

Examples of org.locationtech.udig.project.internal.commands.CreateMapCommand.run()

                    finalDropHandler = new UDIGDropHandler();
                    activeEditor=null;
                } else if( activeEditor==null ){
                    CreateMapCommand command = new CreateMapCommand(null,Collections.<IGeoResource>emptyList(), null);
                    try {
                        command.run(new NullProgressMonitor());
                    } catch (Exception e) {
                        throw (RuntimeException) new RuntimeException( ).initCause( e );
                    }
                    finalMap = (Map) command.getCreatedMap();
                    finalDropHandler = new UDIGDropHandler();
View Full Code Here

Examples of org.locationtech.udig.project.internal.commands.selection.SelectLayerCommand.run()

                if (layer.getMap() == getMap()
                        && getMap().getEditManager().getSelectedLayer() != layer) {
                    SelectLayerCommand selectLayerCommand = new SelectLayerCommand(layer);
                    selectLayerCommand.setMap(getMap());
                    try {
                        selectLayerCommand.run(ProgressManager.instance().get());
                    } catch (Exception e) {
                        throw (RuntimeException) new RuntimeException().initCause(e);
                    }
                    getMap().sendCommandSync(new UndoRedoCommand(selectLayerCommand));
                }
View Full Code Here

Examples of org.locationtech.udig.project.ui.commands.IDrawCommand.run()

                 
                  if (command.isValid()) {
                      command.setGraphics(g, pane);
                      try {
                          command.setMap(this.pane.getMapEditor().getMap());
                          command.run(new NullProgressMonitor());
                      } catch (Exception e) {
                          ProjectUIPlugin.log("", e); //$NON-NLS-1$
                            if(pre){
                                commands.removePre(command);
                            }else{
View Full Code Here

Examples of org.locationtech.udig.project.ui.commands.OpenProjectElementCommand.run()

    };
    Runner runner = new Runner(runners,2000);
    runner.schedule();
   
    OpenProjectElementCommand omCommand = new OpenProjectElementCommand(map);
    omCommand.run(new NullProgressMonitor());
   
    Display display = Display.getCurrent();
    while(!display.isDisposed() && !done) {
      display.readAndDispatch();
    }
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.