Examples of ArchiveFile


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

   */
  public IClasspathEntry[] getClasspathEntries(JSFLibrary lib){   
    //TODO: cache to optimize.   probably belongs inside JSFLibrary model.
    ArrayList res= new ArrayList(lib.getArchiveFiles().size());
    for (Iterator it=lib.getArchiveFiles().iterator();it.hasNext();) {
      ArchiveFile jar= (ArchiveFile)it.next();     
      if (jar != null && jar.exists()) {
        IClasspathEntry entry = getClasspathEntry(jar);
        if (entry != null)
          res.add(entry);
      }
    }
View Full Code Here

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

    workingCopyLib.setDeployed(isDeployed());
    workingCopyLib.setImplementation(isImplementation());
    workingCopyLib.setPluginID(getPluginID());
    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.ArchiveFile

  
   * @param relativePathFileName Relative location of the ArchiveFile
   * @return ArchiveFile instance.
   */
  protected ArchiveFile createArchiveFile(String relativePathFileName){
    ArchiveFile file = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
    file.setRelativeToWorkspace(false);
    file.setSourceLocation(relativePathFileName);
    file.setRelativeDestLocation(relativeDestLocation);
    return file;
  }
View Full Code Here

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

   * multiple instances at same location.
   * @throws CoreException on core failure.
   */
  private void addArchives(JSFLibrary newLib) throws InvalidArchiveFilesCreationException, CoreException {
    JSFLibraryArchiveFilesDelegate jarCol = null;
    ArchiveFile jar = null;

    jarCol = (JSFLibraryArchiveFilesDelegate)config_element.createExecutableExtension(DELEGATE);
    if (jarCol != null){
      jarCol.setConfigurationElement(config_element);
      Collection jars = jarCol.getArchiveFiles();
      if (jars == null)//TODO: better validation and error handling
        return;
      Iterator it = jars.iterator();
      while (it.hasNext()){
        Object aJar = it.next();
        if (aJar instanceof ArchiveFile){//for now check to see ArchiveFiles were being returned
          jar = (ArchiveFile)aJar;
          if (!newLib.containsArchiveFile(jar.getSourceLocation()))
            newLib.getArchiveFiles().add(jar);
        }
        else {
          throw new InvalidArchiveFilesCreationException(
              NLS.bind(
                  Messages.PluginProvidedJSFLibraryCreationHelper_ErrorMultipleDefinition,
                  jar.getSourceLocation(),
                  config_element.getName()));
        }
         
      }
    }
View Full Code Here

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

  /**
   * Add a jar file to the library
   * @param pluginRootRelativePath
   */
  public void addArchiveFile(String pluginRootRelativePath) {
    ArchiveFile jar = createArchiveFile(pluginRootRelativePath);
    if (!newLib.containsArchiveFile(jar.getSourceLocation()))
      newLib.getArchiveFiles().add(jar);
  }
View Full Code Here

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

  
   * @param relativePathFileName Relative location of the ArchiveFile
   * @return ArchiveFile instance.
   */
  private ArchiveFile createArchiveFile(String pluginRootRelativePath){
    ArchiveFile file = JSFLibraryRegistryFactory.eINSTANCE.createArchiveFile();
    file.setRelativeToWorkspace(false);
    file.setSourceLocation(pluginRootRelativePath);
    file.setRelativeDestLocation(relativeDestLocation);
    return file;
  }
View Full Code Here

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

      JSFLibrary aJSFLib) {
    if (aJSFLib == null)
      return OK_STATUS;
   
    for (Iterator it=aJSFLib.getArchiveFiles().iterator();it.hasNext();){
      ArchiveFile jar = (ArchiveFile)it.next();
      if (jars.contains(jar.getResolvedSourceLocation())){
        return createErrorStatus(NLS.bind(Messages.JSFFacetInstallDataModelProvider_DupeJarValidation,jar.getResolvedSourceLocation()));       
      }
            jars.add(jar.getResolvedSourceLocation());
    }
    return OK_STATUS;
  }
View Full Code Here

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

  public boolean containsArchiveFile(String fullPath) {
    boolean contains = false;
    if (fullPath != null) {
      Iterator itArchiveFiles = getArchiveFiles().iterator();
      while (itArchiveFiles.hasNext()) {
        ArchiveFile archiveFile = (ArchiveFile)itArchiveFiles.next();
        if (fullPath.equals(archiveFile.getResolvedSourceLocation())) {
          contains = true;
          break;
        }
      }
    }
View Full Code Here

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

    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.ArchiveFile

      setDeployed(otherLibrary.isDeployed());
      setImplementation(otherLibrary.isImplementation());
      Iterator itArchiveFiles = otherLibrary.getArchiveFiles().iterator();
      getArchiveFiles().clear();
      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());
        getArchiveFiles().add(destArchiveFile);
      }
    }
  }
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.