Package org.eclipse.emf.ecore

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


      EObject base) {
    ExpressionStatement ret = null;
    if (base != null) {
      EObject e = base;
      do {
        e = e.eContainer();
        if (e instanceof ExpressionStatement) {
          ret = (ExpressionStatement) e;
          break;
        }
      } while ((e != null));
View Full Code Here


   
    ConnectionStatement ret = null;
    if (base != null) {
      EObject e = base;
      do {
        e = e.eContainer();
        if (e instanceof ConnectionStatement) {
          ret = (ConnectionStatement) e;
          break;
        }
      } while (e != null);
View Full Code Here

   
    ConnectionInitialization ret = null;
    if (base != null) {
      EObject e = base;
      do {
        e = e.eContainer();
        if (e instanceof ConnectionInitialization) {
          ret = (ConnectionInitialization) e;
          break;
        }
      } while (e != null);
View Full Code Here

   
    LocalVariableStatement ret = null;
    if (base != null) {
      EObject e = base;
      do {
        e = e.eContainer();
        if (e instanceof LocalVariableStatement) {
          ret = (LocalVariableStatement) e;
          break;
        }
      } while (e != null);
View Full Code Here

    if (monitor.isCanceled())
      return Status.CANCEL_STATUS;
   
    monitor.subTask("Removing phantom edges");
    for (EObject obj : elementsToDelete) {
      if (obj.eContainer() != null) {
        handler.deleteElement(obj, obj.eContainer(), obj.eContainingFeature());
      }
    }
    monitor.worked(30);
View Full Code Here

      return Status.CANCEL_STATUS;
   
    monitor.subTask("Removing phantom edges");
    for (EObject obj : elementsToDelete) {
      if (obj.eContainer() != null) {
        handler.deleteElement(obj, obj.eContainer(), obj.eContainingFeature());
      }
    }
    monitor.worked(30);

    if (monitor.isCanceled())
View Full Code Here

          && (container instanceof NamedElement)
      ) {
        nestingClassName =
          ((NamedElement)container).getName() +'$'
          + nestingClassName;
        container = container.eContainer();
      }
      Package pack = tp.getPackage();
      if((pack==null)&&(container instanceof Package)) {
        pack = (Package)container;
      }
View Full Code Here

        }
      }
    }
   
    assertNotNull(peShape);
    assertNotNull(linked.eContainer());
   
    //Take a note of any incoming connections
    List<Connection> cons = new ArrayList<Connection>();
    for (Anchor a :peShape.getAnchors()) {
      cons.addAll(a.getIncomingConnections());
View Full Code Here

    mBot.menu("File").menu("Save").click();
    mBot.sleep(1000);

    //Make sure deleted from diagram and model   
    assertFalse(d.getChildren().contains(peShape));
    assertNull(linked.eContainer());
    //Incoming connections should be dead too
    for (Connection c : cons) {
      assertNull(c.getParent());
    }
   
View Full Code Here

      assert diagramFacet.eResource() != null;
      diagramFacet.eResource().getContents().add(d);
      EObject container = diagramFacet.eContainer();
      while (container instanceof View) {
        ((View) container).persist();
        container = container.eContainer();
      }
      try {
        new WorkspaceModifyOperation() {
          protected void execute(IProgressMonitor monitor)
              throws CoreException, InvocationTargetException,
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.