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/JavaAutoIndentStrategy.java
c.length += c.offset - start;
					c.offset= start;
					c.text= replaceText.toString();
				}
			}
		} catch (BadLocationException excp) {
			System.out.println(JavaTextMessages.getString("AutoIndent.error.bad_location.message1")); 
		}
	}
	protected void smartIndentAfterNewLine(IDocument d, DocumentCommand c) {
		int docLength= d.getLength();
		if (c.offset == -1 || docLength == 0)
			return;
		try {
			int p= (c.offset == docLength ? c.offset - 1 : c.offset);
			int line= d.getLineOfOffset(p);
			StringBuffer buf= new StringBuffer(c.text);
			if (c.offset < docLength && d.getChar(c.offset) == '}') {
				int indLine= findMatchingOpenBracket(d, line, c.offset, 0);
				if (indLine == -1) {
					indLine= line;
				}
				buf.append(getIndentOfLine(d, indLine));
			} else {
				int start= d.getLineOffset(line);
				
				IDocumentPartitioner partitioner= d.getDocumentPartitioner();
				if (partitioner != null) {
					ITypedRegion region= partitioner.getPartition(start);