Examples of ArchiveFile


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

   */
  public boolean copyTo(String baseDestLocation) {
    boolean allCopied = true;
    Iterator itFiles = getArchiveFiles().iterator();
    while (itFiles.hasNext()) {
      ArchiveFile archiveFile = (ArchiveFile)itFiles.next();
      boolean copied = archiveFile.copyTo(baseDestLocation);
      allCopied = allCopied && copied;
    }
    return allCopied;
  }
View Full Code Here

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

  public Collection<IClasspathEntry> getJars() {
    Set<IClasspathEntry> results = new HashSet<IClasspathEntry>();
    if (getLibrary() != null){
      List jars = getLibrary().getArchiveFiles();
      for (Iterator it= jars.iterator();it.hasNext();){
        ArchiveFile jar = (ArchiveFile)it.next();
        String path = jar.getResolvedSourceLocation();
        results.add(JavaCore.newLibraryEntry(new Path(path), null, null));
      }
    }     
    return results;
  }
View Full Code Here

Examples of org.eclipse.jst.tapestry.core.internal.tapestrylibraryregistry.ArchiveFile

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

Examples of org.eclipse.jst.tapestry.core.internal.tapestrylibraryregistry.ArchiveFile

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

    jarCol = (TapestryLibraryArchiveFilesDelegate)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.PluginProvidedTapestryLibraryCreationHelper_ErrorMultipleDefinition,
                  jar.getSourceLocation(),
                  config_element.getName()));
        }
         
      }
    }
View Full Code Here

Examples of org.eclipse.jst.tapestry.core.internal.tapestrylibraryregistry.ArchiveFile

    }
    return false;
  }

  private boolean isAnyArchiveFileChanged(final EList source, EList target) {   
    ArchiveFile arSrc = null;
    Iterator it = source.iterator();
    while (it.hasNext()) {
      arSrc = (ArchiveFile) it.next();
      if (!findMatchedArchive(arSrc, target)) {
        return true;
View Full Code Here

Examples of org.eclipse.jst.tapestry.core.internal.tapestrylibraryregistry.ArchiveFile

    }
    return false;
  }
 
  private boolean findMatchedArchive(ArchiveFile source, EList list) {
    ArchiveFile target = null;
    Iterator it = list.iterator();
    while (it.hasNext()) {
      target = (ArchiveFile) it.next();
      if (target.equals(source)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

Examples of org.eclipse.jst.tapestry.core.internal.tapestrylibraryregistry.ArchiveFile

   */
  public IClasspathEntry[] getClasspathEntries(TapestryLibrary 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.tapestry.core.internal.tapestrylibraryregistry.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.tapestry.core.internal.tapestrylibraryregistry.ArchiveFile

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

Examples of org.eclipse.jst.tapestry.core.internal.tapestrylibraryregistry.ArchiveFile

        TapestryLibrary 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.TapestryFacetInstallDataModelProvider_DupeJarValidation,jar.getResolvedSourceLocation()));       
        }
              jars.add(jar.getResolvedSourceLocation());
      }
      return OK_STATUS;
    }
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.