Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcanderson2010-03-04 05:40:18 +0000
committercanderson2010-03-04 05:40:18 +0000
commit3951e133f04d8e8a52e52ac029c1f3d942607d14 (patch)
tree048f2eccc0b8e6108c3ef5ef7853e189fd23b697 /plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet
parenta976b1117e3e8ef22df402cf9097f06cab8c330f (diff)
downloadwebtools.javaee-3951e133f04d8e8a52e52ac029c1f3d942607d14.tar.gz
webtools.javaee-3951e133f04d8e8a52e52ac029c1f3d942607d14.tar.xz
webtools.javaee-3951e133f04d8e8a52e52ac029c1f3d942607d14.zip
[241670] .war packaging of EJB components
Diffstat (limited to 'plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet')
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/NewWebClassWizardPage.java18
1 files changed, 16 insertions, 2 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 89ae2e9ee..07d996150 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
@@ -48,7 +48,6 @@ import org.eclipse.jst.j2ee.web.IServletConstants;
import org.eclipse.jst.j2ee.web.project.facet.WebFacetUtils;
import org.eclipse.jst.servlet.ui.internal.navigator.CompressedJavaProject;
import org.eclipse.jst.servlet.ui.internal.plugin.ServletUIPlugin;
-import org.eclipse.jst.servlet.ui.internal.plugin.WEBUIMessages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -61,6 +60,7 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
@@ -83,7 +83,8 @@ public abstract class NewWebClassWizardPage extends NewJavaClassWizardPage {
protected Composite createTopLevelComposite(Composite parent) {
Composite composite = super.createTopLevelComposite(parent);
- projectNameLabel.setText(WEBUIMessages.WEB_PROJECT_LBL);
+ //bug 303931
+ // projectNameLabel.setText(WEBUIMessages.WEB_PROJECT_LBL);
addSeperator(composite, 3);
createUseExistingGroup(composite);
@@ -433,4 +434,17 @@ public abstract class NewWebClassWizardPage extends NewJavaClassWizardPage {
existingButton.notifyListeners(SWT.Selection, new Event());
}
+ @Override
+ protected boolean isProjectValid(IProject project) {
+ boolean result;
+ try {
+ result = project.isAccessible() &&
+ project.hasNature(IModuleConstants.MODULE_NATURE_ID) &&
+ (JavaEEProjectUtilities.isDynamicWebProject(project) || JavaEEProjectUtilities.isWebFragmentProject(project));
+ } catch (CoreException ce) {
+ result = false;
+ }
+ return result;
+ }
+
}

Back to the top