Bug 5418 bracket marker stays in editor
private void showDebugSourcePage(String typeName) { if (dialog.open() == dialog.OK) { } 1. set the cursor after the opening bracket (after dialog.OK) 2. press enter 3. The bracket box includes all characters insterted by the auto indenter
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
public void paintControl(PaintEvent event) {
				handleDrawRequest(event.gc);
			}
			
			private void handleDrawRequest(GC gc) {
				IRegion region= fSourceViewer.getVisibleRegion();
				int offset= fBracketPosition.getOffset();
				int length= fBracketPosition.getLength();
				
				if (region.getOffset() <= offset && region.getOffset() + region.getLength() >= offset + length) {
					offset -= region.getOffset();						
					if (length == 2) {
						draw(gc, offset, length);
					} else {
						draw(gc, offset, 1);
						draw(gc, offset + length -1, 1);
					}
				}
			}
			
			private void draw(GC gc, int offset, int length) {
				if (gc != null) {
					Point left= fTextWidget.getLocationAtOffset(offset);
					Point right= fTextWidget.getLocationAtOffset(offset + length);
					gc.setForeground(fColor);
					gc.drawRectangle(left.x, left.y, right.x - left.x - 1, gc.getFontMetrics().getHeight() - 1);
				} else {
					fTextWidget.redrawRange(offset, length, true);
				}