@Override public void keyTyped(KeyEvent event){
  try {
    if (event.getKeyChar() == '>') {
      onBraceClosed(event);
    }
 else     if (event.getKeyChar() == ' ') {
      onEntityOpened(event);
    }
  }
 catch (  BadLocationException e) {
    e.printStackTrace();
  }
}

@ Override public void keyTyped ( KeyEvent event ) { try { if ( event . getKeyChar ( ) == '>' ) { onBraceClosed ( event ) ; } else if ( event . getKeyChar ( ) == ' ' ) { onEntityOpened ( event ) ; } } catch ( BadLocationException e ) { e . printStackTrace ( ) ; } }
reacts to typed keys ( closing brackets and empty spaces ) .
