Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgiormov2012-02-01 10:56:13 +0000
committerdgiormov2012-02-01 10:56:13 +0000
commit05f6570e40d3de76c4e0810928cc343a396a16af (patch)
tree91174a42012cdb5aaeefd7dd5c9a7239494ba3c0 /plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet
parent52c9c48f78c5663bd0b5341f680e35ff35c832bc (diff)
downloadwebtools.javaee-05f6570e40d3de76c4e0810928cc343a396a16af.tar.gz
webtools.javaee-05f6570e40d3de76c4e0810928cc343a396a16af.tar.xz
webtools.javaee-05f6570e40d3de76c4e0810928cc343a396a16af.zip
[330753] web.xml content gets deleted when adding servlets via the servlet wizards, Fix will take the web.xml location from the virtual model instead of computing the location from the file system.
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.java3
1 files changed, 2 insertions, 1 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 07d996150..47c924756 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
@@ -62,6 +62,7 @@ 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.componentcore.resources.IVirtualFile;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
@@ -203,7 +204,7 @@ public abstract class NewWebClassWizardPage extends NewJavaClassWizardPage {
IVirtualComponent component = ComponentCore.createComponent(project);
if(component.getRootFolder() != null
&& component.getRootFolder().getUnderlyingFolder() != null){
- IFile ddXmlFile = component.getRootFolder().getUnderlyingFolder().getFile(new Path(J2EEConstants.WEBAPP_DD_URI));
+ IVirtualFile ddXmlFile = component.getRootFolder().getFile(new Path(J2EEConstants.WEBAPP_DD_URI));
if (!ddXmlFile.exists())
{
// add a flag into the model to create the DD at the beginning of the operation

Back to the top