Examples of eResource()


Examples of org.eclipse.emf.ecore.EObject.eResource()

            Resource r = resources.get(i);
            for( Iterator<EObject> j = r.getAllContents(); j.hasNext(); ) {
                for( Object object : j.next().eCrossReferences() ) {
                    if (object instanceof EObject) {
                        EObject eObject = (EObject) object;
                        Resource otherResource = eObject.eResource();
                        if (otherResource != null && !resources.contains(otherResource)) {
                            resources.add(otherResource);
                        }
                    }
                }
View Full Code Here

Examples of org.eclipse.emf.ecore.EPackage.eResource()

    ResourceSet resourceSet = ((DataGraphImpl)dataGraph).getResourceSet();

    for (Iterator iterator = packages.iterator(); iterator.hasNext(); ) {
      EPackage typePackage = (EPackage)iterator.next();
      Resource resource = typePackage.eResource();
      if (resource == null) {
        resource = resourceSet.createResource(URI.createURI(".ecore"));
        resource.setURI(URI.createURI(typePackage.getNsURI()));
        resource.getContents().add(typePackage);
      }
View Full Code Here

Examples of org.eclipse.emf.ecore.InternalEObject.eResource()

    {
      return CROSS_DOC;
    }
    else
    {
      Resource res = value.eResource();
      return res == helper.getResource() || res == null ? SAME_DOC : CROSS_DOC;
    }
  }

  protected int sameDocMany(EObject o, EStructuralFeature f)
View Full Code Here

Examples of org.eclipse.emf.ecore.sdo.EChangeSummary.eResource()

        EChangeSummary changes = (EChangeSummary) clone.getChangeSummary();
        changes.applyAndReverse();

        ByteArrayOutputStream buf = new ByteArrayOutputStream();
        try {
            changes.eResource().save(buf, null);
            if (SDOPlugin.isTracing(TRACE_TAG)) {
                SDOPlugin.getTraceLog().println("commit:");
                changes.eResource().save(SDOPlugin.getTraceLog(), null);
            }
        } catch (IOException e) {
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.Diagram.eResource()

        .getDiagramDocument(anInput);
    if (document == null) {
      return StructuredSelection.EMPTY;
    }
    Diagram diagram = document.getDiagram();
    IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());
    if (file != null) {
      OntoUML.diagram.navigator.OntoUMLNavigatorItem item = new OntoUML.diagram.navigator.OntoUMLNavigatorItem(
          diagram, file, false);
      return new StructuredSelection(item);
    }
View Full Code Here

Examples of org.eclipse.gmf.runtime.notation.View.eResource()

     * @generated
     */
    public void refresh() {
      removeDecoration();
      View view = (View) getDecoratorTarget().getAdapter(View.class);
      if (view == null || view.eResource() == null) {
        return;
      }
      EditPart editPart = (EditPart) getDecoratorTarget().getAdapter(
          EditPart.class);
      if (editPart == null || editPart.getViewer() == null) {
View Full Code Here

Examples of org.eclipse.graphiti.mm.pictograms.Diagram.eResource()

        editingDomain = diagramBehavior.getEditingDomain();
      }
    }
    if (editingDomain == null) {
      ResourceSet resourceSet = null;
      Resource eResource = diagram.eResource();
      if (eResource != null) {
        resourceSet = eResource.getResourceSet();
      }
      if (resourceSet == null) {
        resourceSet = new ResourceSetImpl();
View Full Code Here

Examples of org.eclipse.jface.preference.IPreferenceStore.eResource()

                public void run( IProgressMonitor monitor ) throws InvocationTargetException,
                        InterruptedException {
                    Project p = page.getProjectInternal();
                    try {
                        if (p != null) {
                            if (p.eResource() != null && p.eResource().isModified()) {
                                p.eResource().save(ProjectPlugin.getPlugin().saveOptions);
                            }
                            saveAndUnload();
                        } else {
                            saveAndUnload();
View Full Code Here

Examples of org.eclipse.uml2.Model.eResource()

            EcorePackage.eINSTANCE.getEObject());
        assertEquals(
            "Test Model",
            model.getName());
        Collection elements = UML2Util.findNamedElements(
                model.eResource(),
                "Test Model::testPackage::Top",
                true);
        org.eclipse.uml2.Class umlClass = (org.eclipse.uml2.Class)elements.iterator().next();
        assertEquals(
            "Top",
View Full Code Here

Examples of org.eclipse.wst.wsdl.Definition.eResource()

      eSchema = null;

      Definition definition = getEnclosingDefinition();
      if (definition != null && definition.getDocumentBaseURI() != null)
      {
        Resource resource = definition.eResource();
        if (resource != null)
        {
          ResourceSet resourceSet = resource.getResourceSet();
          if (resourceSet != null)
          {
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.