Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgkessler2007-09-25 17:50:12 +0000
committergkessler2007-09-25 17:50:12 +0000
commit64d1bc744fdc04491b0bc9b698b9786211073a82 (patch)
tree8a7828645e967776f1324979e73b292514a7fb3e
parent12a586960268f35ca57b98f21f736f7b15dabe9c (diff)
downloadwebtools.jsf-64d1bc744fdc04491b0bc9b698b9786211073a82.tar.gz
webtools.jsf-64d1bc744fdc04491b0bc9b698b9786211073a82.tar.xz
webtools.jsf-64d1bc744fdc04491b0bc9b698b9786211073a82.zip
[204111] Uninstalling JSF facet corrupts the Java Build Path
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetUninstallDelegate.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetUninstallDelegate.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetUninstallDelegate.java
index 7d549aa2e..ae17f08a3 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetUninstallDelegate.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/internal/project/facet/JSFFacetUninstallDelegate.java
@@ -57,8 +57,11 @@ public final class JSFFacetUninstallDelegate implements IDelegate {
try {
// Remove JSF Libraries
- removeJSFLibaries(project, fv, monitor);
-
+ removeJSFLibraries(project, fv, monitor);
+
+ //Remove Runtime contributed JSF classpath entries
+ removeRuntimeContributedJSFClasspathEntries(project, fv, monitor);
+
// remove servlet stuff from web.xml
uninstallJSFReferencesFromWebApp(project, monitor);
@@ -78,7 +81,7 @@ public final class JSFFacetUninstallDelegate implements IDelegate {
* @param project
* @param monitor
*/
- private void removeJSFLibaries(final IProject project, final IProjectFacetVersion fv, final IProgressMonitor monitor) {
+ private void removeJSFLibraries(final IProject project, final IProjectFacetVersion fv, final IProgressMonitor monitor) {
final IJavaProject jproj = JavaCore.create(project);
List keptEntries = new ArrayList();
try {
@@ -86,9 +89,7 @@ public final class JSFFacetUninstallDelegate implements IDelegate {
keptEntries = new ArrayList();
for (int i=0;i<entries.length;i++){
IClasspathEntry entry = entries[i];
- if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER &&
- ! entry.getPath().segment(0)
- .equals(JSFLibraryConfigurationHelper.JSF_LIBRARY_CP_CONTAINER_ID))
+ if ( !(JSFLibraryConfigurationHelper.isJSFLibraryContainer(entry)))
keptEntries.add(entry);
}
} catch (JavaModelException e) {
@@ -103,6 +104,10 @@ public final class JSFFacetUninstallDelegate implements IDelegate {
}
}
+
+ }
+
+ private void removeRuntimeContributedJSFClasspathEntries(final IProject project, final IProjectFacetVersion fv, final IProgressMonitor monitor) {
try {
ClasspathHelper.removeClasspathEntries(project, fv);
} catch (CoreException e) {

Back to the top