Package org.eclipse.emf.common.util

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


   * @param library JSFLibrary instance
   */
  protected void libraryAdded(JSFLibrary library) {
    if (library != null && library.isImplementation()) {
      JSFLibraryRegistry jsfLibReg = JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry();
      EList impls = jsfLibReg.getImplJSFLibraries();
      if (impls.size() == 1) {
        jsfLibReg.setDefaultImplementation(library);
      }
    }
  }
View Full Code Here


   * default implementation or sets the default implementation to null if no
   * JSFLibrary is marked as an implementation.
   */
  protected void setNewDefaultImplementation() {
    JSFLibraryRegistry jsfLibReg = JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry();
    EList impls = jsfLibReg.getImplJSFLibraries();
    if (impls.size() > 0) {
      jsfLibReg.setDefaultImplementation((JSFLibrary)impls.get(0));
    } else {
      jsfLibReg.setDefaultImplementation(null);
    }
  }
View Full Code Here

   * facesConfig property.
   */
  protected void createModel() {
    facesConfig = FacesConfigFactory.eINSTANCE.createFacesConfigType();
    //create and add converters by id
    EList converters = facesConfig.getConverter();
    converters.add(createConverter("BigDecimal")); //$NON-NLS-1$
    converters.add(createConverter("BigInteger")); //$NON-NLS-1$
    converters.add(createConverter("Boolean")); //$NON-NLS-1$
    converters.add(createConverter("Byte")); //$NON-NLS-1$
    converters.add(createConverter("Character")); //$NON-NLS-1$
    converters.add(createConverter("DateTime")); //$NON-NLS-1$
    converters.add(createConverter("Double")); //$NON-NLS-1$
    converters.add(createConverter("Float")); //$NON-NLS-1$
    converters.add(createConverter("Integer")); //$NON-NLS-1$
    converters.add(createConverter("Long")); //$NON-NLS-1$
    converters.add(createConverter("Number")); //$NON-NLS-1$
    converters.add(createConverter("Short")); //$NON-NLS-1$
    // converters by for-class (see spec 3.3.3 -- Standard Converter Implementions
    converters.add(createForClassConverter("java.lang.Boolean", "javax.faces.convert.BooleanConverter")); //$NON-NLS-1$ //$NON-NLS-2$
        converters.add(createForClassConverter("java.lang.Byte", "javax.faces.convert.ByteConverter")); //$NON-NLS-1$ //$NON-NLS-2$
        converters.add(createForClassConverter("java.lang.Character", "javax.faces.convert.CharacterConverter")); //$NON-NLS-1$ //$NON-NLS-2$
        converters.add(createForClassConverter("java.lang.Double", "javax.faces.convert.DoubleConverter")); //$NON-NLS-1$ //$NON-NLS-2$
        converters.add(createForClassConverter("java.lang.Float", "javax.faces.convert.FloatConverter")); //$NON-NLS-1$ //$NON-NLS-2$
        converters.add(createForClassConverter("java.lang.Integer", "javax.faces.convert.IntegerConverter")); //$NON-NLS-1$ //$NON-NLS-2$
        converters.add(createForClassConverter("java.lang.Long", "javax.faces.convert.LongConverter")); //$NON-NLS-1$ //$NON-NLS-2$
        converters.add(createForClassConverter("java.lang.Short", "javax.faces.converter.ShortConverter")); //$NON-NLS-1$ //$NON-NLS-2$
    //create and add validators
    EList validators = facesConfig.getValidator();
    validators.add(createValidator("DoubleRange")); //$NON-NLS-1$
    validators.add(createValidator("Length")); //$NON-NLS-1$
    validators.add(createValidator("LongRange")); //$NON-NLS-1$
    //create and add UI components
    EList components = facesConfig.getComponent();
    components.add(createUIComponent("Column")); //$NON-NLS-1$
    components.add(createUIComponent("Command")); //$NON-NLS-1$
    components.add(createUIComponent("Data")); //$NON-NLS-1$
    components.add(createUIComponent("Form")); //$NON-NLS-1$
    components.add(createUIComponent("Graphic")); //$NON-NLS-1$
    components.add(createUIComponent("Input")); //$NON-NLS-1$
    components.add(createUIComponent("Message")); //$NON-NLS-1$
    components.add(createUIComponent("Messages")); //$NON-NLS-1$
        components.add(createUIComponent("NamingContainer")); //$NON-NLS-1$
    components.add(createUIComponent("Output")); //$NON-NLS-1$
    components.add(createUIComponent("Panel")); //$NON-NLS-1$
    components.add(createUIComponent("Parameter")); //$NON-NLS-1$
    components.add(createUIComponent("SelectBoolean")); //$NON-NLS-1$
    components.add(createUIComponent("SelectItem")); //$NON-NLS-1$
    components.add(createUIComponent("SelectItems")); //$NON-NLS-1$
    components.add(createUIComponent("SelectMany")); //$NON-NLS-1$
    components.add(createUIComponent("SelectOne")); //$NON-NLS-1$
    components.add(createUIComponent("ViewRoot")); //$NON-NLS-1$
    //create and add HTML components
    components.add(createHTMLComponent("HtmlCommandButton")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlCommandLink")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlDataTable")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlForm")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlGraphicImage")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlInputHidden")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlInputSecret")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlInputText")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlInputTextarea")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlMessage")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlMessages")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlOutputFormat")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlOutputLabel")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlOutputLink")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlOutputText")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlPanelGrid")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlPanelGroup")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlSelectBooleanCheckbox")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlSelectManyCheckbox")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlSelectManyListbox")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlSelectManyMenu")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlSelectOneListbox")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlSelectOneMenu")); //$NON-NLS-1$
    components.add(createHTMLComponent("HtmlSelectOneRadio")); //$NON-NLS-1$
  }
