Examples of addFileExtension()


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

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

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

    if (fileName == null || fileName.trim().length() == 0) {
      fileName = "default"; //$NON-NLS-1$
    }
    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)) {
View Full Code Here

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

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

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

    if (fileName == null || fileName.trim().length() == 0) {
      fileName = "default"; //$NON-NLS-1$
    }
    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)) {
View Full Code Here

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

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

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

    if (fileName == null || fileName.trim().length() == 0) {
      fileName = "default"; //$NON-NLS-1$
    }
    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)) {
View Full Code Here

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

    IVResource userFile = user.getResource(path.toString());

    if ( userFile != null && !userFile.exists() ) {
      if ( path.getFileExtension() == null ) {
        userFile = user.getResource(path.addFileExtension("html").toString());
      }
      if ( !userFile.exists() ) {
        theLogger.warning("user file not found: " + path);
        resp.sendError(HttpServletResponse.SC_NOT_FOUND);
        return;
View Full Code Here

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

        }
        final IContainer container = (IContainer) resource;
        IPath path = new Path(fileName);
        final String ext = path.getFileExtension();
        if (!"erlScratchPad".equals(ext)) {
            path = path.addFileExtension("erlScratchPad");
        }
        final IFile file = container.getFile(path);
        try {
            final InputStream stream = openContentStream();
            if (file.exists()) {
View Full Code Here

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

            throwCoreException("Container \"" + containerName + "\" does not exist.");
        }
        final IContainer container = (IContainer) resource;
        IPath path = new Path(fileName);
        if (!CommonUtils.isErlangFileContentFileName(fileName)) {
            path = path.addFileExtension("erl");
        }
        final IFile file = container.getFile(path);
        try {
            final InputStream stream = openContentStream(skeleton);
            if (file.exists()) {
View Full Code Here

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

    return ResourcesPlugin.getWorkspace().getRoot().getFile(path);
  }

  private static IPath getFilePath(String baseName) {
    IPath path = new Path(baseName.replace('.', '/'));
    path = path.addFileExtension("properties");//$NON-NLS-1$
    return path;
  }

  private static IStorage getJarFile(IJavaProject javaProject, String baseName)
      throws JavaModelException {
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.