Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrstryker2011-08-22 05:28:23 +0000
committerrstryker2011-08-22 05:28:23 +0000
commit658dc945f8c018575f3e7f67685dd0fd1a44266d (patch)
tree1f830e3e1bb7e6a1a6d44c6a8a5af3a91f553433 /plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui
parent447a1571e2b5361d045f9a109107debc9e8ceaa5 (diff)
downloadwebtools.javaee-658dc945f8c018575f3e7f67685dd0fd1a44266d.tar.gz
webtools.javaee-658dc945f8c018575f3e7f67685dd0fd1a44266d.tar.xz
webtools.javaee-658dc945f8c018575f3e7f67685dd0fd1a44266d.zip
332476 - add project reference for static web project broken
Diffstat (limited to 'plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui')
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebDependencyPropertyPage.java15
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebModuleDependencyPageProvider.java1
2 files changed, 15 insertions, 1 deletions
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebDependencyPropertyPage.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebDependencyPropertyPage.java
index c53e02f11..60143a623 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebDependencyPropertyPage.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebDependencyPropertyPage.java
@@ -14,14 +14,18 @@ package org.eclipse.jst.servlet.ui.internal;
import java.util.List;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.jst.j2ee.internal.J2EEConstants;
import org.eclipse.jst.j2ee.internal.ui.J2EEModuleDependenciesPropertyPage;
import org.eclipse.jst.j2ee.internal.ui.preferences.Messages;
import org.eclipse.wst.common.componentcore.internal.impl.TaskModel;
+import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
import org.eclipse.wst.common.componentcore.ui.internal.propertypage.DependencyPageExtensionManager;
import org.eclipse.wst.common.componentcore.ui.internal.propertypage.DependencyPageExtensionManager.ReferenceExtension;
import org.eclipse.wst.common.componentcore.ui.propertypage.IReferenceWizardConstants;
import org.eclipse.wst.common.componentcore.ui.propertypage.ModuleAssemblyRootPage;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
public class WebDependencyPropertyPage extends J2EEModuleDependenciesPropertyPage {
@@ -30,7 +34,16 @@ public class WebDependencyPropertyPage extends J2EEModuleDependenciesPropertyPag
super(project, page);
}
-
+ @Override
+ protected boolean shouldSaveClasspathEntires() {
+ try {
+ IFacetedProject facetedProject = ProjectFacetsManager.create(project);
+ if( facetedProject != null && facetedProject.hasProjectFacet(ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_WEB_MODULE)))
+ return true;
+ } catch(CoreException ce) {}
+ return false;
+ }
+
@Override
protected void createPushButtons() {
super.createPushButtons();
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebModuleDependencyPageProvider.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebModuleDependencyPageProvider.java
index 05e08da90..645fa5bfc 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebModuleDependencyPageProvider.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/WebModuleDependencyPageProvider.java
@@ -35,6 +35,7 @@ public class WebModuleDependencyPageProvider implements IDependencyPageProvider
public boolean canHandle(IFacetedProject project) {
boolean isWeb = project.hasProjectFacet(ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_WEB_MODULE));
+ isWeb |= project.hasProjectFacet(ProjectFacetsManager.getProjectFacet(IModuleConstants.WST_WEB_MODULE));
return isWeb;
}

Back to the top