Package org.eclipse.emf.ecore

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


  private <T> Collection<IEObjectDescription> local(EObject start, FinderStrategy<T> strategy, T criteria) {
    UniqueDescriptions descriptions = new UniqueDescriptions();
    EObject current = start.eContainer();
    while (current != null) {
      descriptions.addAll(local(current, strategy, criteria, 0));
      current = current.eContainer();
    }
    return descriptions.values();
  }

  <T> Collection<IEObjectDescription> find(Protobuf start, FinderStrategy<T> strategy, T criteria) {
View Full Code Here


   * @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

  @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

      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

    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

      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

            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

            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

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

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

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.