Package org.eclipse.jdt.core

Examples of org.eclipse.jdt.core.IClasspathEntry


        {
            IJavaProject p = sp.getJavaModel();

            for (String enc : bundle.getClasspathEntrys())
            {
                IClasspathEntry e = p.decodeClasspathEntry(enc);
                if (e != null)
                {
                    cp.add(e);
                }
            }
View Full Code Here


                    for (String cp : classpath)
                    {
                        IPath p = ".".equals(cp) ? path : cache.append(cp);
                        if (p.toFile().exists())
                        {
                            IClasspathEntry e = JavaCore.newLibraryEntry(p, source,
                                rootPath, rules, attributes, exported);
                            entries.add(e);
                        }
                    }
                }
                else
                { // default classpath is .
                    IClasspathEntry e = JavaCore.newLibraryEntry(path, source, rootPath,
                        rules, attributes, exported);
                    entries.add(e);
                }
                return entries;
            }
View Full Code Here

            boolean skip = false;
            switch (e.getElementType())
            {
                case IJavaElement.PACKAGE_FRAGMENT_ROOT:
                    IPackageFragmentRoot rt = (IPackageFragmentRoot) e;
                    IClasspathEntry ce = rt.getRawClasspathEntry();
                    IPath path = ce.getPath();
                    skip = "org.eclipse.jdt.launching.JRE_CONTAINER".equals(path.toString());
                    break;
                case IJavaElement.CLASS_FILE:
                    IClassFile cf = (IClassFile) e;
                    if (cf.getElementName().startsWith(pckg))
View Full Code Here

            }
        }

        if (element instanceof IClasspathEntry)
        {
            IClasspathEntry cp = (IClasspathEntry) element;
            return cp.getPath().toString();
        }

        if (element instanceof IBundleRepository)
        {
            IBundleRepository rep = (IBundleRepository) element;
View Full Code Here

            throw SigilCore.newCoreException("Expected bundle symbolic name to be set",
                null);
        }
       
        ISigilProjectModel sigil = SigilCore.create(project);
        IClasspathEntry cp = JavaCore.newSourceEntry(src);
        String encodedClasspath = sigil.getJavaModel().encodeClasspathEntry(cp);

        ISigilBundle bundle = sigil.getBundle();
        bundle.addClasspathEntry(encodedClasspath);
View Full Code Here

            final Set<String> filteredLocations = new HashSet<String>();

            final IJavaProject jp = javaProject;
            final IClasspathEntry[] rawCp = jp.getRawClasspath();
            for (int i = 0; i < rawCp.length; i++) {
        IClasspathEntry aCp = rawCp[i];
        IPath outputLocation = aCp.getOutputLocation();
        if (outputLocation!=null) {
                    outputLocation = outputLocation.makeRelativeTo(getProject().getFullPath());
          filteredLocations.add(outputLocation.toString());
        }
      }
View Full Code Here

        }
        else
        {
            for (String scp : project.getBundle().getClasspathEntrys())
            {
                IClasspathEntry jcp = project.getJavaModel().decodeClasspathEntry(scp);
                convert(jcp, project, files);
            }
        }
    }
View Full Code Here

            return true;
        }

        for (String path : getBundle().getClasspathEntrys())
        {
            IClasspathEntry cp = getJavaModel().decodeClasspathEntry(path);
            for (IPackageFragmentRoot root : getJavaModel().findPackageFragmentRoots(cp))
            {
                if (findPackage(packageName, root))
                {
                    return true;
View Full Code Here

    public boolean isInClasspath(ISigilBundle bundle)
    {
        for (String path : getBundle().getClasspathEntrys())
        {
            IClasspathEntry cp = getJavaModel().decodeClasspathEntry(path);
            switch (cp.getEntryKind())
            {
                case IClasspathEntry.CPE_PROJECT:
                    ISigilProjectModel p = bundle.getAncestor(ISigilProjectModel.class);
                    return p != null && cp.getPath().equals(p.getProject().getFullPath());
                case IClasspathEntry.CPE_LIBRARY:
                    return cp.getPath().equals(bundle.getLocation());
            }
        }

        return false;
    }
View Full Code Here

        IJavaProject javaProject = JavaCore.create( project );
        List<IProject> projects = new ArrayList<IProject>();
        try {
            IClasspathEntry[] entries = javaProject.getResolvedClasspath( true );
            for ( int i = 0, l = entries.length; i < l; i++ ) {
                IClasspathEntry entry = entries[i];
                if ( entry.getEntryKind() == IClasspathEntry.CPE_PROJECT ) {
                    IProject p = project.getWorkspace().getRoot().getProject( entry.getPath().lastSegment() ); // missing projects are considered too
                    if ( p != null && !projects.contains( p ) ) {
                        projects.add( p );
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.IClasspathEntry

Copyright © 2018 www.massapicom. 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.