Examples of unload()


Examples of org.eclipse.emf.ecore.resource.Resource.unload()

          public boolean handleResourceDeleted(Resource resource) {
            for (Iterator it = myEditingDomain.getResourceSet()
                .getResources().iterator(); it.hasNext();) {
              Resource nextResource = (Resource) it.next();
              nextResource.unload();
            }
            if (myViewer != null) {
              myViewer.getControl().getDisplay().asyncExec(
                  myViewerRefreshRunnable);
            }
View Full Code Here

Examples of org.eclipse.emf.ecore.resource.Resource.unload()

          public boolean handleResourceMoved(Resource resource,
              final URI newURI) {
            for (Iterator it = myEditingDomain.getResourceSet()
                .getResources().iterator(); it.hasNext();) {
              Resource nextResource = (Resource) it.next();
              nextResource.unload();
            }
            if (myViewer != null) {
              myViewer.getControl().getDisplay().asyncExec(
                  myViewerRefreshRunnable);
            }
View Full Code Here

Examples of org.eclipse.emf.ecore.resource.Resource.unload()

    myWorkspaceSynchronizer = null;
    myViewerRefreshRunnable = null;
    for (Iterator it = myEditingDomain.getResourceSet().getResources()
        .iterator(); it.hasNext();) {
      Resource resource = (Resource) it.next();
      resource.unload();
    }
    ((TransactionalEditingDomain) myEditingDomain).dispose();
    myEditingDomain = null;
  }
View Full Code Here

Examples of org.eclipse.emf.ecore.resource.Resource.unload()

                .getDefaultLoadOptions());
            // @see 171060
            // options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
            resource.load(options);
          } catch (IOException e) {
            resource.unload();
            throw e;
          }
        }
        if (uri.fragment() != null) {
          EObject rootElement = resource.getEObject(uri.fragment());
View Full Code Here

Examples of org.eclipse.emf.ecore.resource.Resource.unload()

        fireElementStateChangeFailed(element);
        throw new CoreException(new Status(IStatus.ERROR,
            OntoUML.diagram.part.OntoUMLDiagramEditorPlugin.ID, 0,
            e.getLocalizedMessage(), null));
      }
      newResource.unload();
    }
  }

  /**
   * @generated
 
View Full Code Here

Examples of org.eclipse.emf.ecore.resource.Resource.unload()

    public void dispose() {
      getResourceSet().eAdapters().remove(myResourceSetListener);
      for (Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = getLoadedResourcesIterator(); it
          .hasNext();) {
        Resource resource = (Resource) it.next();
        resource.unload();
      }
    }

    /**
     * @generated
 
View Full Code Here

Examples of org.eclipse.emf.ecore.resource.Resource.unload()

                    resource.save(ProjectPlugin.getPlugin().saveOptions);
                    if (!resource.getContents().contains(
                            ProjectPlugin.getPlugin().getProjectRegistry()))
                        ;
                    resource.unload();
                }
            });
        } catch (Exception e) {
            ProjectPlugin.log("", e); //$NON-NLS-1$
        }
View Full Code Here

Examples of org.eclipse.emf.ecore.resource.Resource.unload()

    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

Examples of org.eclipse.emf.ecore.resource.Resource.unload()

      project.eSetDeliver(true);

      Resource resource = project.eResource();
            resources.add(resource);
            if( resource!=null)
                resource.unload();
        }
       
        projects.clear();
       
        for( Resource r : resources ) {
View Full Code Here

Examples of org.eclipse.emf.ecore.resource.Resource.unload()

        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);
            }
        }
       
        project=registry.getDefaultProject();
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.