Package org.eclipse.emf.common.util

Examples of org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException


   
    // For all types
    for(EDataType type : typesAndValues.keySet()){
     
      // Test 1-1 = true
      EList args = new BasicEList();     
      args.add(createEqOperation(type, true, false));
      args.add(createNeqOperation(type, true, true));     
      assertTrue(tested.and(args));
     
      // Test 1-0 = false
      args = new BasicEList();     
      args.add(createEqOperation(type, true, false));
      args.add(createNeqOperation(type, false, true));     
      assertFalse(tested.and(args));
     
      // Test 0-1 = false
      args = new BasicEList();     
      args.add(createEqOperation(type, false, false));
      args.add(createNeqOperation(type, true, true));     
      assertFalse(tested.and(args));
     
      // Test 0-0 = false
      args = new BasicEList();     
      args.add(createEqOperation(type, false, false));
      args.add(createNeqOperation(type, false, true));     
      assertFalse(tested.and(args));     
    }
  }
View Full Code Here


      if (feature instanceof EAttribute) {
       
        EDataType dataType = (EDataType) feature.getEType();
        if (feature.isMany()) {
          if (nextToken == JsonToken.START_ARRAY) {
            EList values = new BasicEList();
            while (jp.nextToken() != JsonToken.END_ARRAY) {
              values.add(parseValueForDataType(jp, dataType));
            }
            result.eSet(feature, values);
          }
        }
        else {
          result.eSet(feature, parseValueForDataType(jp, dataType));
        }
      }
      else if (feature instanceof EReference) {
        EReference eRef = (EReference) feature;
        if (!eRef.isContainment()) {
          continue; // Non-containment references are currently ignored
        }
       
        if (feature.isMany() && nextToken == JsonToken.START_ARRAY) {
          EList values = new BasicEList();
          while (jp.nextToken() != JsonToken.END_ARRAY) {
            values.add(from(jp, eRef.getEReferenceType()));
          }
          result.eSet(feature, values);
        }
        else {
          result.eSet(feature, from(jp, eRef.getEReferenceType()));
View Full Code Here

TOP

Related Classes of org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException

Copyright © 2018 www.massapicom. 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.