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.
I did a find on a mime type (I don't recall exactly, maybe text/java) and IndentEngine.find returned plain or simple, because they would accept that mime type. With the debugger I looked and there was a more appropriate IndentEngine in the enumeration. (Sorry, this happened days ago and I forgot to file it). As a workaround, I did lookup to get BaseOptions then getIndentEngine().
IMHO the concept of IndentEngine.find(mimetype) is wrong. Maybe I'm missing something but I do not see any way how to ensure that the most appropriate IE will be selected for the given mime-type so the method should be deprecated and removed. As a workaround please always use IE.find(doc). BTW both IE.indent* methods and IE.createWriter() take the document parameter anyway so you *need* to have the document (javadoc does not mention null to be an allowed value). Reassigning to openide/editor for further evaluation.
In case I do not have a document, what steps should be done to find the right IE?
Reassigning to new module owner mslama.
IndentEngine itself is now deprecated.