Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IPath.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


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

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

                    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

        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

        }
    }

    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

        }
    }

    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

        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

        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

        }
        if (filePath != null) {
            final IPath path = new Path(filePath);
            IFileStore fileStore = EFS.getLocalFileSystem().getStore(
                    path.removeLastSegments(1));
            fileStore = fileStore.getChild(path.lastSegment());
            final IFileInfo fetchInfo = fileStore.fetchInfo();
            if (!fetchInfo.isDirectory() && fetchInfo.exists()) {
                if (element instanceof IErlModule
                        && element.getParent() instanceof IErlExternal) {
                    return new ErlangExternalEditorInput(fileStore, (IErlModule) element);
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.