Package org.locationtech.udig.project.internal

Examples of org.locationtech.udig.project.internal.ProjectRegistry.eResource()


            }

            URI projectURI = URI.createURI(uri.toString());

            final ProjectRegistry registry = getProjectRegistry();
            Resource registryResource = registry.eResource();
            if (registryResource == null) {
                System.out.println("Registery was unable to load"); //$NON-NLS-1$
                throw new Error(Messages.ProjectRegistryImpl_load_error);
            }
View Full Code Here


                /**
                 * @see org.eclipse.emf.common.notify.impl.AdapterImpl#notifyChanged(org.eclipse.emf.common.notify.Notification)
                 */
                public void notifyChanged(Notification msg) {
                    if (msg.getFeatureID(ProjectRegistry.class) == ProjectPackage.PROJECT_REGISTRY__PROJECTS) {
                        registry.eResource().setModified(true);
                    }
                }
            });
        }
        resourceSet.eSetDeliver(false);
View Full Code Here

  }
 
  @After
  public void tearDown() throws Exception {
    ProjectRegistry registry = ProjectPlugin.getPlugin().getProjectRegistry();
    Resource registryResource=registry.eResource();
    List<Project> project=new ArrayList<Project>();
    project.addAll(registry.getProjects());
   
    for (Project project2 : project) {
      registry.getProjects().remove(project2);
View Full Code Here

    if( registryResource == null )
      return;
    Iterator iter=registryResource.getResourceSet().getResources().iterator();
    while ( iter.hasNext() ){
      Resource resource=(Resource) iter.next();
      if( resource==registry.eResource() )
        continue;
      resource.unload();
      File file = new File(resource.getURI().toFileString());
      if( file.exists() )
        file.delete();
View Full Code Here

    public void setUp() throws Exception {
        ProjectRegistry registry = ProjectPlugin.getPlugin().getProjectRegistry();
        List<Project> projects = registry.getProjects();
        registry.getProjects().removeAll(projects);
       
        EList list=registry.eResource().getResourceSet().getResources();
        Set<Resource> toRemove=new HashSet<Resource>();
        for (Iterator iter = list.iterator(); iter.hasNext();) {
            Resource element = (Resource) iter.next();
            if( element!=registry.eResource() ){
                element.unload();
View Full Code Here

       
        EList list=registry.eResource().getResourceSet().getResources();
        Set<Resource> toRemove=new HashSet<Resource>();
        for (Iterator iter = list.iterator(); iter.hasNext();) {
            Resource element = (Resource) iter.next();
            if( element!=registry.eResource() ){
                element.unload();
                toRemove.add(element);
            }
        }
       
View Full Code Here

        parent.delete();
      }
      file.delete();
    }

        registry.eResource().getResourceSet().getResources().removeAll(toRemove);
       
        project=registry.getProject(FileLocator.toFileURL(Platform.getInstanceLocation().getURL()).getFile());

    resource1 = MapTests.createGeoResource(UDIGTestUtil.createDefaultTestFeatures(type1Name,4),false);
    Map map = MapTests.createNonDynamicMapAndRenderer(resource1, new Dimension(512,512));
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.