View Full Code Here

        Resource resource = factory.createResource(URI.createFileURI(tempFile.getAbsolutePath()));
       
        try {
                    if (resource != null) {
                        resource.load(Collections.EMPTY_MAP);
            EList resourceContents = resource.getContents();
            if (resourceContents != null && resourceContents.size() > 0) {
                result = (FacesConfigType)resourceContents.get(0);
            }
          }
        } catch(IllegalStateException ise) {
          //log error
          logLoadError(ise);
View Full Code Here

        }
        if (webApp != null) {
          String filesString = null;
          //need to branch here due to model version differences (BugZilla #119442)
          if (webApp.getVersionID() == J2EEVersionConstants.WEB_2_3_ID) {
            EList contexts = webApp.getContexts();
            Iterator itContexts = contexts.iterator();
            while (itContexts.hasNext()) {
              ContextParam contextParam = (ContextParam)itContexts.next();
              if (contextParam.getParamName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME)) {
                filesString = contextParam.getParamValue();
                break;
              }
            }
          } else {
            EList contextParams = webApp.getContextParams();
            Iterator itContextParams = contextParams.iterator();
            while (itContextParams.hasNext()) {
              ParamValue paramValue = (ParamValue)itContextParams.next();
              if (paramValue.getName().equals(CONFIG_FILES_CONTEXT_PARAM_NAME)) {
                filesString = paramValue.getValue();
                break;
View Full Code Here

   * @param library JSFLibrary instance
   */
  protected void libraryAdded(TapestryLibrary library) {
    if (library != null && library.isImplementation()) {
      TapestryLibraryRegistry jsfLibReg = TapestryLibraryRegistryUtil.getInstance().getTapestryLibraryRegistry();
      EList impls = jsfLibReg.getImplTapestryLibraries();
      if (impls.size() == 1) {
        jsfLibReg.setDefaultImplementation(library);
      }
    }
  }
View Full Code Here

   * default implementation or sets the default implementation to null if no
   * JSFLibrary is marked as an implementation.
   */
  protected void setNewDefaultImplementation() {
    TapestryLibraryRegistry jsfLibReg = TapestryLibraryRegistryUtil.getInstance().getTapestryLibraryRegistry();
    EList impls = jsfLibReg.getImplTapestryLibraries();
    if (impls.size() > 0) {
      jsfLibReg.setDefaultImplementation((TapestryLibrary)impls.get(0));
    } else {
      jsfLibReg.setDefaultImplementation(null);
    }
  }
View Full Code Here

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

         * @param jsfLib
         * @param logMissingJar true to log an error for each invalid JAR.
         * @return elements
         */
        public final IPath[] getJARPathforJSFLib(TapestryLibrary jsfLib, boolean logMissingJar) {       
            EList archiveFiles = jsfLib.getArchiveFiles();
            int numJars = archiveFiles.size();
            IPath[] elements = new IPath[numJars];
            ArchiveFile ar = null;
            for (int i= 0; i < numJars; i++) {
                ar = (ArchiveFile)archiveFiles.get(i);
                if ( !ar.exists() && logMissingJar ) {
                    logErroronMissingJAR(jsfLib, ar);
                }
                elements[i] = new Path(((ArchiveFile)archiveFiles.get(i)).getResolvedSourceLocation()).makeAbsolute();
            }
            return elements;
        }  
View Full Code Here

         * @param jsfLib
         * @param logMissingJar true to log an error for each invalid JAR.
         * @return elements
         */
        public final IPath[] getJARPathforJSFLibwFilterMissingJars(TapestryLibrary jsfLib, boolean logMissingJar) {
            EList archiveFiles = jsfLib.getArchiveFiles();
            int numJars = numberofValidJar(archiveFiles);
            IPath[] elements = new IPath[numJars];
            ArchiveFile ar = null;
            int idxValidJar = 0;
            for (int i= 0; i < archiveFiles.size(); i++) {
                ar = (ArchiveFile)archiveFiles.get(i);
                if ( !ar.exists() ) {
                    if (logMissingJar) {
                        logErroronMissingJAR(jsfLib, ar);
                    }
                } else {
                    elements[idxValidJar] = new Path(((ArchiveFile)archiveFiles.get(i)).getResolvedSourceLocation()).makeAbsolute();
                    idxValidJar++;
                }
            }
            return elements;       
        }
View Full Code Here

TOP

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

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.