Package org.eclipse.emf.common.util

Examples of org.eclipse.emf.common.util.UniqueEList$FastCompare


 
  public static List getInstanceProperties(DataObject dataObject)
  {
    //TODO maybe optimize this to just return type.getProperties if type.isOpen (isOpen would need to be cached)
    EObject eDataObject = (EObject) dataObject;
    List result = new UniqueEList(eDataObject.eClass().getEAllStructuralFeatures());
    for (int i = 0, count = result.size(); i < count; ++i)
    {
      EStructuralFeature eStructuralFeature = (EStructuralFeature)result.get(i);
      if (!eStructuralFeature.isDerived() && FeatureMapUtil.isFeatureMap(eStructuralFeature))
      {
        List features = (List)eDataObject.eGet(eStructuralFeature);
        for (int j = 0, size = features.size(); j < size; ++j)
        {
          FeatureMap.Entry entry = (FeatureMap.Entry)features.get(j);
          EStructuralFeature entryFeature = entry.getEStructuralFeature();
          result.add(entryFeature);
        }
      }
    }
    return result;
  }
View Full Code Here


 
  public static List getInstanceProperties(DataObject dataObject)
  {
    //TODO maybe optimize this to just return type.getProperties if type.isOpen (isOpen would need to be cached)
    EObject eDataObject = (EObject) dataObject;
    List result = new UniqueEList(eDataObject.eClass().getEAllStructuralFeatures());
    for (int i = 0, count = result.size(); i < count; ++i)
    {
      EStructuralFeature eStructuralFeature = (EStructuralFeature)result.get(i);
      if (!eStructuralFeature.isDerived() && FeatureMapUtil.isFeatureMap(eStructuralFeature))
      {
        List features = (List)eDataObject.eGet(eStructuralFeature);
        for (int j = 0, size = features.size(); j < size; ++j)
        {
          FeatureMap.Entry entry = (FeatureMap.Entry)features.get(j);
          EStructuralFeature entryFeature = entry.getEStructuralFeature();
          result.add(entryFeature);
        }
      }
    }
    return result;
  }
View Full Code Here

  }

  public static List getInstanceProperties(DataObject dataObject)
  {
    Type type = dataObject.getType();
    List result = new UniqueEList(type.getProperties());
    ((ClassImpl)type).addOpenProperties((EObject)dataObject, result);
    return result;
  }
View Full Code Here

  {
    // Use the default helper context for now
  // TypeHelper typeHelper = HelperProvider.getDefaultContext().getTypeHelper();
      HelperContext hc = HelperProvider.getDefaultContext();
     
    List result = new UniqueEList();
    List annotations = metaObject.getEAnnotations();
    int size = annotations.size();
    for (int i=0; i<size; i++)
    {
      EAnnotation annotation = (EAnnotation)annotations.get(i);
      String propertyURI = annotation.getSource();
     
      for (Iterator iter = annotation.getDetails().iterator(); iter.hasNext(); )
      {
        EStringToStringMapEntryImpl entry = (EStringToStringMapEntryImpl)iter.next();
        String propertyName = entry.getTypedKey();
       
        Property globalProperty = getGlobalProperty(hc, propertyURI, propertyName);
        if (globalProperty != null)
        {
          result.add(globalProperty);
        }
      }
    }
    return result;
  }
View Full Code Here

      allFeaturesCache = allFeatures;
      allProperties = allExtendedProperties = null;
    }
    if (allProperties == null)
    {
      List allProperties = new UniqueEList();
      for (final Iterator iterator = getBaseTypes().iterator(); iterator.hasNext(); )
      {
        Type baseType = (Type)iterator.next();
        allProperties.addAll(baseType.getProperties());
      }
      allProperties.addAll(getDeclaredProperties());    
      this.allProperties = allProperties;
    }
    return allProperties;
  }
View Full Code Here

      allFeaturesCache = allFeatures;
      allProperties = allExtendedProperties = null;
    }
    if (allExtendedProperties == null)
    {
      List allExtendedProperties = new UniqueEList();
      for (final Iterator iterator = getBaseTypes().iterator(); iterator.hasNext(); )
      {
        Type baseType = (Type)iterator.next();
        allExtendedProperties.addAll(((ClassImpl)baseType).getAllExtendedProperties());
      }
      allExtendedProperties.addAll(getExtendedProperties());    
      this.allExtendedProperties = allExtendedProperties;
    }
    return allExtendedProperties;
  }
View Full Code Here

  }

  public static List getInstanceProperties(DataObject dataObject)
  {
    Type type = dataObject.getType();
    List result = new UniqueEList(type.getProperties());
    ((ClassImpl)type).addOpenProperties((EObject)dataObject, result);
    return result;
  }
View Full Code Here

  {
    // Use the default helper context for now
  // TypeHelper typeHelper = HelperProvider.getDefaultContext().getTypeHelper();
      HelperContext hc = HelperProvider.getDefaultContext();
     
    List result = new UniqueEList();
    List annotations = metaObject.getEAnnotations();
    int size = annotations.size();
    for (int i=0; i<size; i++)
    {
      EAnnotation annotation = (EAnnotation)annotations.get(i);
      String propertyURI = annotation.getSource();
     
      for (Iterator iter = annotation.getDetails().iterator(); iter.hasNext(); )
      {
        EStringToStringMapEntryImpl entry = (EStringToStringMapEntryImpl)iter.next();
        String propertyName = entry.getTypedKey();
       
        Property globalProperty = getGlobalProperty(hc, propertyURI, propertyName);
        if (globalProperty != null)
        {
          result.add(globalProperty);
        }
      }
    }
    return result;
  }
View Full Code Here

        }
        return null;
    }

    public List getOpenContentProperties(DataObject dataObject) {
        List result = new UniqueEList();
        ((ClassImpl)dataObject.getType()).addOpenProperties((EObject)dataObject, result);
        return result;
    }
View Full Code Here

  }

  public static List getInstanceProperties(DataObject dataObject)
  {
    Type type = dataObject.getType();
    List result = new UniqueEList(type.getProperties());
    ((ClassImpl)type).addOpenProperties((EObject)dataObject, result);
    return result;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.emf.common.util.UniqueEList$FastCompare

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.