Example usage for org.eclipse.jdt.internal.core JavaProject getResolvedClasspath

List of usage examples for org.eclipse.jdt.internal.core JavaProject getResolvedClasspath

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.core JavaProject getResolvedClasspath.

Prototype

@Override
public IClasspathEntry[] getResolvedClasspath(boolean ignoreUnresolvedEntry) throws JavaModelException 

Source Link

Usage

From source file:com.google.gdt.eclipse.core.ClasspathUtilities.java

License:Open Source License

public static IClasspathEntry getNullableRawClasspathEntryForPackageFragmentRoot(IPackageFragmentRoot root)
        throws JavaModelException {

    IClasspathEntry rawEntry = null;//from  w  ww. j  a va 2  s .  com
    {
        JavaProject project = (JavaProject) root.getJavaProject();
        // force the reverse rawEntry cache to be populated
        project.getResolvedClasspath(true);
        @SuppressWarnings("rawtypes")
        Map rootPathToRawEntries = project.getPerProjectInfo().rootPathToRawEntries;
        if (rootPathToRawEntries != null) {
            rawEntry = (IClasspathEntry) rootPathToRawEntries.get(root.getPath());
        }
    }
    return rawEntry;
}