Package org.eclipse.emf.ecore.resource

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


          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

    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

      updateProblemIndication = false;
      for (Iterator i = changedResources.iterator(); i.hasNext(); ) {
        Resource resource = (Resource)i.next();
        if (resource.isLoaded()) {
          resource.unload();
          try {
            resource.load(Collections.EMPTY_MAP);
          }
          catch (IOException exception) {
            if (!resourceToDiagnosticMap.containsKey(resource)) {
View Full Code Here

      updateProblemIndication = false;
      for (Iterator i = changedResources.iterator(); i.hasNext(); ) {
        Resource resource = (Resource)i.next();
        if (resource.isLoaded()) {
          resource.unload();
          try {
            resource.load(Collections.EMPTY_MAP);
          }
          catch (IOException exception) {
            if (!resourceToDiagnosticMap.containsKey(resource)) {
View Full Code Here

                GMFResourceFactory.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

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

  /**
   * @generated
 
View Full Code Here

      stopResourceListening();
      getResourceSet().eAdapters().remove(myResourceSetListener);
      for (Iterator<Resource> it = getLoadedResourcesIterator(); it
          .hasNext();) {
        Resource resource = it.next();
        resource.unload();
      }
      getEditingDomain().dispose();
    }

    /**
 
View Full Code Here

                GMFResourceFactory.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

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

  /**
   * @generated
 
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.