Index: XMLMIMEComponent.java =================================================================== RCS file: /cvs/core/src/org/netbeans/core/filesystems/XMLMIMEComponent.java,v retrieving revision 1.14 retrieving revision 1.12.6.2 diff -u -b -r1.14 -r1.12.6.2 --- XMLMIMEComponent.java 4 Feb 2002 08:42:49 -0000 1.14 +++ XMLMIMEComponent.java 7 Jan 2002 11:45:07 -0000 1.12.6.2 @@ -250,10 +250,14 @@ try { parser.setProperty("http://xml.org/sax/properties/lexical-handler", this); //NOI18N } catch (SAXException sex) { - ErrorManager.getDefault().log(NbBundle.getMessage(XMLMIMEComponent.class, "W-003")); //NOI18N + ErrorManager emgr = (ErrorManager) Lookup.getDefault().lookup(ErrorManager.class); + if (emgr != null) { + emgr.log(NbBundle.getMessage(XMLMIMEComponent.class, "W-003")); //NOI18N + } } } catch (SAXException ex) { - ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex); + ErrorManager emgr = (ErrorManager) Lookup.getDefault().lookup(ErrorManager.class); + emgr.notify(emgr.INFORMATIONAL, ex); } return parser; } @@ -299,7 +303,10 @@ public void error(SAXParseException exception) throws SAXException { // we are not validating should not occure - ErrorManager.getDefault().notify(ErrorManager.WARNING, exception); + ErrorManager emgr = (ErrorManager) Lookup.getDefault().lookup(ErrorManager.class); + if (emgr != null) { + emgr.notify(emgr.WARNING, exception); + } this.state = ERROR; throw STOP; } @@ -309,11 +316,13 @@ // it may be caused by wrong user XML documents, notify only in debug mode if (Boolean.getBoolean("netbeans.debug.exceptions")) { - ErrorManager emgr = ErrorManager.getDefault(); + ErrorManager emgr = (ErrorManager) Lookup.getDefault().lookup(ErrorManager.class); + if (emgr != null) { String msg = NbBundle.getMessage(XMLMIMEComponent.class, "W-001", fo, new Integer(exception.getLineNumber())); //NOI18N msg += "\n" + NbBundle.getMessage(XMLMIMEComponent.class, "W-002"); //NOI18N emgr.annotate(exception, msg); emgr.notify(emgr.INFORMATIONAL, exception); + } } this.state = ERROR;