Examples of eContainer()


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

   * @return the root element containing the given model element.
   */
  public Protobuf rootOf(EObject o) {
    EObject current = o;
    while (!(current instanceof Protobuf)) {
      current = current.eContainer();
    }
    return (Protobuf) current;
  }

  /**
 
View Full Code Here

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

  @SuppressWarnings("unused")
  public IScope scope_LiteralLink_target(LiteralLink link, EReference r) {
    EObject container = link.eContainer();
    Enum anEnum = null;
    if (container instanceof DefaultValueFieldOption) {
      container = container.eContainer();
    }
    if (container instanceof AbstractOption) {
      AbstractOption option = (AbstractOption) container;
      if (options.isNative(option)) {
        ProtoDescriptor descriptor = descriptorProvider.primaryDescriptor();
View Full Code Here

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

      AbstractCustomOption option = (AbstractCustomOption) c;

      if (c instanceof GroupElement) {
        EObject container = c.eContainer();
        if (container instanceof Group) {
          OptionType optionType = OptionType.findOptionTypeForLevelOf(container.eContainer());
          return createScope(optionType != null
              ? modelElementFinder.find(option, customOptionFinderDelegate, optionType)
              : Collections.<IEObjectDescription>emptySet());
        }
      }
View Full Code Here

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

    EObject container = name;
    while (container != null) {
      if (container instanceof ComplexValue) {
        return (ComplexValue) container;
      }
      container = container.eContainer();
    }
    return null;
  }

  @Override public Collection<IEObjectDescription> potentialNormalFieldNames(ComplexValue value) {
View Full Code Here

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

      return; // we already show an error if name is null, no need to go further.
    }
   
    EObject container = e.eContainer();
    if (container instanceof OneOf) {
      container = container.eContainer()
    }
    if (container instanceof Message) {
      Message message = (Message) container;
      Iterable<MessageElement> elements = message.getElements();
      checkTagNumerIsUnique(e, message, elements);
View Full Code Here

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

            factMemory.put(o, workingMemory.insert( o ));
           
            // this solves problems where inserting something into the containment feature
            // of a property which then needs to be accessed (e.g. onAccess, onEdit)
            // does not correctly update the parent object for new results
            if (o.eContainer() != null && factMemory.containsKey(o.eContainer())) {
              workingMemory.update(factMemory.get(o.eContainer()), o.eContainer());
            }
           
          }
        }
View Full Code Here

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

            factMemory.put(o, workingMemory.insert( o ));
           
            // this solves problems where inserting something into the containment feature
            // of a property which then needs to be accessed (e.g. onAccess, onEdit)
            // does not correctly update the parent object for new results
            if (o.eContainer() != null && factMemory.containsKey(o.eContainer())) {
              workingMemory.update(factMemory.get(o.eContainer()), o.eContainer());
            }
           
          }
        }
View Full Code Here

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

           
            // this solves problems where inserting something into the containment feature
            // of a property which then needs to be accessed (e.g. onAccess, onEdit)
            // does not correctly update the parent object for new results
            if (o.eContainer() != null && factMemory.containsKey(o.eContainer())) {
              workingMemory.update(factMemory.get(o.eContainer()), o.eContainer());
            }
           
          }
        }
       
View Full Code Here

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

           
            // this solves problems where inserting something into the containment feature
            // of a property which then needs to be accessed (e.g. onAccess, onEdit)
            // does not correctly update the parent object for new results
            if (o.eContainer() != null && factMemory.containsKey(o.eContainer())) {
              workingMemory.update(factMemory.get(o.eContainer()), o.eContainer());
            }
           
          }
        }
       
View Full Code Here

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
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.