Package org.eclipse.emf.ecore

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


        return parent;
      }
      if (element instanceof EObject) {
        EObject eObject = (EObject) element;
        if (eObject.eContainer() == null
            && eObject.eResource().getURI().isFile()) {
          String path = eObject.eResource().getURI().path();
          return ResourcesPlugin.getWorkspace().getRoot()
              .getFileForLocation(new Path(path));
        }
        return myAdapterFctoryContentProvier.getParent(eObject);
View Full Code Here


      }
      if (element instanceof EObject) {
        EObject eObject = (EObject) element;
        if (eObject.eContainer() == null
            && eObject.eResource().getURI().isFile()) {
          String path = eObject.eResource().getURI().path();
          return ResourcesPlugin.getWorkspace().getRoot()
              .getFileForLocation(new Path(path));
        }
        return myAdapterFctoryContentProvier.getParent(eObject);
      }
View Full Code Here

    if (pe != null) {
      EObject be = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(pe);
      if (be instanceof BPMNDiagramImpl) {
        try {
          composite.setEObject((BPMN2Editor) getDiagramEditor(),
              ModelHandlerLocator.getModelHandler(be.eResource()).getDefinitions());
        } catch (IOException e) {
          Activator.showErrorWithLogging(e);
        }
      } else {
        composite.setEObject((BPMN2Editor) getDiagramEditor(), be);
View Full Code Here

      EObject be = (EObject) Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(pe);
      if (be instanceof Participant){
        composite.setEObject((BPMN2Editor) getDiagramEditor(), ((Participant) be).getProcessRef())
      }else if (be instanceof BPMNDiagram){
        try {
          composite.setEObject((BPMN2Editor) getDiagramEditor(), ModelHandlerLocator.getModelHandler(be.eResource()).getInternalParticipant().getProcessRef());
        } catch (IOException e) {
          Activator.showErrorWithLogging(e);
        }
      }else
      composite.setEObject((BPMN2Editor) getDiagramEditor(), be);
View Full Code Here

      return;
    final AttributeValueString value = (AttributeValueString) av;

    final EObject target = getElementFromProxy(getProxyUrlFromValue(value
        .getTheValue()));
    System.out.println("Registering with: " + target.eResource());
    target.eResource().eAdapters().add(new AdapterImpl() {
      @Override
      public void notifyChanged(Notification notification) {
        System.out.println("Changed.");
        String newContent = TracingUtil.createProxyContent(
View Full Code Here

    final AttributeValueString value = (AttributeValueString) av;

    final EObject target = getElementFromProxy(getProxyUrlFromValue(value
        .getTheValue()));
    System.out.println("Registering with: " + target.eResource());
    target.eResource().eAdapters().add(new AdapterImpl() {
      @Override
      public void notifyChanged(Notification notification) {
        System.out.println("Changed.");
        String newContent = TracingUtil.createProxyContent(
            (EObject) target, names);
View Full Code Here

   * There is definitively a better way!
   */
  private EObject getElementFromUri(String url, EditingDomain domain) {
    EObject element = trackedResources.getEObject(URI.createURI(url), true);
    if (element == null) return null;
    element.eResource().unload();
    return trackedResources.getEObject(URI.createURI(url), true);
  }

  /**
   * Unregisters all Listeners.
View Full Code Here

        }
        //
        // Remove from resource?
        //
        EObject eObject = eNext.eObject();
        if(eObject.eResource()!=null) {           
            EcoreUtil.delete(eObject);
        }
        //
        // Release strong references
        //
View Full Code Here

        //
        // Add to resource backing given data store?
        //
        if(eNext==null) {
            EObject eObject = eLive.eObject();
            if(eObject.eResource()==null) {  
                eReader.eDataStore().eResource().getContents().add(eObject);
            }
        }
        //eReader.eDataStore.listenerManager;
        //
View Full Code Here

        //
        verify("EObject", eImpl, true, false, true);
        //
        // Get URI
        //
        URI eURI = eImpl.eResource().getURI();
        //
        // Forward
        //
        return eGetID(eURI,eImpl);
    }
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.