public static List<IEclipseFramework> getFrameworks(IJavaProject javaProject) throws JavaModelException {
FrameworkModel<IEclipseFramework> frameworkModel = JdtPlugin.getDefault().getFrameworkModel(javaProject.getProject());
List<IEclipseFramework> frameworks = new LinkedList<IEclipseFramework>();
IClasspathEntry[] classpathEntries = javaProject.getRawClasspath();
for (IClasspathEntry classpathEntry : classpathEntries) {
WOFrameworkClasspathContainer frameworkContainer = WOFrameworkClasspathContainer.getFrameworkClasspathContainer(javaProject, classpathEntry);
if (frameworkContainer != null) {
IEclipseFramework framework = frameworkContainer.getFramework();
frameworks.add(framework);
}
else if (classpathEntry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
IClasspathEntry resolvedClasspathEntry = JavaCore.getResolvedClasspathEntry(classpathEntry);
File classpathFile = resolvedClasspathEntry.getPath().toFile();