Examples of eContents()


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

   * @param e the given element.
   * @return the calculated value for the index of the given element.
   */
  public long calculateNewIndexFor(IndexedElement e) {
    EObject type = e.eContainer();
    long index = findMaxIndex(type.eContents());
    return ++index;
  }
 
  private long findMaxIndex(Iterable<? extends EObject> elements) {
    long maxIndex = 0;
View Full Code Here

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

        if (ref.charAt(1) == '/') {
            container = EcoreUtil.getRootContainer(root);
            if (length == 2)
                return container;
            if (ref.charAt(2) == '/') {
                for (Iterator iterator = container.eContents().iterator();/* true */;) {
                    if (!iterator.hasNext())
                        return null;
                    container = (EObject) iterator.next();
                    // if( container != null )
                    break;
View Full Code Here

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

                step = ref.indexOf(']', index + 2);
                if (step == -1)
                    return container; // report error?
                index = Integer.parseInt(ref.substring(++index, step));
                EStructuralFeature feature;
                Iterator iterator = container.eContents().iterator();
                if (prefix == null)
                    do {
                        if (!iterator.hasNext())
                            return null;
                        EObject content = (EObject) iterator.next();
View Full Code Here

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

        if (ref.charAt(1) == '/') {
            container = EcoreUtil.getRootContainer(root);
            if (length == 2)
                return container;
            if (ref.charAt(2) == '/') {
                for (Iterator iterator = container.eContents().iterator();/* true */;) {
                    if (!iterator.hasNext())
                        return null;
                    container = (EObject) iterator.next();
                    // if( container != null )
                    break;
View Full Code Here

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

                step = ref.indexOf(']', index + 2);
                if (step == -1)
                    return container; // report error?
                index = Integer.parseInt(ref.substring(++index, step));
                EStructuralFeature feature;
                Iterator iterator = container.eContents().iterator();
                if (prefix == null)
                    do {
                        if (!iterator.hasNext())
                            return null;
                        EObject content = (EObject) iterator.next();
View Full Code Here

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

  public static ConnectionInitialization getChildCIStatement(
      EObject parent) {
    ConnectionInitialization ret = null;
    if (parent != null) {
      EObject e = parent;
      while (e.eContents().size() >0) {
        e = e.eContents().get(0);
        if (e instanceof ConnectionInitialization) {
          ret = (ConnectionInitialization) e;
          break;
        }
View Full Code Here

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

      EObject parent) {
    ConnectionInitialization ret = null;
    if (parent != null) {
      EObject e = parent;
      while (e.eContents().size() >0) {
        e = e.eContents().get(0);
        if (e instanceof ConnectionInitialization) {
          ret = (ConnectionInitialization) e;
          break;
        }
      } 
View Full Code Here

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

   */
  public static EObject getChildLiteral(EObject parent) {
    EObject ret = null;
    if (parent != null) {
      EObject e = parent;
      while (e.eContents().size() >0) {
        e = e.eContents().get(0);
        if (isObjectLiteral(e)) {
          ret = e;
          break;
        }
View Full Code Here

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

  public static EObject getChildLiteral(EObject parent) {
    EObject ret = null;
    if (parent != null) {
      EObject e = parent;
      while (e.eContents().size() >0) {
        e = e.eContents().get(0);
        if (isObjectLiteral(e)) {
          ret = e;
          break;
        }
      } 
View Full Code Here

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

  /**
   * a generic method computing the index of an AST object between its siblings
   */
  protected int index(final EObject obj) {
    EObject _eContainer = obj.eContainer();
    EList<EObject> _eContents = _eContainer.eContents();
    return _eContents.indexOf(obj);
  }
 
  protected String getRegExPattern(final String originalPattern, final List<Variable> variables) {
    String pattern = originalPattern;
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.