Package org.eclipse.core.runtime

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


        }

        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();
        }
View Full Code Here


                    return null;
                }
                while (e.hasMoreElements()) {
                    final String s = (String) e.nextElement();
                    final Path path = new Path(s);
                    if (path.lastSegment().equals(beamname)) {
                        return getBeamFromBundlePath(bundle, s, path);
                    }
                }
            }
        }
View Full Code Here

          pathString);
    } else {
      messageString = NLS
          .bind(
              PreferencesMessages.WizardDataTransfer_overwriteNameAndPathQuestion,
              path.lastSegment(), path.removeLastSegments(1)
                  .toOSString());
    }

    final MessageDialog dialog = new MessageDialog(getContainer()
        .getShell(), PreferencesMessages.Question, null, messageString,
View Full Code Here

                error = "Location must be specified.";
            else if (!Path.EMPTY.isValidPath(externalLocation))
                error = "Invalid location.";
            else {
                IPath path = new Path(externalLocation);
                if (!Project.BNDCNF.equals(path.lastSegment())) {
                    error = "Last path segment must be '" + Project.BNDCNF + "'";
                } else {
                    File dir = new File(externalLocation);
                    if (dir.exists() && !dir.isDirectory())
                        error = "Location already exists and is not a directory.";
View Full Code Here

   
    editor = new FileFieldEditor("fileSelect","Select File: ",fileSelectionArea); //NON-NLS-1 //NON-NLS-2
    editor.getTextControl(fileSelectionArea).addModifyListener(new ModifyListener(){
      public void modifyText(ModifyEvent e) {
        IPath path = new Path(ImportWizardPage.this.editor.getStringValue());
        setFileName(path.lastSegment());
      }
    });
    String[] extensions = new String[] { "*.*" }; //NON-NLS-1
    editor.setFileExtensions(extensions);
    fileSelectionArea.moveAbove(null);
View Full Code Here

            // Add the jars from runtime/modules
            File modulesDirectory = runtimePath.append("modules").toFile();
            if (modulesDirectory != null && modulesDirectory.exists()) {
                for (File file : modulesDirectory.listFiles()) {
                    IPath path = new Path(file.getPath());
                    String name = path.lastSegment();
                    String extension = path.getFileExtension();
                   
                    // Only include API and launcher JARs
                    if (!"jar".equals(extension)) {
                        continue;
View Full Code Here

            // Add a selection of the jars from runtime/modules
            File modulesDirectory = runtimePath.append("modules").toFile();
            if (modulesDirectory != null && modulesDirectory.exists()) {
                for (File file : modulesDirectory.listFiles()) {
                    IPath path = new Path(file.getPath());
                    String name = path.lastSegment();
                    String extension = path.getFileExtension();
                   
                    // Only include API and launcher JARs
                    if (!"jar".equals(extension)) {
                        continue;
View Full Code Here

            File libDirectory = runtimePath.append("lib").toFile();
            if (libDirectory != null && libDirectory.exists()) {
                for (File file : libDirectory.listFiles()) {
                    IPath path = new Path(file.getPath());
                    String name = path.lastSegment();
                    String extension = path.getFileExtension();
                   
                    // Only include jaxb, jaxws and jsr API JARs
                    if (!"jar".equals(extension)) {
                        continue;
View Full Code Here

    for (Iterator it=urls.iterator();it.hasNext();){
      IPath extPath = new Path(((UrlPatternType)it.next()).getValue());
      if (extPath != null){
        String ext = extPath.getFileExtension();
        if (ext == null){
          String lastSeg = extPath.lastSegment();
          if (lastSeg.equals("*")) //$NON-NLS-1$
          {
            return extPath.removeLastSegments(1).toString();
          }
         
View Full Code Here

            if (extPath != null)
            {
                String ext = extPath.getFileExtension();
                if (ext == null)
                {
                    String lastSeg = extPath.lastSegment();
                    if (lastSeg != null && lastSeg.equals("*")) //$NON-NLS-1$
                    {
                        return extPath.removeLastSegments(1).toString();
                    }

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.