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.
}
@SuppressWarnings("unchecked")
private int getTokenBalance(TokenSequence<? extends JsTokenId> ts, BaseDocument doc, int begin, int end, boolean includeKeywords, boolean indentOnly) {
private int getTokenBalance(TokenSequence<? extends JsTokenId> ts, BaseDocument doc, final int begin, int end, boolean includeKeywords, boolean indentOnly) {
int balance = 0;
if (ts == null) {
if (embeddedJavaScript && last < end) {
// We're not done yet... find the next section...
TokenSequence<? extends JsTokenId> ets = LexUtilities.getNextJsTokenSequence(doc, last+1, end);
if (ets != null) {
if (ets != null && ets.offset() > begin) {
return balance + getTokenBalance(ets, doc, ets.offset(), end, includeKeywords, indentOnly);