Package org.eclipse.core.runtime

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


                        setErrorMessage("Projects located in the workspace folder must be direct sub folders of the workspace folder");
                        setPageComplete(false);
                        return;
                    }

                    if (!projectPath.toFile().exists()) {
                        setErrorMessage("The selected existing source location in the workspace root does not exist");
                        setPageComplete(false);
                        return;
                    }
                }
View Full Code Here


  private static File getTemplateFile() {
    IPath path= PerlEditorPlugin.getDefault().getStateLocation();
    path= path.append(TEMPLATE_FILE);
   
    return path.toFile();
  }
}
View Full Code Here

        // a resource outside the workspace as well, in particular
        // point to dependency jars outside of the
        // workspace. All these cases must be handled.
        IResource workspaceResource = null;
        IPath resourcePath = new Path(localResourceLocation);
        File publishableFile = resourcePath.toFile();

        // First see if it is a full path to an existing file.
        if (projectPath != null && publishableFile != null
            && publishableFile.exists()) {
View Full Code Here

                {
                    unpack(cache, bundle, classpath);
                    for (String cp : classpath)
                    {
                        IPath p = ".".equals(cp) ? path : cache.append(cp);
                        if (p.toFile().exists())
                        {
                            IClasspathEntry e = JavaCore.newLibraryEntry(p, source,
                                rootPath, rules, attributes, exported);
                            entries.add(e);
                        }
View Full Code Here

    private String buildDestPattern(ISigilProjectModel sigil) throws CoreException
    {
        IPath loc = sigil.findBundleLocation().removeLastSegments(1);

        loc.toFile().mkdirs();

        return loc.toOSString() + File.separator + "[name].jar";
    }

    private File[] buildClasspath(ISigilProjectModel sigil, IProgressMonitor monitor)
View Full Code Here

    {
        cp = JavaCore.getResolvedClasspathEntry(cp);
        if (cp != null)
        {
            IPath p = cp.getPath();
            files.add(p.toFile());
        }
    }

    private void convertLibrary(ISigilProjectModel sigil, IClasspathEntry cp,
        List<File> files)
View Full Code Here

        if (project.exists())
        {
            p = project.getLocation().append(p.removeFirstSegments(1));
        }

        files.add(p.toFile());
    }

    private void convertSource(ISigilProjectModel sigil, IClasspathEntry cp,
        List<File> files) throws JavaModelException
    {
View Full Code Here

                    if (loc == null) {
                        // callers can protect against this by using
                        // checking exists()
                        throw new IllegalStateException("Sigil project does not exist");
                    }
                    else if (loc.toFile().exists())
                    {
                        bundle = parseContents(bldProjectFile);
                    }
                    else
                    {
View Full Code Here

  private MongoInstance[] loadSavedServers() {
    CsvReader reader = null;
    try {
      IPath libPath = MeclipsePlugin.getDefault().getStateLocation();
      libPath = libPath.append("servers.cfg");
      File file = libPath.toFile();
      if (!file.exists())
        return new MongoInstance[0];

      reader = new CsvReader(new BufferedReader(new FileReader(file)));
View Full Code Here

    // save server preferences here
    CsvWriter writer = null;
    try {
      IPath libPath = getStateLocation();
      libPath = libPath.append("servers.cfg");
      File file = libPath.toFile();
      if (!file.exists()) {
        file.createNewFile();
      }
      writer = new CsvWriter(new FileWriter(file, false), ',');
      for (MongoInstance server : mongoInstances.values()) {
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.