Examples of EclipseInstallation


Examples of com.instantiations.installer.core.eclipse.EclipseInstallation

      public boolean canExecute() {
        IProductVersion V34 = new EclipseVersion(3, 4, 0, null);
        List newer = new ArrayList();
        String[] eclipsePaths = options.getStrings(InstallOptions.OPTION_ECLIPSE_PATH_LIST);
        for (int i = 0; i < eclipsePaths.length; i++) {
          EclipseInstallation eclipse = new EclipseInstallation(new File(eclipsePaths[i]));
          if (eclipse.getEclipseVersion().compareTo(V34) >= 0)
            newer.add(eclipse);
        }
        newerEclipses = new EclipseInstallation[newer.size()];
        newer.toArray(newerEclipses);
        return newerEclipses.length > 0;
      }

      public void aboutToStep() {
        StringBuffer text = new StringBuffer();
        for (int i = 0; i < newerEclipses.length; i++) {
          EclipseInstallation each = newerEclipses[i];
          text.append(each.getEclipseDir().getAbsolutePath());
          text.append(" ");
          text.append(each.getDescription());
          text.append("\n");
        }
        setText(text.toString());
      }
    };
View Full Code Here

Examples of com.instantiations.installer.core.eclipse.EclipseInstallation

      public boolean canExecute() {
        List running = new ArrayList();
        String[] eclipsePaths = options.getStrings(InstallOptions.OPTION_ECLIPSE_PATH_LIST);
        for (int i = 0; i < eclipsePaths.length; i++) {
          EclipseInstallation eclipse = new EclipseInstallation(new File(eclipsePaths[i]));
          if (eclipse.isRunning())
            running.add(eclipse);
        }
        runningEclipses = new EclipseInstallation[running.size()];
        running.toArray(runningEclipses);
        return runningEclipses.length > 0;
      }

      public void aboutToStep() {
        StringBuffer text = new StringBuffer();
        for (int i = 0; i < runningEclipses.length; i++) {
          EclipseInstallation each = runningEclipses[i];
          text.append(each.getEclipseDir().getAbsolutePath());
          text.append(" ");
          text.append(each.getDescription());
          text.append("\n");
        }
        setText(text.toString());
      }
    };
View Full Code Here

Examples of com.instantiations.installer.core.eclipse.EclipseInstallation

    Collection installs = new HashSet(20);
    for (int i = 0; i < eclipsePathList.length; i++) {

      // For a given Eclipse installation, determine the code to be installed

      EclipseInstallation eclipse = new EclipseInstallation(new File(eclipsePathList[i]));
      IProductVersion eclipseTarget = adjustEclipseTarget(eclipse.getEclipseVersion());

      if (options.isVerbose()) {
        System.out.println("eclipse");
        System.out.println(" found eclipse version = " + eclipse.getEclipseVersion());
        System.out.println(" found product version = " + eclipse.getProductVersion());
        System.out.println(" mapped version = " + eclipseTarget.getMajor() + "." + eclipseTarget.getMinor()
          + "." + eclipseTarget.getService());
        System.out.println("processing " + eclipsePathList[i]);
        System.out.println("  installDir = " + installDir);
        System.out.println("  eclipse found version = ");
        System.out.println("  targetDir = E-" + (eclipseTarget.getMajor() + "." + eclipseTarget.getMinor()));
        System.out.println("  selfpath = " + selfPath);
        System.out.println("  image = " + image);
      }

      for (int j = 0; j < subProducts.length; j++) {
        SubProduct each = subProducts[j];
        if (options.isVerbose()) {
          System.out.println("processing " + each);
          System.out.println("  each.instdir = " + each.getInstallDirName());
        }

        // Check to see if subproduct can be linked to this eclipse installation

        // Allow each subproduct to determine whether they can link
        // to this eclipse installation and what version should be linked
        IProductVersion eachEclipseTarget = each.adjustEclipseTarget(image, eclipse, eclipseTarget, options);

        if (eachEclipseTarget == null) {
          if (options.isVerbose())
            System.out.println("  cannot link " + each + " to " + eclipsePathList[i]);
          continue;
        }

        if (options.isVerbose()) {
          System.out.println("can link to " + eclipse.getProductDir().getAbsolutePath());
        }

        String eachEclipseTargetString = eachEclipseTarget.getMajor() + "." + eachEclipseTarget.getMinor();

        String relInstallPath = each.getInstallDirName() + File.separator + "E-" + eachEclipseTargetString;
        File installSubDir = new File(installDir, relInstallPath);

        // Install the sub product if not already installed

        if (!installs.contains(relInstallPath)) {
          installs.add(relInstallPath);
          if (options.isVerbose()) {
            System.out.println("searching for " + BaseProductInstaller.INSTALL_IMAGE + "/" + each.getName()
              + "/E-" + eachEclipseTargetString);
            System.out.println(BaseProductInstaller.INSTALL_IMAGE + "/" + each.getName() + "/E-common");
          }

          ZipEntry[] entries = each.getEntries(image, eachEclipseTarget);
          if (entries == null) {
            throw new FileNotFoundException("Nothing found searching for " +
                            BaseProductInstaller.INSTALL_IMAGE + "/" +
                            each.getName()+
                            "/E-" + eachEclipseTargetString + " and " +
                            BaseProductInstaller.INSTALL_IMAGE + "/" +
                            each.getName() + "/E-common");
          }
          if (options.isVerbose()) {
            if (entries == null) {
              System.out.println("ZipEntries is null");
            }
            else {
              System.out.println("ZipEntries size " + entries.length);
            }
          }
          for (int k = 0; k < entries.length; k++) {
            if (options.isVerbose()) {
              if (entries[k] == null) {
                System.out.println("processing ZipEntry[ " + k + "] is null");
              }
              else {
                System.out.println("ZipEntry [" + k + "] = " + entries[k].getName());
              }
            }
            if (entries[k] == null) {
              throw new FileNotFoundException("one of the following is not found " +
                              BaseProductInstaller.INSTALL_IMAGE + "/" +
                              each.getName()+
                              "/E-" + eachEclipseTargetString + " or " +
                              BaseProductInstaller.INSTALL_IMAGE + "/" +
                              each.getName() + "/E-common");
            }
            step.add(new ExtractDirectoryOperation(image, entries[k], installSubDir));
          }
        }

        // Link the eclipse installation to the installed code

        step.add(new LinkProductOperation(options, new String[]{
          eclipse.getProductDir().getAbsolutePath()
        }, each.getLinkId(), installSubDir));

        // If CLeanup CruiseControl Style link files
        if (each.getName().equalsIgnoreCase("CodeProCore")) {
          if (options.isVerbose()) {
View Full Code Here

Examples of com.instantiations.installer.core.eclipse.EclipseInstallation

   */
  protected void createDeleteOldLinkOperations(final RunOperationsStep step, String linkFileName) {
    String[] eclipsePathList = InstallOptions.pathListToArray(options
      .getString(InstallOptions.OPTION_ECLIPSE_PATH_LIST));
    for (int i = 0; i < eclipsePathList.length; i++) {
      final EclipseInstallation eclipse = new EclipseInstallation(new File(eclipsePathList[i]));
      createDeleteOldLinkOperation(step, eclipse, linkFileName);
    }
  }
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.