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.
String mimeType = (String) doc.getProperty ("mimeType");
DataObject dobj = NbEditorUtilities.getDataObject(doc);
try {
if (dobj instanceof LanguagesDataObject) {
LanguagesManager.getDefault().getLanguage(mimeType);
--
} catch (LanguageDefinitionNotFoundException e) {
//not supported language