Parser codeMirrorParser = CodeMirror2.getParser(path);
parser = codeMirrorParser == null ? null
: DocumentParser.create(document, codeMirrorParser, userActivityManager);
LanguageHelper languageHelper = LanguageHelperResolver.getHelper(parser.getSyntaxType());
RootActionExecutor actionExecutor = editor.getInput().getActionExecutor();
languageActionsRemover = actionExecutor.addDelegate(languageHelper.getActionExecutor());
textActionsRemover = actionExecutor.addDelegate(TextActions.INSTANCE);
cubeClientWrapper.setDocument(document, path.getPathString());
goToDefinition.editorContentsReplaced(path, parser);