Package org.eclipse.emf.ecore

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


    if(!LatexUtils.inline(code)) {
      EObject tom = code.eContainer();
      while(!(tom.eContainer() instanceof AbstractSection)){
        tom = tom.eContainer();
      }
      if(tom.eContainer() instanceof AbstractSection) {
        AbstractSection section = (AbstractSection) tom.eContainer();
        if(section.getTitle() == tom) {
          error("Headings can not contain code blocks", null);
        }
      }
View Full Code Here


      EObject tom = code.eContainer();
      while(!(tom.eContainer() instanceof AbstractSection)){
        tom = tom.eContainer();
      }
      if(tom.eContainer() instanceof AbstractSection) {
        AbstractSection section = (AbstractSection) tom.eContainer();
        if(section.getTitle() == tom) {
          error("Headings can not contain code blocks", null);
        }
      }
    }
View Full Code Here

              + linkElement.eClass().getName()
              + " in "
              + currentElement.eClass().getName(),
              null);
        }
        currentElement = currentElement.eContainer();
      }
    }
  }
 
  private boolean isLinkElement(EObject element) {
View Full Code Here

  @Override
  protected void emit_AttributeOperations_CommaKeyword_2_q(EObject semanticObject, ISynNavigable transition,
      List<INode> nodes) {
    EObject container = semanticObject.eContainer();

    boolean multiBody = (container instanceof ResourceBody && ((ResourceExpression) container.eContainer()).getResourceData().size() > 1);

    if(nodes == null && !multiBody)
      acceptUnassignedKeyword(grammar.getAttributeOperationsAccess().getCommaKeyword_2(), ",", null);
    else
      super.emit_AttributeOperations_CommaKeyword_2_q(semanticObject, transition, nodes);
View Full Code Here

   */
  private int removeDisqualifiedVariablesAssignment(List<IEObjectDescription> descs, EObject o) {
    if(descs == null || descs.size() == 0)
      return 0;
    EObject p = null;
    for(p = o; p != null; p = p.eContainer()) {
      int classifierId = p.eClass().getClassifierID();
      if(classifierId == PPPackage.ASSIGNMENT_EXPRESSION || classifierId == PPPackage.APPEND_EXPRESSION)
        break;
    }
    if(p == null)
View Full Code Here

  private int removeDisqualifiedVariablesDefinitionArg(List<IEObjectDescription> descs, EObject o) {
    if(descs == null || descs.size() == 0)
      return 0;
    EObject p = o;
    while(p != null && p.eClass().getClassifierID() != PPPackage.DEFINITION_ARGUMENT)
      p = p.eContainer();
    if(p == null)
      return 0; // not in a definition argument value tree

    // p is a DefinitionArgument at this point, we want it's parent being an abstract Definition
    EObject d = p.eContainer();
View Full Code Here

    // p is a DefinitionArgument at this point, we want it's parent being an abstract Definition
    EObject d = p.eContainer();
    if(d == null)
      return 0; // broken model
    d = d.eContainer();
    final String definitionFragment = d.eResource().getURIFragment(d);
    final String definitionURI = d.eResource().getURI().toString();

    int removedCount = 0;
    ListIterator<IEObjectDescription> litor = descs.listIterator();
View Full Code Here

  private int removeDisqualifiedAssignmentVariables(List<IEObjectDescription> descs, EObject o) {
    if(descs == null || descs.size() == 0)
      return 0;
    EObject p = o;
    while(p != null && p.eClass().getClassifierID() != PPPackage.ASSIGNMENT_EXPRESSION)
      p = p.eContainer();
    if(p == null)
      return 0; // not in an assignment

    // p is an AssignmentExpression at this point
    AssignmentExpression d = (AssignmentExpression) p;
View Full Code Here

  private int removeDisqualifiedDefinitionVariables(List<IEObjectDescription> descs, EObject o) {
    if(descs == null || descs.size() == 0)
      return 0;
    EObject p = o;
    while(p != null && p.eClass().getClassifierID() != PPPackage.DEFINITION_ARGUMENT)
      p = p.eContainer();
    if(p == null)
      return 0; // not in a definition argument value tree

    // p is a DefinitionArgument at this point, we want it's parent being an abstract Definition
    EObject d = p.eContainer();
View Full Code Here

    // p is a DefinitionArgument at this point, we want it's parent being an abstract Definition
    EObject d = p.eContainer();
    if(d == null)
      return 0; // broken model
    d = d.eContainer();
    final String definitionFragment = d.eResource().getURIFragment(d);
    final String definitionURI = d.eResource().getURI().toString();

    int removedCount = 0;
    ListIterator<IEObjectDescription> litor = descs.listIterator();
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.