File jarFile = libLocation.getSystemLibraryPath().toFile();
jarFiles.add(jarFile);
}
Version wgaVersion = (Version) WGADesignConfigurationModel.VERSIONCOMPLIANCE_TO_WGA_VERSION.get(_versionCompliance.getKey());
if (includeSource) {
if (wgaVersion != null) {
try {
File sourceJar = Plugin.getDefault().getResourceAsFile("resources/wga/source_" + wgaVersion.getMajorVersion() + "_" + wgaVersion.getMinorVersion() + ".jar");
if (sourceJar != null) {
jarFiles.add(sourceJar);
}
}
catch (IOException e) {
Plugin.getDefault().logWarning("Unable to retrieve wga source.jar as file.", e);
}
}
}
// retrieve J2EE libs
Bundle bundle = Platform.getBundle("de.innovationgate.eclipse.plugins.Core");
if (bundle != null && wgaVersion != null) {
IPath path = new Path("resources").append("librarySets");
if (wgaVersion.isAtLeast(5, 0)) {
path = path.append("j2ee14");
} else {
path = path.append("j2ee13");
}
URL librarySetURL = FileLocator.find(bundle, path, null);