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/text/java/JavaCodeScanner.java
/**
	 * Creates a Java code scanner
	 */
	public JavaCodeScanner(IColorManager manager) {
		super();
		
		setDefaultReturnToken(new Token(new TextAttribute(manager.getColor(IJavaColorConstants.JAVA_DEFAULT))));
		
		fColorManager= manager;
		
		fKeyword= new Token(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_KEYWORD), null, SWT.BOLD));
		fType= new Token(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_TYPE), null, SWT.BOLD));
		fString= new Token(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_STRING)));
		fComment= new Token(new TextAttribute(fColorManager.getColor(IJavaColorConstants.JAVA_SINGLE_LINE_COMMENT)));
		
		initializeRules();
		
	}
	
	private void initializeRules() {
		List rules= new ArrayList();
		
		
		rules.add(new EndOfLineRule("//", fComment)); 
		
		
		rules.add(new SingleLineRule("\"", "\"", fString, '\\')); 
		rules.add(new SingleLineRule("'", "'", fString, '\\'));