public static boolean pushTabOrEnterKey() { if (currentTabBlock != null) { if (parameterIdx == currentTabBlock.parameterBeginOffsetIdx.length - 1) { // 最后一个参数 final TabBlock popBlock = (TabBlock) tabBlockStack.pop(); if (popBlock != null) { currentTabBlock = popBlock; parameterIdx = currentTabBlock.lastParameterIdxBeforeStack; currentTabBlock.parameterEndOffsetIdx[parameterIdx] += inputShiftOffset; inputShiftOffset = 0; pushTabOrEnterKey(); return true; } calculateIdx(); // 重新更新currFocusHighlightEndIdx标位 clearHighlight(); // 跳到方法尾 currentTabBlock = null; scriptPanel.setCaretPosition(currFocusHighlightEndIdx + 1); // +1=) return true; } else { parameterIdx++; focusParameter(); return true; } } return false; }
public static StringBuilder getFree() { synchronized (free) { if (free.size() == 0) { return new StringBuilder(1024 * 1024); } else { return (StringBuilder) free.pop(); } } }