private void addSeperatorIncludingRegion_Backwards( ArrayList<StructureSkipSuggestion> prevRegions, StructureSkipSuggestion previousRegion) { int indexStart = previousRegion.getIndexHistoryStart(); if (indexStart > 0 && isSeparatorEndingLine(indexStart - 1)) { char[] toParse = structTokens.removeSeparatorAtTheEnd(readLine(indexStart - 1)); IndentInfo startSkip2 = IndentInfo.cloneIndentInfo(getHistory().getLine(indexStart - 1)); IndentInfo endSkip2 = IndentInfo.cloneIndentInfo(previousRegion.getEndSkip()); StructureSkipSuggestion previousRegion2 = new StructureSkipSuggestion(); previousRegion2.setSkipLocations( startSkip2, endSkip2, indexStart - 1, previousRegion.getIndexHistoryEnd()); previousRegion2.setAdditionalTokens(toParse); prevRegions.add(previousRegion2); } }
private boolean isSeparatorEndingLine(int index) { String lineContent = readLine(index); return structTokens.isSeparatorEndingLine(lineContent); }
private boolean isScopeClosingLine(int index) { String lineContent = readLine(index); return structTokens.isScopeClosingLine(lineContent); }
private int separatorIndent(int indexLine) { int indentValue = getHistory().getLine(indexLine).getIndentValue(); String lineContent = readLine(indexLine); return indentValue + structTokens.separatorIndent(lineContent); }