Bug 4139 EC DCR: Code templates feature (1GIVMDV)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/CodeIndentator.java
return fPositions;
	}
	/**
	 * Indentates a string.
	 */
	public String indentate(String string) {		
		StringBuffer buffer = new StringBuffer(string.length());
		
		String indentation= TextUtilities.createIndentString(fIndentationLevel);
		String[] lines= splitIntoLines(string);
		int position= 0;
		for (int i= 0; i != lines.length; i++) {
			buffer.append(indentation);
			buffer.append(lines[i]);
			
			if (fPositions != null) {
				for (int j= 0; j != fPositions.length; j++)		
					if (fPositions[j] >= position)
						fPositions[j] += indentation.length();
			}
			
			position += lines[i].length();
		}
		
		return buffer.toString();		
	}
	
	private static String[] splitIntoLines(String text) {
		try {
			ITextStore store= new GapTextStore(0, 1);