Fix P1 showstopper; cannot import Creator 2 project. Issue#102565, no VWP support.
Should also check Creator 2 properties for JSF loader.
1.1 --- a/visualweb.project.jsf/src/org/netbeans/modules/visualweb/project/jsf/api/JsfProjectUtils.java Thu Apr 26 01:17:41 2007 +0000
1.2 +++ b/visualweb.project.jsf/src/org/netbeans/modules/visualweb/project/jsf/api/JsfProjectUtils.java Thu Apr 26 02:56:31 2007 +0000
1.3 @@ -150,7 +150,7 @@
1.4 while (fo != null) {
1.5 if (fo.isFolder()) {
1.6 final FileObject projXml = fo.getFileObject("nbproject/project.xml"); // NOI18N
1.7 - // Found the project root directory
1.8 + // Found the project root directory and got the project.xml file
1.9 if (projXml != null) {
1.10 try {
1.11 Node value = (Node) ProjectManager.mutex().readAccess(
1.12 @@ -167,6 +167,32 @@
1.13 }
1.14 });
1.15
1.16 + if (value != null) {
1.17 + return true;
1.18 + }
1.19 + } catch (Exception e) {
1.20 + // Try the old Creator format later
1.21 + }
1.22 + }
1.23 +
1.24 + final FileObject propFile = fo.getFileObject(AntProjectHelper.PROJECT_PROPERTIES_PATH);
1.25 + // Found the project root directory and got the project.properties file
1.26 + if (propFile != null) {
1.27 + try {
1.28 + String value = (String) ProjectManager.mutex().readAccess(
1.29 + new Mutex.ExceptionAction() {
1.30 + public Object run() throws Exception {
1.31 + EditableProperties prop = new EditableProperties();
1.32 + InputStream is = propFile.getInputStream();
1.33 +
1.34 + prop.load(is);
1.35 + is.close();
1.36 +
1.37 + // Check Creator property
1.38 + return prop.getProperty("jsf.pagebean.package"); // NOI18N
1.39 + }
1.40 + });
1.41 +
1.42 return value != null;
1.43 } catch (Exception e) {
1.44 return false;