Use correct API to access web.xml. before_bigide_changes
authorsandipchitale@netbeans.org
Mon, 16 Apr 2007 19:54:09 +0000
changeset 5948eb2d3966ce8
parent 593 78b116906a58
child 595 1f91717c2bcd
Use correct API to access web.xml.
visualweb.insync/src/org/netbeans/modules/visualweb/insync/faces/refactoring/SetProjectStartPageRefactoringElement.java
     1.1 --- a/visualweb.insync/src/org/netbeans/modules/visualweb/insync/faces/refactoring/SetProjectStartPageRefactoringElement.java	Mon Apr 16 18:19:08 2007 +0000
     1.2 +++ b/visualweb.insync/src/org/netbeans/modules/visualweb/insync/faces/refactoring/SetProjectStartPageRefactoringElement.java	Mon Apr 16 19:54:09 2007 +0000
     1.3 @@ -53,14 +53,9 @@
     1.4      public FileObject getParentFile() {
     1.5          WebModule webModule = WebModule.getWebModule(project.getProjectDirectory());
     1.6          if (webModule != null){
     1.7 -            FileObject webInfDir = webModule.getWebInf();
     1.8 -            if (webInfDir != null) {
     1.9 -                // Should really use the following API - ProjectWebModule not in public package
    1.10 -                // FileObject webXml = webInfDir.getFileObject(ProjectWebModule.FILE_DD);
    1.11 -                FileObject webXml = webInfDir.getFileObject("web.xml"); // NOI18N
    1.12 -                if (webXml != null) {
    1.13 -                    return webXml;
    1.14 -                }
    1.15 +            FileObject webXml = webModule.getDeploymentDescriptor ();
    1.16 +            if (webXml != null) {
    1.17 +                return webXml;
    1.18              }
    1.19          }
    1.20          return project.getProjectDirectory();