Package org.eclipse.core.runtime

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


      else
        throw new Exception(
            "Resource \""
                + f.getAbsolutePath()
                + "\"'s relative path to target directory not found. This resource can not moved.");
      File targetFile = targetAbsPath.toFile();
      // FileUtil.createFile(targetFile, false);
      FileUtil.copyFile(f, targetFile);
    }
  }
}
View Full Code Here


      // TODO Auto-generated catch block
      e.printStackTrace();
      return null;
    }

    return destination.toFile();
  }

}
View Full Code Here

      setPageComplete(false);
      return;
    }

    IPath outputDirectoryPath = new Path("connector-" + getOutputDirectory());
    if (newProjectWorkspaceRadio.getSelection() && outputDirectoryPath.toFile().exists()) {
      setMessage("A resource with the project name already exists in the workspace root", IMessageProvider.ERROR);
      setPageComplete(false);
      return;
    }
View Full Code Here

     */
    private void augmentClasspathWithEquinox(final List<String> classpath) {
        final IPath frameworkPath =
            new Path(karafPlatform.getState().getBundle(SystemBundleNames.EQUINOX.toString(), null).getLocation());

        classpath.add(frameworkPath.toFile().getAbsolutePath());
    }

    /**
     * Construct a config.ini from the Karaf configuration of this launcher.
     *
 
View Full Code Here

        System.arraycopy(vmArgs, 0, newVmArgs, 0, vmArgs.length);
       
        try {
            // TODO: Properly merge arguments in
            newVmArgs[vmArgs.length] = "-D" + FELIX_CONFIG_PROPERTIES_KEY + "=" + configProperties.toFile().toURI().toURL();
            newVmArgs[vmArgs.length + 1] = "-D" + FELIX_SYSTEM_PROPERTIES_KEY + "=" + systemProperties.toFile().toURI().toURL();
        } catch (MalformedURLException e) {

        }

        return newVmArgs;
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

 
  protected String[] getClassPathEntries(String installPath) {
    List cp = new ArrayList();
   
    IPath libPath = new Path(String.format("%s%s%s%s", installPath, SEPARATOR, "lib", SEPARATOR));
    if (libPath.toFile().exists()) {
      findJars(libPath, cp);
    }
   
    String[] entries = new String[cp.size() + 1];
    entries[0] = installPath + SEPARATOR + "etc";
View Full Code Here

        for (int i = 0; i < nodes.length; i++) {
            String contents = getResourceContents(nodes[i]);
            IPath path = new Path(Activator.getDefault().getStateLocation().toOSString() +
                                  File.separator + "t" + //$NON-NLS-1$
                                  String.valueOf(System.currentTimeMillis()));
            if (!path.toFile().mkdir()) {
                throw new Exception("Could not create directory " + path.toOSString()); //$NON-NLS-1$
            }
            path.toFile().deleteOnExit();
            File transfer = new File(path + File.separator + nodes[i].getName());
            transfer.deleteOnExit();
View Full Code Here

                                  File.separator + "t" + //$NON-NLS-1$
                                  String.valueOf(System.currentTimeMillis()));
            if (!path.toFile().mkdir()) {
                throw new Exception("Could not create directory " + path.toOSString()); //$NON-NLS-1$
            }
            path.toFile().deleteOnExit();
            File transfer = new File(path + File.separator + nodes[i].getName());
            transfer.deleteOnExit();
            FileOutputStream fos = new FileOutputStream(transfer);
            PrintWriter writer = new PrintWriter(fos);
            writer.write(contents);
View Full Code Here

        mdFolder.refreshLocal(IResource.DEPTH_INFINITE, null);
    }

    public static IPath createGuvnorMetadataLocation(String rootPath) throws Exception {
        IPath path = new Path(rootPath + File.separator + ".guvnorinfo"); //$NON-NLS-1$
        if (!path.toFile().exists()) {
            if (!path.toFile().mkdir()) {
                throw new Exception("Could not create directory " + path.toOSString()); //$NON-NLS-1$
            }
        }
        return path;
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.