Examples of removeFileExtension()


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

    String medium = determineMediaKey(tmlFile);
    if (medium == null) {
      medium = "html";
    }
    IPath tmlFilePath = FileUtils.makeRelative(helper.getTmlRoot().getLocation().append(medium), tmlFile.getLocation());
    String tmlReference = tmlFilePath.removeFileExtension().toString().replaceAll("/", ":");
    URL url = new URL(root.toString() + "/" + dbkey + "/" + medium + "/" + tmlReference);
    return url;
  }
 
 
View Full Code Here

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

     
      IPath basePath = base.getFullPath();
      IPath path = tmlFile.getFullPath();     
      if(basePath.isPrefixOf(path)){
          path = path.removeFirstSegments(basePath.segmentCount());            
          path = path.removeFileExtension();
            return path.toString().replace('/', ':');
        }
      return null;
  }
 
View Full Code Here

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

    public VFile(IStorage file, IVResource parent, String virtualPath) {

        if (virtualPath != null && virtualPath.indexOf(IDavinciServerConstants.WORKING_COPY_EXTENSION) > 0) {
            this.workingCopy = file;
            IPath path = new Path(file.getPath());
            this.file =  file.newInstance(path.removeFileExtension().toString());
            this.virtualPath = virtualPath.replace(IDavinciServerConstants.WORKING_COPY_EXTENSION, "");
        } else {
            this.file = file;
            this.virtualPath = virtualPath;
            this.workingCopy = this.getWorkingCopy(file);
View Full Code Here

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

        final IFile file = getFile();
        if (file != null) {
            final IPath fullPath = file.getFullPath();
            final String scannerName = "scratchPad"
                    + fullPath.toPortableString().hashCode() + "_"
                    + fullPath.removeFileExtension().lastSegment();
            return scannerName;
        }
        return null;
    }
View Full Code Here

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

    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

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

  @Override
  protected InputStream getInitialContents() {

          IPath path = new Path(getFileName());
          String name = path.removeFileExtension().toString();
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    PrintWriter printWriter = new PrintWriter(outputStream);
    printWriter.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");   
    printWriter.println("<composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\"");
    printWriter.println("    xmlns:t=\"http://tuscany.apache.org/xmlns/sca/1.0\"");
View Full Code Here

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

    // 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.PARAM_MAIN_SCRIPT, path.removeFileExtension()
            .lastSegment());
    String portableString = path.removeLastSegments(1).toPortableString();
    ae.setConfigParameterValue(RutaEngine.PARAM_SCRIPT_PATHS, new String[] { portableString });
    ae.setConfigParameterValue(RutaEngine.PARAM_ADDITIONAL_SCRIPTS, new String[0]);
    ae.setConfigParameterValue(RutaEngine.PARAM_RELOAD_SCRIPT, true);
View Full Code Here

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

              .getContainerForLocation(removeLastSegments);
      IProject project = containerForLocation.getProject();
      IPath scriptRootPath = RutaProjectUtils.getScriptRootPath(project);
      String moduleName = RutaProjectUtils.getModuleName(path);
      IPath makeRelativeTo = path.makeRelativeTo(scriptRootPath);
      String m = makeRelativeTo.removeFileExtension().toPortableString().replaceAll("/", ".");
      String importString = "SCRIPT " + m + ";\n";
      if (!skip) {
        importString += "Document{-> CALL(" + moduleName + ")};\n";
      }
      return importString;
View Full Code Here

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

  @Override
  protected InputStream getInitialContents() {

          IPath path = new Path(getFileName());
          String name = path.removeFileExtension().toString();
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    PrintWriter printWriter = new PrintWriter(outputStream);
    printWriter.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");   
    printWriter.println("<composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\"");
    printWriter.println("    xmlns:t=\"http://tuscany.apache.org/xmlns/sca/1.0\"");
View Full Code Here

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

        @Override
        protected InputStream getInitialContents() {

                IPath path = new Path(getFileName());
                String name = path.removeFileExtension().toString();
                ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
                PrintWriter printWriter = new PrintWriter(outputStream);
                printWriter.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");             
                printWriter.println("<composite xmlns=\"http://www.osoa.org/xmlns/sca/1.0\"");
                printWriter.println("    xmlns:t=\"http://tuscany.apache.org/xmlns/sca/1.0\"");
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.