Package org.eclipse.core.runtime

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


            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


          if (storagePath != null) {
            // If they are different, the IStorage contract is not
            // being honored
            // (https://bugs.eclipse.org/bugs/show_bug.cgi?id=73098).
            // Favor the name.
            if (!storagePath.lastSegment().equals(name)) {
              IPath workingPath = storagePath.addTrailingSeparator();
              location = workingPath.append(name).toString();
            }
            else {
              location = storagePath.makeAbsolute().toString();
View Full Code Here

          if (storagePath != null) {
            // If they are different, the IStorage contract is not
            // being honored
            // (https://bugs.eclipse.org/bugs/show_bug.cgi?id=73098).
            // Favor the name.
            if (!storagePath.lastSegment().equals(name)) {
              IPath workingPath = storagePath.addTrailingSeparator();
              path = workingPath.append(name).toString();
            }
            else {
              path = storagePath.makeAbsolute().toString();
View Full Code Here

        projectLocation= new Path(canonicalPath);
      } catch (IOException e) {
        JavaPlugin.log(e);
      }

      String existingName= projectLocation.lastSegment();
      if (!existingName.equals(name)) {
        setErrorMessage(Messages.format(NewWizardMessages.NewJavaProjectWizardPageOne_Message_invalidProjectNameForWorkspaceRoot, BasicElementLabels.getResourceName(existingName)));
        return false;
      }
    }
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

    IPath workspace = null;
    IPath storage = Path.fromOSString(".home.abc");
    WorkspaceStorage ws = new WorkspaceStorage(storage, workspace);
   
    String fileSeparator = System.getProperty("file.separator");
    String expected = " [may be " + storage.lastSegment().replace(".", fileSeparator) + "?]";
    decorator.decorate(ws, decoration);
    assertThat(args.size(), equalTo(1));
    assertThat(args.get(0), equalTo(expected));
  }
View Full Code Here

      filePath = containerFullPath.append(fileName + i);
      if (extension != null) {
        filePath = filePath.addFileExtension(extension);
      }
    }
    return filePath.lastSegment();
  }

  /**
   * Runs the wizard in a dialog.
   *
 
View Full Code Here

      filePath = containerFullPath.append(fileName + i);
      if (extension != null) {
        filePath = filePath.addFileExtension(extension);
      }
    }
    return filePath.lastSegment();
  }

  /**
   * Runs the wizard in a dialog.
   *
 
View Full Code Here

      filePath = containerFullPath.append(fileName + i);
      if (extension != null) {
        filePath = filePath.addFileExtension(extension);
      }
    }
    return filePath.lastSegment();
  }


  /**
   * Checks whether the use graphical editor selection is set.
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.