Package org.eclipse.core.runtime

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


  }

  @Override
  public IPath getPath(Object element) {
    IPath path = super.getPath(element);
    return path.addFileExtension(Util.defaultPhpExtension());
  }

  @Override
  public String getName() {
    String result = super.getName();
View Full Code Here


    // If the user does not supply a file extension and if the save
    // as dialog was provided a default file name append the extension
    // of the default filename to the new name
    if (path.getFileExtension() == null) {
      if (originalFile != null && originalFile.getFileExtension() != null) {
        path = path.addFileExtension(originalFile.getFileExtension());
      } else if (originalName != null) {
        int pos = originalName.lastIndexOf('.');
        if (++pos > 0 && pos < originalName.length()) {
          path = path.addFileExtension(originalName.substring(pos));
        }
View Full Code Here

      if (originalFile != null && originalFile.getFileExtension() != null) {
        path = path.addFileExtension(originalFile.getFileExtension());
      } else if (originalName != null) {
        int pos = originalName.lastIndexOf('.');
        if (++pos > 0 && pos < originalName.length()) {
          path = path.addFileExtension(originalName.substring(pos));
        }
      }
    }

    // If the path already exists then confirm overwrite.
View Full Code Here

      // the output extension.

      // if (!ignorePrimary) {
      String outPrefix = tool.getOutputPrefix();
      IPath outPath = Path.fromOSString(relativePath + outPrefix + WILDCARD);
      outPath = outPath.addFileExtension(outExt);
      ruleOutputs.add(0, outPath);
      enumeratedPrimaryOutputs.add(0, resolvePercent(outPath, sourceLocation));
      // }
  }
    }
View Full Code Here

      // In the AJDT implementation, the name provided here will be ignored, we write the results
      // out in xxxImageBuilder.acceptResult() instead.
      // simply return the default output directory for the project.
      String filename = new String(eclipseClassFileName);
      IPath out = outputLocation.append(filename);
      out.addFileExtension(".class");
      return out.toOSString();
    }
   
  }
View Full Code Here

      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());
      }
    });
    GridData gd = new GridData(GridData.FILL_HORIZONTAL);
View Full Code Here

    IEditorInput i = editor.getEditorInput();
    if (i instanceof IPathEditorInput) {
      IPathEditorInput input = (IPathEditorInput) i;
      IPath path = input.getPath();
      path = path.removeFileExtension();
      path = path.addFileExtension("html");
      File file = path.toFile();
      String html = editor.getMarkdownPage().html();
      FileUtils.write(file, html);
    }
  }
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.