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.

Bug 97622 - IndentEngine.find(mimetype) doesn't always find best fit
Summary: IndentEngine.find(mimetype) doesn't always find best fit
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: mslama
URL:
Keywords:
Depends on:
Blocks: 88962
  Show dependency tree
 
Reported: 2007-03-11 06:25 UTC by err
Modified: 2009-10-20 17:16 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description err 2007-03-11 06:25:04 UTC
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().
Comment 1 Miloslav Metelka 2007-03-27 12:57:49 UTC
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.
Comment 2 Jaroslav Tulach 2007-06-29 20:42:14 UTC
In case I do not have a document, what steps should be done to find the right IE?
Comment 3 Antonin Nebuzelsky 2008-04-17 15:14:32 UTC
Reassigning to new module owner mslama.
Comment 4 Jesse Glick 2009-10-20 17:16:19 UTC
IndentEngine itself is now deprecated.