Examples of JSFLibrary


Examples of org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary

 
 
  private List wrapJSFLibraries(final EList libs) {
    List list = new ArrayList();
    if (libs != null) {
      JSFLibrary jsfLib;
      JSFLibraryInternalReference jsfLibDctr;
     
      Iterator it = libs.iterator();
      while (it.hasNext()) {
        jsfLib = (JSFLibrary) it.next();
View Full Code Here

Examples of org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary

  }

  private boolean isAnyLibraryChanged(final List list) {
    Iterator it = list.iterator();
    JSFLibraryInternalReference wclib = null;    // working copy library
    JSFLibrary lib = null;
   
    while(it.hasNext()) {
      wclib = (JSFLibraryInternalReference)it.next();
      lib = getJSFLibraryRegistry().getJSFLibraryByID(wclib.getID());
      if (lib == null) {          // removed. Hence, changed.
        return true;
      }
      if (wclib.getArchiveFiles().size() !=
        lib.getArchiveFiles().size()) { // Archives changed..
        return true;
      }
      if (isAnyArchiveFileChanged(wclib.getArchiveFiles(),
          lib.getArchiveFiles())) {   // Check archive file changes.  I.e., name and location
        return true;
      }
    }
    return false;
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary

    IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot();
    IJavaProject[] projects= JavaCore.create(root).getJavaProjects();
    IPath containerPath= new Path(JSFLibraryConfigurationHelper.JSF_LIBRARY_CP_CONTAINER_ID).append(newId);
    IPath oldContainerPath = new Path(JSFLibraryConfigurationHelper.JSF_LIBRARY_CP_CONTAINER_ID).append(oldId);
   
    JSFLibrary lib = JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry().getJSFLibraryByID(newId);
    List affectedProjects= new ArrayList();
    boolean removeAndAddBecauseOfRename = (!oldId.equals(newId));
    // find all projects using the old container name...
    for (int i= 0; i < projects.length; i++) {
      IJavaProject project= projects[i];
View Full Code Here

Examples of org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary

        saveJSFLibraryRegistry();
      }
      //add adapter to maintain default implementation
      if (jsfLibraryRegistry != null) {       
        //check that a default impl is set.   if not pick first one if available.
        JSFLibrary defLib = jsfLibraryRegistry.getDefaultImplementation();
        if (defLib == null && jsfLibraryRegistry.getImplJSFLibraries().size() > 0){
          jsfLibraryRegistry.setDefaultImplementation((JSFLibrary)jsfLibraryRegistry.getImplJSFLibraries().get(0));
          saveJSFLibraryRegistry();
        }
        jsfLibraryRegistry.eAdapters().add(MaintainDefaultImplementationAdapter.getInstance());
View Full Code Here

Examples of org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary

      IExtension[] extensions = point.getExtensions();
      for (int i=0;i < extensions.length;i++){
        IExtension ext = extensions[i];
        for (int j=0;j < ext.getConfigurationElements().length;j++){
          PluginProvidedJSFLibraryCreationHelper2 newLibCreator = new PluginProvidedJSFLibraryCreationHelper2(ext.getConfigurationElements()[j]);           
          JSFLibrary newLib = newLibCreator.create();
         
          /**
           * Additional check on if a plug-in contributes jsflibraries is an expanded folder.
           * Fix related to bug 144954. 
           *
 
View Full Code Here

Examples of org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary

      IExtension[] extensions = point.getExtensions();
      for (int i=0;i < extensions.length;i++){
        IExtension ext = extensions[i];
        for (int j=0;j < ext.getConfigurationElements().length;j++){
          PluginProvidedJSFLibraryCreationHelper newLibCreator = new PluginProvidedJSFLibraryCreationHelper(ext.getConfigurationElements()[j]);           
          JSFLibrary newLib = newLibCreator.create();
         
          /**
           * Additional check on if a plug-in contributes jsflibraries is an expanded folder.
           * Fix related to bug 144954. 
           *
 
View Full Code Here

Examples of org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary

    IStatus status = null;
   
    JSFLibraryInternalReference[] compLibs = (JSFLibraryInternalReference[]) getProperty(IJSFFacetInstallDataModelProperties.COMPONENT_LIBRARIES);
    if (compLibs != null){
      for (int i=0;i<compLibs.length;i++){
        JSFLibrary lib = compLibs[i].getLibrary();
        status = checkForDupeArchiveFiles(jars, lib);
          if (!OK_STATUS.equals(status)){
            return status;
          }
      }   
View Full Code Here

Examples of org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary

   * @return the working copy
   * <!-- end-user-doc -->
   * @generated NOT
   */
  public JSFLibrary getWorkingCopy() {
    JSFLibrary workingCopyLib = JSFLibraryRegistryFactory.eINSTANCE.createJSFLibrary();
//    workingCopyLib.setID(getID());
    workingCopyLib.setName(getName());
    workingCopyLib.setJSFVersion(getJSFVersion());
    workingCopyLib.setDeployed(isDeployed());
    workingCopyLib.setImplementation(isImplementation());
    Iterator itArchiveFiles = getArchiveFiles().iterator();
    while (itArchiveFiles.hasNext()) {
      ArchiveFile srcArchiveFile = (ArchiveFile)itArchiveFiles.next();
      ArchiveFile destArchiveFile = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
      destArchiveFile.setRelativeToWorkspace(srcArchiveFile.isRelativeToWorkspace());
      destArchiveFile.setSourceLocation(srcArchiveFile.getSourceLocation());
      destArchiveFile.setRelativeDestLocation(srcArchiveFile.getRelativeDestLocation());
      workingCopyLib.getArchiveFiles().add(destArchiveFile);
    }
    return workingCopyLib;
  }
View Full Code Here

Examples of org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary

            final IPath path = cpe.getPath();
           
            if( isJSFLibraryContainer( path ) )
            {
                String libId = path.lastSegment();
                JSFLibrary ref = JSFLibraryRegistryUtil.getInstance().getJSFLibraryRegistry().getJSFLibraryByID(libId);
               
                if( ref != null && ref.isImplementation() )
                {
                    return true;
                }
            }
        }
View Full Code Here

Examples of org.eclipse.jst.jsf.core.internal.jsflibraryregistry.JSFLibrary

   * @return the jsf library of ID or null if none
   * <!-- end-user-doc -->
   * @generated NOT
   */
  public JSFLibrary getJSFLibraryByID(String ID) {
    JSFLibrary library = null;
    if (ID != null) {
      Iterator itLibs = getAllJSFLibraries().iterator();
      while (itLibs.hasNext()) {
        JSFLibrary curLib = (JSFLibrary)itLibs.next();
        if (ID.equals(curLib.getID())) {
          library = curLib;
          break;
        }
      }
    }
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.