Package org.eclipse.core.runtime

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


        // viewer jest selection providerem

        if (StatsTreeModel.getInstance().getRoot().getHtmlPath() == null) {
            final IPath location = Activator.getDefault().getStateLocation()
                    .append(CoverConstants.REPORT_DIR);
            final File dir = location.toFile();

            if (!dir.exists() && !dir.mkdir()) {
                CoverageHelper.reportError("Can not save results!");
                return;
            }
View Full Code Here


    String _plus = (source + " doesn\'t exist");
    boolean _exists = source.exists();
    Assert.assertTrue(_plus, _exists);
    IWorkspaceRoot _workspaceRoot = this.getWorkspaceRoot();
    IPath _location = _workspaceRoot.getLocation();
    final File targetRoot = _location.toFile();
    final File target = new File(targetRoot, path);
    this.copy(source, target);
  }
 
  protected void setUpTmpFile(final String path) throws IOException {
View Full Code Here

    @Override
    protected ISourceContainer[] createSourceContainers() throws CoreException {
        final IPath lib = otpHome.addTrailingSeparator().append("lib")
                .addTrailingSeparator();
        final Set<String> moduleNames = modules(lib.toFile());
        final List<IPath> moduleDirs = new ArrayList<IPath>();
        for (final String moduleName : moduleNames) {
            final String h = highestVersion(lib.toFile(), moduleName);
            if (h != null) {
                moduleDirs.add(lib.addTrailingSeparator().append(h));
View Full Code Here

        final IPath lib = otpHome.addTrailingSeparator().append("lib")
                .addTrailingSeparator();
        final Set<String> moduleNames = modules(lib.toFile());
        final List<IPath> moduleDirs = new ArrayList<IPath>();
        for (final String moduleName : moduleNames) {
            final String h = highestVersion(lib.toFile(), moduleName);
            if (h != null) {
                moduleDirs.add(lib.addTrailingSeparator().append(h));
            }
        }
        final List<ISourceContainer> r = new ArrayList<ISourceContainer>();
View Full Code Here

      filePath = filePath.addFileExtension(extension);
    }
    extension = filePath.getFileExtension();
    fileName = filePath.removeFileExtension().lastSegment();
    int i = 1;
    while (filePath.toFile().exists()) {
      i++;
      filePath = containerFullPath.append(fileName + i);
      if (extension != null) {
        filePath = filePath.addFileExtension(extension);
      }
View Full Code Here

     */
    private RecentDescriptionBeansManager() {
        try {
            IPath path = RbSubclipsePlugin.getPlugin().getPluginPath();
            IPath cacheFile = path.append(CACHE_FILE_RBL);
            this.cacheFile = cacheFile.toFile();
            readCache();
        } catch (Exception e) {
        }
        if( null == recentDescriptionBeans ){
            recentDescriptionBeans = new RecentDescriptionBeans();
View Full Code Here

  public void setStoragePathRootTests() throws IOException {
    IPath oldPath = plugin.getStoragePathRoot();
    try {
      IPath path = oldPath.append(System.currentTimeMillis() + "");

      File file = path.toFile();

      // File not exist, should return false:
      assertFalse(file.exists());
      assertFalse(plugin.setStoragePathRoot(file));
View Full Code Here

            ivySettings = new IvySettings();
        }
        if (getProject() != null) {
            IPath location = getProject().getLocation();
            if (location != null) {
                ivySettings.setBaseDir(location.toFile());
            }
        }
        ResolvedPath ivyUserDir = getIvyUserDir();
        if (ivyUserDir.getError() != null) {
            throw new IvyDEException("Incorrect path of the Ivy user dir",
View Full Code Here

        if (url == null) {
            IPath path = javadocArtifact;
            if (path != null) {
                String u;
                try {
                    u = "jar:" + path.toFile().toURI().toURL().toExternalForm() + "!/";
                    try {
                        url = new URL(u);
                    } catch (MalformedURLException e) {
                        // this should not happen
                        IvyPlugin.logError("The jar URL for the javadoc is not formed correctly "
View Full Code Here

                    IFile ifile = project.getFile(path);
                    // compute the actual file system location, following Eclipse's linked folders
                    // (see IVYDE-211)
                    IPath ipath = ifile.getLocation();
                    // get the corresponding java.io.File instance
                    file = ipath.toFile();
                } else {
                    file = file.getAbsoluteFile();
                }
            }
            url = file.toURI().toURL();
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.