Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsholl2010-03-03 22:42:33 +0000
committerjsholl2010-03-03 22:42:33 +0000
commit9751be85be57ff0be7c46e9c60d93c802b05b172 (patch)
tree205b610a964703af1c1e4471003caae3e281f537 /plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse
parent0367171b5e9a66ba8f89fbe2a8602dfd18d31870 (diff)
downloadwebtools.javaee-9751be85be57ff0be7c46e9c60d93c802b05b172.tar.gz
webtools.javaee-9751be85be57ff0be7c46e9c60d93c802b05b172.tar.xz
webtools.javaee-9751be85be57ff0be7c46e9c60d93c802b05b172.zip
[304595] Enabling servlet wizard on web fragment projects
Diffstat (limited to 'plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse')
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/NewWebClassWizardPage.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/NewWebClassWizardPage.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/NewWebClassWizardPage.java
index 1a300c03f..89ae2e9ee 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/NewWebClassWizardPage.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/NewWebClassWizardPage.java
@@ -42,6 +42,7 @@ import org.eclipse.jst.j2ee.internal.wizard.AnnotationsStandaloneGroup;
import org.eclipse.jst.j2ee.internal.wizard.NewJavaClassWizardPage;
import org.eclipse.jst.j2ee.model.IModelProvider;
import org.eclipse.jst.j2ee.model.ModelProviderManager;
+import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
import org.eclipse.jst.j2ee.project.WebUtilities;
import org.eclipse.jst.j2ee.web.IServletConstants;
import org.eclipse.jst.j2ee.web.project.facet.WebFacetUtils;
@@ -193,6 +194,11 @@ public abstract class NewWebClassWizardPage extends NewJavaClassWizardPage {
@Override
protected void validateProjectRequirements(IProject project)
{
+ if(JavaEEProjectUtilities.isWebFragmentProject(project)){
+ // don't create a web DD, since web fragment project is created with one.
+ model.setBooleanProperty(GENERATE_DD, Boolean.FALSE);
+ return;
+ }
IVirtualComponent component = ComponentCore.createComponent(project);
if(component.getRootFolder() != null
&& component.getRootFolder().getUnderlyingFolder() != null){

Back to the top