Package org.eclipse.emf.common.util

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


   * @return the list of libraries named 'name'
   * <!-- end-user-doc -->
   * @generated NOT
   */
  public EList getTapestryLibrariesByName(String name) {
    EList libraries = new BasicEList();
    if (name != null) {
      Iterator itLibs = getAllTapestryLibraries().iterator();
      while(itLibs.hasNext()) {
        TapestryLibrary curLib = (TapestryLibrary)itLibs.next();
        if (name.equals(curLib.getName())) {
          libraries.add(curLib);
        }
      }
    }
    return libraries;
  }
View Full Code Here


   * @return the list of implemention jsf libraries
   * <!-- end-user-doc -->
   * @generated NOT
   */
  public EList getImplTapestryLibraries() {
    EList implementations = new BasicEList();
    Iterator itLibs = getAllTapestryLibraries().iterator();
    while (itLibs.hasNext()) {
      TapestryLibrary lib = (TapestryLibrary)itLibs.next();
      if (lib.isImplementation()) {
        implementations.add(lib);
      }
    }
    return implementations;
  }
View Full Code Here

   * @return the non-implemention JSF libraries
   * <!-- end-user-doc -->
   * @generated NOT
   */
  public EList getNonImplTapestryLibraries() {
    EList nonImplementations = new BasicEList();
    Iterator itLibs = getAllTapestryLibraries().iterator();
    while (itLibs.hasNext()) {
      TapestryLibrary lib = (TapestryLibrary)itLibs.next();
      if (!lib.isImplementation()) {
        nonImplementations.add(lib);
      }
    }
    return nonImplementations;
  }
View Full Code Here

   * @return all JSF libraries
   * <!-- end-user-doc -->
   * @generated NOT
   */
  public EList getAllTapestryLibraries() {
    EList allLibs = new BasicEList();
    allLibs.addAll(getTapestryLibraries());
    allLibs.addAll(getPluginProvidedTapestryLibraries());
    return allLibs;
  }
View Full Code Here

        if (FeatureMapUtil.isFeatureMap(feature))
        {
          final List values = (List)change.getValue();
          if (sdoSettings == null)
          {
            sdoSettings = new BasicEList(settings);
          }
          DelegatingFeatureMap featureMap = new DelegatingFeatureMap(((InternalEObject)dataObject), feature)
            {
              protected final List theList = values;
 
View Full Code Here

        if (FeatureMapUtil.isFeatureMap(feature))
        {
          final List values = (List)change.getValue();
          if (sdoSettings == null)
          {
            sdoSettings = new BasicEList(settings);
          }
          DelegatingFeatureMap featureMap = new DelegatingFeatureMap(((InternalEObject)dataObject), feature)
            {
              protected final List theList = values;
 
View Full Code Here

   * @return the reordered list.
   */
  @SuppressWarnings("unchecked")
  public static List reorderExtensibilityList(List extensibilityElementListHandlers, ExtensibleElement parent){
   
    List tempExtensibilityElementList = new BasicEList();
    tempExtensibilityElementList.addAll(parent.getExtensibilityElements());
   
    if(extensibilityElementListHandlers.isEmpty() ||
      parent.getExtensibilityElements() == null ||
      parent.getExtensibilityElements().size() <= 1)
      return tempExtensibilityElementList;
View Full Code Here

    }       
    xml2ExtensibleElement(variables, variablesElement);
   
    // Move variables that are extensibility elements to the list of children
    // JM: What is this supposed to accomplish?
    List toBeMoved = new BasicEList();
    for (Iterator iter = variables.getExtensibilityElements().iterator(); iter.hasNext();) {
      ExtensibilityElement element = (ExtensibilityElement) iter.next();
      if(element instanceof Variable)
        toBeMoved.add(element);
    }
   
    List children = variables.getChildren();
    List extensibility = variables.getExtensibilityElements();
    for (Iterator iter = toBeMoved.iterator(); iter.hasNext();) {
      Variable element = (Variable) iter.next();
      extensibility.remove(element);
      children.add(element);
    }
   
View Full Code Here

    /*
     * @see IStructuredContentProvider#getElements(Object)
     */
    @SuppressWarnings("unchecked")
    public Object[] getElements(Object element) {
      EList elist = new BasicEList();

      if (element == null) {
        System.err.println("getElements : element null");
      } else if (!(element instanceof Model)) {
        System.err.println("getElements : element pas de type Model");
      } else if (!element.equals(input)) {
        System.err.println("getElements : element != input");
      } else {
        OperationalTransformation opt = null;
        try {
          List listRoot = ((Model) element).getRoots();
          for (Iterator iterator = listRoot.iterator(); iterator
              .hasNext()
              && opt == null;) {
            EObject myObject = (EObject) iterator.next();
            if (myObject instanceof OperationalTransformation)
              opt = (OperationalTransformation) myObject;
          }
        } catch (Exception e) {
          UiPlugin.getDefault().getLogger()
              .log(java.util.logging.Level.WARNING,
                  "Unknown error", e);
        }
        if (opt != null)
          elist.add(opt);
      }
      Object[] res = elist.toArray();
      return res;
    }
View Full Code Here

  public HashMap loadedModelsMap = new HashMap();

  public OrderedSet getOutsidePackagesByName(java.lang.String self,
      Trace trace) {
    List packages = new BasicEList();
    try {

      String nsURI = (String) properties.get(self + ".nsURI");
      Model model = (Model) loadedModelsMap.get(nsURI);
      if (model == null) {
        model = ModulesmanagerPlugin.getDefault().getEMOFRegistry()
            .getEmofByNsURI(nsURI);
        loadedModelsMap.put(nsURI, model);
      }
      Iterator iter = model.getRoots().iterator();
      while (iter.hasNext()) {
        EObject element = (EObject) iter.next();
        if (element instanceof Package) {
          packages.add(element);
        }
      }
    } catch (Exception e) {
      logger
          .log(Level.SEVERE, "faild to find a package from its name",
View Full Code Here

TOP

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

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.