Package org.eclipse.core.runtime

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


    for (Iterator it=urls.iterator();it.hasNext();){
      IPath extPath = new Path(((UrlPatternType)it.next()).getValue());
      if (extPath != null){
        String ext = extPath.getFileExtension();
        if (ext == null){
          String lastSeg = extPath.lastSegment();
          if (lastSeg.equals("*")) //$NON-NLS-1$
          {
            return extPath.removeLastSegments(1).toString();
          }
         
View Full Code Here


            if (extPath != null)
            {
                String ext = extPath.getFileExtension();
                if (ext == null)
                {
                    String lastSeg = extPath.lastSegment();
                    if (lastSeg != null && lastSeg.equals("*")) //$NON-NLS-1$
                    {
                        return extPath.removeLastSegments(1).toString();
                    }

View Full Code Here

            // Add a selection of the jars from runtime/modules
            File modulesDirectory = runtimePath.append("modules").toFile();
            if (modulesDirectory != null && modulesDirectory.exists()) {
                for (File file : modulesDirectory.listFiles()) {
                    IPath path = new Path(file.getPath());
                    String name = path.lastSegment();
                    String extension = path.getFileExtension();
                   
                    // Only include API and launcher JARs
                    if (!"jar".equals(extension)) {
                        continue;
View Full Code Here

            File libDirectory = runtimePath.append("lib").toFile();
            if (libDirectory != null && libDirectory.exists()) {
                for (File file : libDirectory.listFiles()) {
                    IPath path = new Path(file.getPath());
                    String name = path.lastSegment();
                    String extension = path.getFileExtension();
                   
                    // Only include jaxb, jaxws and jsr API JARs
                    if (!"jar".equals(extension)) {
                        continue;
View Full Code Here

    Reader r = new InputStreamReader(source);
    int c;
    while ((c = r.read()) != -1)
      sb.append((char) c);
    r.close();
    return createCompilationUnit(fragment, typepath.lastSegment(),
        sb.toString());
  }

  public void addClassPathEntry(IClasspathEntry entry) throws CoreException {
    IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
View Full Code Here

    URL url = Platform.find(Platform.getBundle("com.mountainminds.eclemma.core"), new Path(testsrc).append(typepath));
    Reader r = new InputStreamReader(url.openStream());
    int c;
    while ((c = r.read()) != -1) sb.append((char) c);
    r.close();
    return createCompilationUnit(fragment, typepath.lastSegment(), sb.toString());
  }
 
  protected void addClassPathEntry(IClasspathEntry entry) throws CoreException{
    IClasspathEntry[] oldEntries= javaProject.getRawClasspath();
    IClasspathEntry[] newEntries= new IClasspathEntry[oldEntries.length + 1];
View Full Code Here

    Reader r = new InputStreamReader(source);
    int c;
    while ((c = r.read()) != -1)
      sb.append((char) c);
    r.close();
    return createCompilationUnit(fragment, typepath.lastSegment(), sb
        .toString());
  }

  public void addClassPathEntry(IClasspathEntry entry) throws CoreException {
    IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
View Full Code Here

    Reader r = new InputStreamReader(source);
    int c;
    while ((c = r.read()) != -1)
      sb.append((char) c);
    r.close();
    return createCompilationUnit(fragment, typepath.lastSegment(),
        sb.toString());
  }

  public void addClassPathEntry(IClasspathEntry entry) throws CoreException {
    IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
View Full Code Here

    URL url = Platform.find(Platform.getBundle("com.mountainminds.eclemma.core"), new Path(testsrc).append(typepath));
    Reader r = new InputStreamReader(url.openStream());
    int c;
    while ((c = r.read()) != -1) sb.append((char) c);
    r.close();
    return createCompilationUnit(fragment, typepath.lastSegment(), sb.toString());
  }
 
  protected void addClassPathEntry(IClasspathEntry entry) throws CoreException{
    IClasspathEntry[] oldEntries= javaProject.getRawClasspath();
    IClasspathEntry[] newEntries= new IClasspathEntry[oldEntries.length + 1];
View Full Code Here

            // Add the jars from runtime/modules
            File modulesDirectory = runtimePath.append("modules").toFile();
            if (modulesDirectory != null && modulesDirectory.exists()) {
                for (File file : modulesDirectory.listFiles()) {
                    IPath path = new Path(file.getPath());
                    String name = path.lastSegment();
                    String extension = path.getFileExtension();
                   
                    // Only include API and launcher JARs
                    if (!"jar".equals(extension)) {
                        continue;
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.