Package org.eclipse.core.runtime

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


      configuration = launch.getLaunchConfiguration();
      StateFiles statefiles = EclEmmaCorePlugin.getInstance().getStateFiles();
      IPath base = statefiles.getLaunchDataFolder().append(id);
      coveragefile = base.addFileExtension("ec"); //$NON-NLS-1$
      statefiles.registerForCleanup(coveragefile);
      propertiesjarfile = base.addFileExtension("jar"); //$NON-NLS-1$
      statefiles.registerForCleanup(propertiesjarfile);
      instrumentations = new ArrayList();
      instrumentationpaths = new HashMap();
      instances.put(launch, this);
  }
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

        //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

    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

    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

    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

    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

    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 (filePath.toFile().exists()) {
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.