int endPos= range.getExclusiveEnd(); int firstLine= buffer.getLineOfOffset(range.getOffset()); int lastLine= buffer.getLineOfOffset(endPos - 1);  int nLines= lastLine - firstLine; if (nLines <= 0) { return null; } SimpleTextEdit[] res= new SimpleTextEdit[nLines]; for (int i= firstLine + 1, k= 0; i <= lastLine; i++) { String line= buffer.getLineContent(i); int offset= buffer.getLineInformation(i).getOffset(); int length= line.length() - Strings.trimIndent(line, fSourceIndentLevel, fTabWidth).length(); if (offset + length > endPos) { length= endPos - offset; } res[k++]= SimpleTextEdit.createReplace(offset, length, fDestinationIndent); } return res;
return getChangeIndentEdits(buffer, range, fSourceIndentLevel, fTabWidth, fDestinationIndent);
	private SimpleTextEdit[] getChangeIndentEdits(TextBuffer buffer, TextRange range) {		int endPos= range.getExclusiveEnd();		int firstLine= buffer.getLineOfOffset(range.getOffset());		int lastLine= buffer.getLineOfOffset(endPos - 1);				int nLines= lastLine - firstLine;		if (nLines <= 0) {			return null;		}		SimpleTextEdit[] res= new SimpleTextEdit[nLines];		for (int i= firstLine + 1, k= 0; i <= lastLine; i++) { // no indent for first line (contained in the formatted string)			String line= buffer.getLineContent(i);			int offset= buffer.getLineInformation(i).getOffset();			int length= line.length() - Strings.trimIndent(line, fSourceIndentLevel, fTabWidth).length();			if (offset + length > endPos) {				length= endPos - offset;			}			res[k++]= SimpleTextEdit.createReplace(offset, length, fDestinationIndent);		}		return res;		}