Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.Path.toFile()


    if (relativeDestLocation != null) {
      outPath = outPath.append(relativeDestLocation);
    }
    outPath = outPath.append(getName());
    try {
      if (!outPath.toFile().exists()) {
        out = new FileOutputStream(outPath.toOSString());
      } else {
        return copied;
      }
      if (getJSFLibrary() instanceof PluginProvidedJSFLibrary) {
View Full Code Here


        String baseLocation = model.getBaseLocation();
        // The baseLocation may be a path on disk or relative to the
        // workspace root. Don't translate on-disk paths to
        // in-workspace resources.
        IPath basePath = new Path(baseLocation);
        if (basePath.segmentCount() > 1 && !basePath.toFile().exists()) {
          file = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath);
        }
      }
    }
    finally {
View Full Code Here

    if (relativeDestLocation != null) {
      outPath = outPath.append(relativeDestLocation);
    }
    outPath = outPath.append(getName());
    try {
      if (!outPath.toFile().exists()) {
        out = new FileOutputStream(outPath.toOSString());
      } else {
        return copied;
      }
      if (getTapestryLibrary() instanceof PluginProvidedTapestryLibrary) {
View Full Code Here

  public static HashSet<IClasspathEntry> getGoogleDataDependencies(String javaClientLibPath,
      FileTemplateConfig templateConfig) throws CoreException {
    HashSet<IClasspathEntry> entries = new HashSet<IClasspathEntry>();
    try {
      IPath gDataJavaClientLibPath = new Path(javaClientLibPath);
      File gDataJavaClientLibDir = gDataJavaClientLibPath.toFile();
      File[] gDataJavaLibs = gDataJavaClientLibDir.listFiles();
      for(File gDataJavaLib : gDataJavaLibs){
        String gDataJavaLibName = gDataJavaLib.getName().trim();
        List<String> dependencyList = templateConfig.getDependencies();
        for(String dependency : dependencyList) {
View Full Code Here

  public static HashSet<IClasspathEntry> getExtDependencies(
      String extDependencyPath, FileTemplateConfig templateConfig) throws CoreException {
    HashSet<IClasspathEntry> entries = new HashSet<IClasspathEntry>();
    try {
      IPath extLibPath = new Path(extDependencyPath);
      File extLibDir = extLibPath.toFile();
      File[] extLibs = extLibDir.listFiles();
      for(File extLib : extLibs){
        String extLibName = extLib.getName().trim();
        List<String> extDependencyList = templateConfig.getExtDependencies();
        for(String dependency : extDependencyList) {
View Full Code Here

      File source = new File(coveragefile);
      monitor.beginTask("", (int) source.length()); //$NON-NLS-1$
      byte[] buffer = new byte[0x1000];
      try {
        InputStream in = new FileInputStream(source);
        OutputStream out = new FileOutputStream(file.toFile());
        int l;
        while ((l = in.read(buffer)) != -1) {
          out.write(buffer, 0, l);
          monitor.worked(l);
        }
View Full Code Here

        String gwtFolder = StringUtils.substringBefore(gwtLocation, "/gwt-user/");
        String versionString = StringUtils.substringAfter(gwtLocation, "/gwt/gwt-user/");
        String devFolder = gwtFolder + "/gwt-dev/" + versionString;
        String devFileName = "gwt-dev-" + versionString + ".jar";
        Path path = new Path(devFolder + "/" + devFileName);
        if (path.toFile().exists()) {
          return path;
        }
      }
      // gwt-dev in same folder as gwt-user.jar
      {
View Full Code Here

        }
      }
      // gwt-dev in same folder as gwt-user.jar
      {
        IPath path = getDevLibPath(gwtLocation);
        if (path.toFile().exists()) {
          return path;
        }
      }
    }
    // use gwt-dev.jar from default GWT location
View Full Code Here

        {
            // No container available
            return new String[0];
        }
        Path containerDir = new Path(containerDirURL.getPath());
        File dir = containerDir.toFile();
        String[] containerFiles = dir.list(new BuildFilenameFilter());
        for (int i = 0; i < containerFiles.length; i++)
        {
            String currentFileName = containerFiles[i];
            if (currentFileName.startsWith(CONTAINER_BUILD_FILES_PREFIX))
View Full Code Here

        if (url == null) {
            Path path = javadocArtifact;
            if (path != null) {
                String u;
                try {
                    u = "jar:" + path.toFile().toURL().toExternalForm() + "!/";
                    try {
                        url = new URL(u);
                    } catch (MalformedURLException e) {
                        // this should not happen
                        IvyPlugin.log(IStatus.ERROR,
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.