JComponent (@NotNull Project project) { FormBuilder builder = FormBuilder.createFormBuilder(); final EditorTextField taskPatternText; taskPatternText = new LanguageTextField(RegExpLanguage.INSTANCE, project, myTaskRegex, false); taskPatternText.addDocumentListener(new DocumentListener() { @Override public void documentChanged(@NotNull DocumentEvent e) { myTaskRegex = taskPatternText.getText(); } }); String tooltip = TaskBundle.message("label.html.task.pattern.should.be.regexp.with.two.matching.groups.id.summary"); builder.addLabeledComponent(TaskBundle.message("label.task.pattern"), new JBScrollPane(taskPatternText)).addTooltip(tooltip); return builder.getPanel(); }