void (String text) { PsiFile psiFile = myFixture.configureByText("test.txt", text); Document document = myFixture.getDocument(psiFile); final Project project = getProject(); TextFieldWithAutoCompletion.installCompletion(document, project, new TaskAutoCompletionListProvider(project), false); CommitMessage commitMessage = new CommitMessage(project); Disposer.register(getTestRootDisposable(), commitMessage); document.putUserData(CommitMessage.DATA_KEY, commitMessage); }