Examples of ArchiveFile


Examples of org.eclipse.jst.tapestry.core.internal.tapestrylibraryregistry.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

         */
        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

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

        }  
       
        private int numberofValidJar(EList archiveFiles) {
            int total = 0;
            final Iterator it = archiveFiles.iterator();
            ArchiveFile ar = null;
            while(it.hasNext()) {
                ar = (ArchiveFile) it.next();
                if (ar.exists()) {
                    total++;
                }
            }
            return total;
        }
View Full Code Here

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

         */
        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();
View Full Code Here

Examples of org.eclipse.jst.tapestry.core.internal.tapestrylibraryregistry.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.tapestry.core.internal.tapestrylibraryregistry.ArchiveFile

    workingCopyLib.setTapestryVersion(getTapestryVersion());
    workingCopyLib.setDeployed(isDeployed());
    workingCopyLib.setImplementation(isImplementation());
    Iterator itArchiveFiles = getArchiveFiles().iterator();
    while (itArchiveFiles.hasNext()) {
      ArchiveFile srcArchiveFile = (ArchiveFile)itArchiveFiles.next();
      ArchiveFile destArchiveFile = TapestryLibraryRegistryFactory.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.tapestry.core.internal.tapestrylibraryregistry.ArchiveFile

      setDeployed(otherLibrary.isDeployed());
      setImplementation(otherLibrary.isImplementation());
      Iterator itArchiveFiles = otherLibrary.getArchiveFiles().iterator();
      getArchiveFiles().clear();
      while (itArchiveFiles.hasNext()) {
        ArchiveFile srcArchiveFile = (ArchiveFile)itArchiveFiles.next();
        ArchiveFile destArchiveFile = TapestryLibraryRegistryFactory.eINSTANCE.createArchiveFile();
        destArchiveFile.setRelativeToWorkspace(srcArchiveFile.isRelativeToWorkspace());
        destArchiveFile.setSourceLocation(srcArchiveFile.getSourceLocation());
        destArchiveFile.setRelativeDestLocation(srcArchiveFile.getRelativeDestLocation());
        getArchiveFiles().add(destArchiveFile);
      }
    }
  }
View Full Code Here

Examples of org.eclipse.jst.tapestry.core.internal.tapestrylibraryregistry.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.tapestry.core.internal.tapestrylibraryregistry.ArchiveFile

    workingCopyLib.setDeployed(isDeployed());
    workingCopyLib.setImplementation(isImplementation());
    workingCopyLib.setPluginID(getPluginID());
    Iterator itArchiveFiles = getArchiveFiles().iterator();
    while (itArchiveFiles.hasNext()) {
      ArchiveFile srcArchiveFile = (ArchiveFile)itArchiveFiles.next();
      ArchiveFile destArchiveFile = TapestryLibraryRegistryFactory.eINSTANCE.createArchiveFile();
      destArchiveFile.setRelativeToWorkspace(srcArchiveFile.isRelativeToWorkspace());
      destArchiveFile.setSourceLocation(srcArchiveFile.getSourceLocation());
      destArchiveFile.setRelativeDestLocation(srcArchiveFile.getRelativeDestLocation());
      workingCopyLib.getArchiveFiles().add(destArchiveFile);
    }
    return workingCopyLib;
  }
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.