Examples of lastSegment()


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

    IPath path = new Path(pathStr);
    if (path.segment(0).equals("*")) {
      IOCase ioCase = ignoreCase ? IOCase.INSENSITIVE    : IOCase.SENSITIVE;
      filter = new NameFileFilter(path.lastSegment(), ioCase);
    } else {
      String lastSegment = path.lastSegment();
      if (lastSegment.startsWith("*")) {
        filter = new SuffixFileFilter(lastSegment.substring(1));
      } else {
        filter = null;
      }
View Full Code Here

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

            return module;
        }
        final String encoding = getEncodingForInput(editorInput);
        final IPath p = new Path(path);
        return ErlangEngine.getInstance().getModel()
                .getModuleFromFile(null, p.lastSegment(), path, encoding, path);

    }

    private static String getPathForInput(final IEditorInput editorInput) {
        if (editorInput instanceof IStorageEditorInput) {
View Full Code Here

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

                // for some reason, when running on Hudson, we get two identical
                // markers...
                final String path = (String) marker
                        .getAttribute(DialyzerMarkerUtils.PATH_ATTRIBUTE);
                final IPath p = new Path(path);
                assertEquals(externalFileName, p.lastSegment());
                assertEquals(lineNumber, marker.getAttribute(IMarker.LINE_NUMBER));
                assertEquals(message, marker.getAttribute(IMarker.MESSAGE));
            }
        } finally {
            DialyzerMarkerUtils.removeDialyzerMarkersFor(root);
View Full Code Here

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

            // then
            // only selected files (or corresponding beam) should be collected
            if (select == SEL.MODULE) {
                assertEquals(1, files.size());
                final IPath p = new Path(files.get(0));
                final String f = p.lastSegment();
                if (sources) {
                    assertEquals("a.erl", f);
                } else {
                    assertEquals("a.beam", f);
                }
View Full Code Here

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

                    includeDirs, false);
            // then
            // it should only take the existing beam files
            assertEquals(1, files.size());
            final IPath p = new Path(files.get(0));
            final String f = p.lastSegment();
            assertEquals("a.beam", f);

        } finally {
            if (erlProject != null) {
                deleteProject(erlProject);
View Full Code Here

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

        return false;
    }

    private String getName(final String file) {
        final IPath p = new Path(file);
        return p.lastSegment();
    }

    @Override
    public String getFilePath() {
        return null;
View Full Code Here

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

        }
    }

    private String getNameFromPath(final String path) {
        final IPath p = new Path(path);
        final String name = p.lastSegment();
        return name;
    }

    private static String getNameFromExternalPath(final String path0) {
        String path = path0;
View Full Code Here

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

        }
    }

    private final boolean includePath(final String path) {
        final IPath p = new Path(path);
        return p.lastSegment().equals("include");
    }

    private String getLibName(final String libDir) {
        final IPath p = new Path(libDir);
        String s = p.lastSegment();
View Full Code Here

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

        return p.lastSegment().equals("include");
    }

    private String getLibName(final String libDir) {
        final IPath p = new Path(libDir);
        String s = p.lastSegment();
        if ("ebin".equals(s)) {
            s = p.removeLastSegments(1).lastSegment();
        }
        final int dashPos = s.lastIndexOf('-');
        if (dashPos != -1) {
View Full Code Here

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

        return s;
    }

    private String getModuleName(final String spath) {
        final IPath p = new Path(spath);
        final String s = p.lastSegment();
        return s;
    }

}
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.