void () { JComponent goalComponent; if (myHistory == null) { goalsEditor = new EditorTextField("", myProject, PlainTextFileType.INSTANCE); goalComponent = goalsEditor; goalsLabel.setLabelFor(goalsEditor); } else { goalsComboBox = new ComboBox(ArrayUtilRt.toStringArray(myHistory)); goalComponent = goalsComboBox; goalsLabel.setLabelFor(goalsComboBox); goalsComboBox.setLightWeightPopupEnabled(false); EditorComboBoxEditor editor = new StringComboboxEditor(myProject, PlainTextFileType.INSTANCE, goalsComboBox); goalsComboBox.setRenderer(new EditorComboBoxRenderer(editor)); goalsComboBox.setEditable(true); goalsComboBox.setEditor(editor); goalsComboBox.setFocusable(true); goalsEditor = editor.getEditorComponent(); } goalsPanel.add(goalComponent); new MavenArgumentsCompletionProvider(myProject).apply(goalsEditor); MavenProjectsManager projectsManager = MavenProjectsManager.getInstance(myProject); showProjectTreeButton.setIcon(AllIcons.Nodes.Module); MavenSelectProjectPopup.attachToWorkingDirectoryField(projectsManager, workDirectoryField.getTextField(), showProjectTreeButton, goalsComboBox != null ? goalsComboBox : goalsEditor); workDirectoryField.addBrowseFolderListener( RunnerBundle.message("maven.select.working.directory"), "", myProject, new MavenPomFileChooserDescriptor(myProject)); }