Bug 23316 preference to turn off automagic-closing-brackets
there should be a way to turn it off - i'm not used to it and it gets in my way a bit
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaStringAutoIndentStrategy.java
/**
	 * Returns whether the text ends with one of the given search strings.
	 */
	private boolean hasLineDelimiters(IDocument document, String text) throws BadLocationException {
		String[] delimiters= document.getLegalLineDelimiters();
		
		for (int i= 0; i < delimiters.length; i++)
			if (text.indexOf(delimiters[i]) != -1)
				return true;
		
		return false;
	}
	
	private String getLineIndentation(IDocument document, int offset) throws BadLocationException {
		
		int adjustedOffset= (offset == document.getLength() ? offset  - 1 : offset);
		IRegion line= document.getLineInformationOfOffset(adjustedOffset);
		int start= line.getOffset();
					
		
		int end= findEndOfWhiteSpace(document, start, offset);
		
		return document.get(start, end - start);
	}
	private String getModifiedText(String string, String lineDelimiter, String indentation) throws BadLocationException {		
		String indentedLine= lineDelimiter + indentation;
		IDocument document= new Document(string);			
		StringBuffer buffer= new StringBuffer();
		IRegion line= document.getLineInformation(0);
		buffer.append(document.get(line.getOffset(), line.getLength()));