Package org.eclipse.core.runtime

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


    // ...but if there is no defined module ID, pick the best alternative

    IPath moduleLocation = new Path(j2eeModule.getURI(module));
    if (moduleLocation != null) {
      moduleId = moduleLocation.removeFileExtension().lastSegment();
    }

    if (j2eeModule instanceof IWebModule) {
      // A better choice is to use the context root
      // For wars most appservers use the module name
View Full Code Here


    });
    formatcombo.setInput(ExportFormat.values());
    formatcombo.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        IPath path = Path.fromOSString(destinationcombo.getText());
        path = path.removeFileExtension();
        final ExportFormat format = getExportFormat();
        if (!format.isFolderOutput()) {
          path = path.addFileExtension(format.getFileExtension());
        }
        destinationcombo.setText(path.toOSString());
View Full Code Here

      ae = TextRulerToolkit.loadAnalysisEngine(descriptorFile);

      // set filters to NO filtering so that we can add it manually with
      // the FILTERTYPE expression!
      IPath path = new Path(tempDir + "/results"+RutaEngine.SCRIPT_FILE_EXTENSION);
      ae.setConfigParameterValue(RutaEngine.MAIN_SCRIPT, path.removeFileExtension()
              .lastSegment());
      ae.setConfigParameterValue(RutaEngine.SCRIPT_PATHS, new String[] { path
              .removeLastSegments(1).toPortableString() });
      ae.setConfigParameterValue(RutaEngine.RELOAD_SCRIPT, true);
      try {
View Full Code Here

    // set filters to NO filtering so that we can add it manually with
    // the FILTERTYPE expression!
    String tempRulesFileName = getTempRulesFileName();
    IPath path = new Path(tempRulesFileName);
    ae.setConfigParameterValue(RutaEngine.MAIN_SCRIPT, path.removeFileExtension().lastSegment());
    String portableString = path.removeLastSegments(1).toPortableString();
    ae.setConfigParameterValue(RutaEngine.SCRIPT_PATHS, new String[] { portableString });
    ae.setConfigParameterValue(RutaEngine.ADDITIONAL_SCRIPTS, new String[0]);
    ae.setConfigParameterValue(RutaEngine.RELOAD_SCRIPT, true);
View Full Code Here

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

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

    IPath filePath = containerFullPath.append(fileName);
    if (extension != null && !extension.equals(filePath.getFileExtension())) {
      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) {
View Full Code Here

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

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

  {
    IPath p = Path.fromOSString(path);
    if (p.hasTrailingSeparator()){
      return StringUtils.EMPTY;
    }
    return p.removeFileExtension().segment(p.segmentCount() - 1);
  }

  /**
   * Removes the extension from the supplied file name.
   * <pre>
 
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.