}
private IRuntimeClasspathEntry[] filterWebInfLibs(
IRuntimeClasspathEntry[] defaults, ILaunchConfiguration configuration) {
IJavaModel javaModel = JavaCore.create(ResourcesPlugin.getWorkspace()
.getRoot());
String projectName = null;
String webAppDirName = null;
try {
projectName = configuration.getAttribute(
IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
webAppDirName = configuration.getAttribute(Plugin.ATTR_WEBAPPDIR, "");
} catch (CoreException e) {
Plugin.logError(e);
}
if (projectName == null || projectName.trim().equals("")
|| webAppDirName == null || webAppDirName.trim().equals("")) {
return defaults;
}
IJavaProject project = javaModel.getJavaProject(projectName);
if (project == null) {
return defaults;
}
// this should be fine since the plugin checks whether WEB-INF exists