Package org.eclipse.core.runtime

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


        }

        private String copyPltFile(final String pltPath,
                final String alternatePltFileDirectory) throws IOException {
            IPath path = new Path(pltPath);
            final String name = path.lastSegment();
            path = new Path(alternatePltFileDirectory).append(name);
            Files.copy(new File(pltPath), new File(path.toOSString()));
            return path.toPortableString();
        }
View Full Code Here


    final Path path = new Path(filePath);
    final String ext = path.getFileExtension();
    boolean _equal = Objects.equal(ext, "erl");
    if (_equal) {
      IPath _removeFileExtension = path.removeFileExtension();
      final String module = _removeFileExtension.lastSegment();
      BuilderHelper.loadModule(project, module);
    }
  }
}
View Full Code Here

      filePath = containerFullPath.append(fileName + i);
      if (extension != null) {
        filePath = filePath.addFileExtension(extension);
      }
    }
    return filePath.lastSegment();
  }

  /**
   * Allows user to select file and loads it as a model.
   *
 
View Full Code Here

    }
    IPath path = getFilePath();
    if (path == null || path.isEmpty() || path.hasTrailingSeparator()) {
      return null;
    }
    return path.lastSegment();
  }

  /**
   * @generated
   */
 
View Full Code Here

                error = "Location must be specified.";
            else if (!Path.EMPTY.isValidPath(externalLocation))
                error = "Invalid location.";
            else {
                IPath path = new Path(externalLocation);
                if (!Project.BNDCNF.equals(path.lastSegment())) {
                    error = "Last path segment must be '" + Project.BNDCNF + "'";
                } else {
                    File dir = new File(externalLocation);
                    if (dir.exists() && !dir.isDirectory())
                        error = "Location already exists and is not a directory.";
View Full Code Here

    Object[] keys = this.indexStates.keyTable;
    Object[] states = this.indexStates.valueTable;
    for (int i = 0, l = states.length; i < l; i++) {
      IPath key = (IPath) keys[i];
      if (key != null && !key.isEmpty() && states[i] == SAVED_STATE) {
        writer.write(key.lastSegment());
        writer.write('\n');
      }
    }
  } catch (IOException ignored) {
    if (VERBOSE)
View Full Code Here

            }
            // extra cleanup for some directories on classpath
            String bundleLocation = bd.getLocation();
            if(bundleLocation != null && !"jar".equals(location.getFileExtension()) &&
                    new File(bundleLocation).isDirectory()){
                if(bd.getSymbolicName().equals(location.lastSegment())) {
                    // ignore badly resolved plugin directories inside workspace
                    // ("." as classpath is resolved as plugin root directory)
                    // which is, if under workspace, NOT a part of the classpath
                    continue;
                }
View Full Code Here

    saveMonitor.beginTask("Saving image for " + cls.getName(), 2);
   
    // issue 193: first save as png
    {
      IPath destination = generateImageDestination(cls, ".png");
      monitor.subTask("Saving PNG image " + destination.lastSegment());
      CopyToImageUtil img = getCopyToImageUtil();
      img.copyToImage(part, destination, ImageFileFormat.PNG, new SubProgressMonitor(monitor, 1));
      saveMonitor.worked(1);
    }
View Full Code Here

    }

    // issue 193: then save as svg
    {
      IPath destination = generateImageDestination(cls, ".svg");
      monitor.subTask("Saving SVG image " + destination.lastSegment());
      CopyToImageUtil img = getCopyToImageUtil();
      img.copyToImage(part, destination, ImageFileFormat.SVG, new SubProgressMonitor(monitor, 1));
      saveMonitor.worked(1);
    }
View Full Code Here

    if (part.getChildren().size() > 0) {
      IProgressMonitor saveMonitor = new SubProgressMonitor(monitor, 1);
      saveMonitor.beginTask("Saving container " + part.resolveSemanticElement(), 1 + formats.size());
      for (ImageFileFormat format : formats) {
        IPath destination = generateImageDestination(container, format);
        monitor.subTask("Saving image " + destination.lastSegment() + " ( " + format.getName() + ")");
        CopyToImageUtil img = getCopyToImageUtil();
        img.copyToImage(part, destination, format, new SubProgressMonitor(monitor, 1));
        imagesSaved++;
      }
      saveMonitor.done();
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.