Examples of sendCommandSync()


Examples of org.locationtech.udig.project.IMap.sendCommandSync()

            public String getName() {
                return "Create Hole Command"; //$NON-NLS-1$
            }
           
        };
        map.sendCommandSync( drillHoleCommand );
    }

}
View Full Code Here

Examples of org.locationtech.udig.project.IMap.sendCommandSync()

            project.sendSync(cmCommand);
            map = cmCommand.getCreatedMap();
            layers=map.getMapLayers();
        } else {
            AddLayersCommand alCommand = new AddLayersCommand(cleanedGeoResources, startPosition2);
            map.sendCommandSync(alCommand);
            layers=alCommand.getLayers();
        }

        if (!ApplicationGISInternal.getOpenMaps().contains(map)) {
            openMap(map, wait);
View Full Code Here

Examples of org.locationtech.udig.project.IMap.sendCommandSync()

                                                    toRemove.add(mapLayers.get(i));
                                                }

                                            }
                                            if (toRemove.size() > 0)
                                                activeMap.sendCommandSync(new DeleteLayersCommand((ILayer[]) toRemove
                                                        .toArray(new ILayer[toRemove.size()])));

                                            // rename the map
                                            renameGrassRasterMap(mapsetName, oldMapName, newMapName);
                                            // remove old map
View Full Code Here

Examples of org.locationtech.udig.project.IMap.sendCommandSync()

                                                        toRemove.add(mapLayers.get(i));
                                                    }

                                                }
                                                if (toRemove.size() > 0)
                                                    activeMap.sendCommandSync(new DeleteLayersCommand((ILayer[]) toRemove
                                                            .toArray(new ILayer[toRemove.size()])));

                                            } catch (Exception e) {
                                                MessageDialog.openInformation(shell, "Information",
                                                        "Problems occurred while removing the map.");
View Full Code Here

Examples of org.locationtech.udig.project.internal.Map.sendCommandSync()

        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(500, 512));
        ValidateOverlaps validator = new ValidateOverlaps();
        validator.op(Display.getDefault(), map.getLayersInternal().get(0),
                new NullProgressMonitor());
        assertEquals(1, validator.genericResults.failedFeatures.size()); //only line[0] and line[1] should fail (counts as 1)
        map.sendCommandSync(new AbstractCommand(){

            public void run( IProgressMonitor monitor ) throws Exception {
            }

            public String getName() {
View Full Code Here

Examples of org.locationtech.udig.project.internal.Map.sendCommandSync()

        IGeoResource resource = MapTests.createGeoResource(features, true);
        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(500,512));
        ValidateGeometry isValidGeometry = new ValidateGeometry();
        isValidGeometry.op(Display.getDefault(), map.getLayersInternal().get(0), new NullProgressMonitor());
        assertEquals(1,isValidGeometry.results.failedFeatures.size());
        map.sendCommandSync(new AbstractCommand(){

            public void run( IProgressMonitor monitor ) throws Exception {
            }

            public String getName() {
View Full Code Here

Examples of org.locationtech.udig.project.internal.Map.sendCommandSync()

                }
            }
            if (legendResource == null)
                return;
            Layer layer = map.getLayerFactory().createLayer(legendResource);
            map.sendCommandSync(BasicCommandFactory.getInstance().createAddLayer(layer));
        } catch (MalformedURLException e) {
            MapGraphicPlugin.log("", e); //$NON-NLS-1$
        } catch (IOException e) {
            MapGraphicPlugin.log("", e); //$NON-NLS-1$
        }
View Full Code Here

Examples of org.locationtech.udig.project.internal.Map.sendCommandSync()

        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(500,512));
        ValidateLineMustBeASinglePart isValidLine = new ValidateLineMustBeASinglePart();
        isValidLine.op(Display.getDefault(), map.getLayersInternal().get(0), new NullProgressMonitor());
        //System.out.println(isValidLine.genericResults.failedFeatures.size()+" failed feature");
        assertEquals(1,isValidLine.results.failedFeatures.size());
        map.sendCommandSync(new AbstractCommand(){

            public void run( IProgressMonitor monitor ) throws Exception {
            }

            public String getName() {
View Full Code Here

Examples of org.locationtech.udig.project.internal.Map.sendCommandSync()

        Map map = MapTests.createNonDynamicMapAndRenderer(resource, new Dimension(500,512));
        ValidateLineNoSelfIntersect isValidLine = new ValidateLineNoSelfIntersect();
        isValidLine.op(Display.getDefault(), map.getLayersInternal().get(0), new NullProgressMonitor());
        //System.out.println(isValidLine.genericResults.failedFeatures.size()+" failed feature");
        assertEquals(1,isValidLine.results.failedFeatures.size());
        map.sendCommandSync(new AbstractCommand(){

            public void run( IProgressMonitor monitor ) throws Exception {
            }

            public String getName() {
View Full Code Here

Examples of org.locationtech.udig.project.internal.Map.sendCommandSync()

      List<IProjectElement> elements = project.getElements();
          for (IProjectElement element : elements) {
        if( element instanceof Map){
          Map map=(Map) element;
          map.eSetDeliver(false);
          map.sendCommandSync(new NullCommand());
          map.eSetDeliver(true);
        }
      }
           
            project.getElementsInternal().clear();
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.