Package org.eclipse.emf.ecore

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


      } else if (obj.equals(session)) {
        // 'prop' is contained directly or indirectly by the given session
        return true;
      } else {
        // recurse up the containment
        obj = obj.eContainer();
      }
    }
   
    throw new RuntimeException("Possible infinite loop detected in containment hierarchy: " + prop);
  }
View Full Code Here


        extra = ((TemplateFile) cur).getName();
      } else if (cur instanceof DroolsPackage) {
        extra = ((DroolsPackage) cur).getName();
      }
      parentPath = " > " + cur.eClass().getName() + "[" + extra + "]" + parentPath;        
      cur = cur.eContainer();
    }
   
    if (tag.getJavaParent() == null) {
      return tag.toString() + parentPath;
    } else {
View Full Code Here

    int result = 0;
    EObject containerModelElement = entry.eContainer();
    //count while containerModelElement is not project or FactorTable
    while ( containerModelElement != null && !(containerModelElement instanceof FactorTable)){
      result++;
      containerModelElement = containerModelElement.eContainer();
    }
    return result;
  }

  /**
 
View Full Code Here

     */
    public static String getFQN(Contained m) {
        String fqn = m.getIdentifier();

        EObject parent = m;
        while ((parent = parent.eContainer()) != null
                && parent instanceof Contained)
            fqn = ((Contained) parent).getIdentifier() + "::" + fqn;

        return fqn;
    }
View Full Code Here

      return identifier;
   
    EObject econtainer = elem.eContainer();
   
    if (econtainer instanceof Field)
      return   relativeName((Contained) econtainer.eContainer(), cont) + "::" + identifier;
   
    // Saltamos el EnumDef
    /**
     * module m { enum e {OP1, OP2}; };
     *
 
View Full Code Here

   * @generated NOT
   */
  private String getTagTraitValueAsString(final String _id, final String traitKey) {
    EObject obj = getTagTraitValue(getTag(), traitKey);
    if (obj != null){
      return TraitValueHelper.getValueAsString((Trait)obj.eContainer());
    }
    return null;
  }

  /**
 
View Full Code Here

        }
      }
    }
   
    assertNotNull(peShape);
    assertNotNull(linked.eContainer());
   
    //Find Literal
    Shape literalShape = null;
    for (Shape s : d.getChildren()) {
      linked = ls.getBusinessObjectForLinkedPictogramElement(s);
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

      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

      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.