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.
When we format a php file, we call very often org.netbeans.modules.editor.indent.api.IndentUtils.createIndentString () method. But this method for every call finds out two property settings of the document and this is too expensive. We need to have accessible method cachedOrCreatedIndentString() or similar, because we know values of the properties and they don't have to be obtained for every call.
Yes, I agree there should be (and already is) a method that you request, it's just not public. I've added a method with suitable name and appropriate parameters and javadoc. I've changed existing tests that used (to test the delegated method) to use the new API method.
Created attachment 103290 [details] Diff of the proposed change
http://hg.netbeans.org/jet-main/rev/8ceaeed8b2c2
Integrated into 'main-golden', will be available in build *201012050001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/8ceaeed8b2c2 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #192289 - IndentUtils.createIndentString is slow - added createIndentString(int indent, boolean expandTabs, int tabSize).