Package org.eclipse.core.runtime

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


  }

  private static File getImageFile(long id) {
    IPath path = new Path(Activator.getDefault().getStateLocation().toOSString());
    path = path.append(ICONS_FOLDER);
    File root = new File(path.toOSString());
    if (!root.exists())
      root.mkdir();

    path = path.append(id + ".ico");
View Full Code Here


    if (!root.exists())
      root.mkdir();

    path = path.append(id + ".ico");

    return new File(path.toOSString());
  }

  /**
   * Attempts to find the primary <code>IWorkbenchWindow</code> from the
   * PlatformUI facade. Otherwise, returns <code>NULL</code> if none.
View Full Code Here

    if (activator == null)
      return null;

    IPath path = new Path(activator.getStateLocation().toOSString());
    path = path.append(ICONS_FOLDER);
    File root = new File(path.toOSString());
    if (!root.exists())
      res = root.mkdir();
    else
      res = true;
View Full Code Here

    path = path.append(fileName);

    if (!res)
      return null;

    return new File(path.toOSString());
  }

  private static File getImageFile(long id) {
    return getImageFile(id + ".ico"); //$NON-NLS-1$
  }
View Full Code Here

  }

  private static File getImageFile(long id) {
    IPath path = new Path(Activator.getDefault().getStateLocation().toOSString());
    path = path.append(ICONS_FOLDER);
    File root = new File(path.toOSString());
    if (!root.exists())
      root.mkdir();

    path = path.append(id + ".ico");
View Full Code Here

    if (!root.exists())
      root.mkdir();

    path = path.append(id + ".ico");

    return new File(path.toOSString());
  }

  /**
   * Attempts to find the primary <code>IWorkbenchWindow</code> from the
   * PlatformUI facade. Otherwise, returns <code>NULL</code> if none.
View Full Code Here

        private String copyPltFile(final String pltPath,
                final String alternatePltFileDirectory) throws IOException {
            IPath path = new Path(pltPath);
            final String name = path.lastSegment();
            path = new Path(alternatePltFileDirectory).append(name);
            Files.copy(new File(pltPath), new File(path.toOSString()));
            return path.toPortableString();
        }

        private void checkPlt(final String pltPath,
                final String alternatePltFileDirectory, final IProgressMonitor monitor,
View Full Code Here

        } else {
            ErlLogger.debug("Not supported OS found, no C binary is used.");
            return "";
        }

        return path.toOSString();
    }

    @Override
    protected boolean getUserInput() {
        final Shell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();
View Full Code Here

            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();
            FileOutputStream fos = new FileOutputStream(transfer);
View Full Code Here

            writer.flush();
            writer.close();
            res.add(transfer.getAbsolutePath());

            IPath metaPath = GuvnorMetadataUtils.
                                createGuvnorMetadataLocation(path.toOSString());
            metaPath.toFile().deleteOnExit();
            File metaFile = GuvnorMetadataUtils.
                                getGuvnorMetadataFile(metaPath.toOSString(), nodes[i].getName());
            metaFile.deleteOnExit();
            GuvnorMetadataUtils.writeGuvnorMetadataProps(metaFile, getGuvnorMetadataProps(nodes[i]));
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.