private void fileOpened(final EditorPartPresenter editor, final int offset) {
   new Timer() { // in some reason we need here timeout otherwise it not work cursor don't set to
                 // correct position
     @Override
     public void run() {
       if (editor instanceof EmbeddedTextEditorPresenter) {
         ((EmbeddedTextEditorPresenter) editor)
             .getDocument()
             .setSelectedRange(LinearRange.createWithStart(offset).andLength(0), true);
       }
     }
   }.schedule(100);
 }