This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
*/
public static PhpProject getPhpProject(FileObject fo) {
assert fo != null;
if (!fastCheckIsPossibleProject(fo)) {
return null;
}
Project project = FileOwnerQuery.getOwner(fo);
if (project == null) {
return project.getLookup().lookup(PhpProject.class);
private static boolean fastCheckIsPossibleProject(FileObject fo) {
while (fo != null) {
FileObject projDir = fo.getFileObject("nbproject"); //NOI18N
if (projDir != null) {
return true;
fo = fo.getParent();
return false;
public static XMLReader createXmlReader() throws SAXException {
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setValidating(false);