/** * Returns all offset and the end offset of all positions overlapping with the * specified document range. * * @param offset the offset of the document region to be formatted * @param length the length of the document to be formatted * @return all character positions of the interleaving positions * @since 3.0 */ private int[] getAffectedPositions(int offset, int length) { fOverlappingPositionReferences= new ArrayList<>(); determinePositionsToUpdate(offset, length); Collections.sort(fOverlappingPositionReferences); int[] positions= new int[fOverlappingPositionReferences.size()]; for (int i= 0; i < positions.length; i++) { PositionReference r= fOverlappingPositionReferences.get(i); positions[i]= r.getCharacterPosition() - offset; } return positions; }
/** * Returns all offset and the end offset of all positions overlapping with the * specified document range. * * @param offset the offset of the document region to be formatted * @param length the length of the document to be formatted * @return all character positions of the interleaving positions * @since 3.0 */ private int[] getAffectedPositions(int offset, int length) { fOverlappingPositionReferences= new ArrayList<>(); determinePositionsToUpdate(offset, length); Collections.sort(fOverlappingPositionReferences); int[] positions= new int[fOverlappingPositionReferences.size()]; for (int i= 0; i < positions.length; i++) { PositionReference r= fOverlappingPositionReferences.get(i); positions[i]= r.getCharacterPosition() - offset; } return positions; }