Package org.eclipse.core.runtime

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


        ext = ext.substring(1);
      path = project.getFullPath();
      for (int i=matchingSegments+1; i<segments.length; ++i) {
        path = path.append(segments[i]);
      }
      path = path.removeFileExtension().addFileExtension(ext);
    }
    else {
      // this is a model file - normalize path
      path = fullPath.makeAbsolute();
    }
View Full Code Here


        IPath originalPath = project.getFullPath();
        for (int index = matchingSegments + 1; index < segments.length; ++index) {
          originalPath = originalPath.append(segments[index]);
        }

        resultPath = originalPath.removeFileExtension().addFileExtension(originalExtension);
      }
      else {
        resultPath = inputPath.makeAbsolute();
      }
View Full Code Here

                                                    , final String templateContent
                                                    , final boolean openEditor) {
    IFile finalDataFile = dataFile;

    final IPath diagramPath = diagramFile.getFullPath();
    final String diagramName = diagramPath.removeFileExtension().lastSegment();
    final URI uri = URI.createPlatformResourceURI(diagramPath.toString(), true);

    if (templateContent != null) {
      // there is a template to use
      final InputStream is
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

    if (selection != null && (! selection.isEmpty()) && selection instanceof IStructuredSelection) {
      IPath path = getElementPath(((IStructuredSelection) selection).getFirstElement());
      if (path != null) {
        String ext = path.getFileExtension();
        if (ext != null) {
          path = path.removeFileExtension();
          fileText = path.lastSegment();
          path = path.removeLastSegments(1);
        }
        containerText.setText(path.toString());
      }
View Full Code Here

    MarkdownEditor editor = (MarkdownEditor) ed;
    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

   * @return
   */
  private String suitename(File f) {
    IPath p = new Path(f.getAbsolutePath());
    IPath relative = p.makeRelativeTo(rootPath);
    relative = relative.removeFileExtension();
    return relative.toString();
  }

  /**
   * Produces a Stats instance populated with the data from the given testcase.
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.