use of com.intellij.ui.TextFieldWithHistory in project jscs-plugin by idok.
the class JscsSettingsPage method configWithDefaults.
private static TextFieldWithHistory configWithDefaults(TextFieldWithHistoryWithBrowseButton field) {
TextFieldWithHistory textFieldWithHistory = field.getChildComponent();
textFieldWithHistory.setHistorySize(-1);
textFieldWithHistory.setMinimumAndPreferredWidth(0);
return textFieldWithHistory;
}
use of com.intellij.ui.TextFieldWithHistory in project scss-lint-plugin by idok.
the class ScssLintSettingsPage method configScssLintConfigField.
private void configScssLintConfigField() {
TextFieldWithHistory textFieldWithHistory = scssLintConfigFile.getChildComponent();
textFieldWithHistory.setHistorySize(-1);
textFieldWithHistory.setMinimumAndPreferredWidth(0);
SwingHelper.addHistoryOnExpansion(textFieldWithHistory, new NotNullProducer<List<String>>() {
@NotNull
public List<String> produce() {
File projectRoot = new File(project.getBaseDir().getPath());
return ScssLintFinder.searchForLintConfigFiles(projectRoot);
}
});
SwingHelper.installFileCompletionAndBrowseDialog(project, scssLintConfigFile, "Select SCSS Lint Config", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
use of com.intellij.ui.TextFieldWithHistory in project intellij-community by JetBrains.
the class MavenEnvironmentForm method createUIComponents.
private void createUIComponents() {
mavenHomeField = new TextFieldWithHistory();
mavenHomeField.setHistorySize(-1);
final ArrayList<String> foundMavenHomes = new ArrayList<>();
foundMavenHomes.add(MavenServerManager.BUNDLED_MAVEN_2);
foundMavenHomes.add(MavenServerManager.BUNDLED_MAVEN_3);
final File mavenHomeDirectory = MavenUtil.resolveMavenHomeDirectory(null);
if (mavenHomeDirectory != null) {
foundMavenHomes.add(FileUtil.toSystemIndependentName(mavenHomeDirectory.getPath()));
}
mavenHomeField.setHistory(foundMavenHomes);
mavenHomeComponent = LabeledComponent.create(new ComponentWithBrowseButton<>(mavenHomeField, null), "Maven &home directory");
final JBLabel versionLabel = new JBLabel();
versionLabel.setOpaque(true);
versionLabel.setVerticalAlignment(SwingConstants.TOP);
versionLabel.setVerticalTextPosition(SwingConstants.TOP);
mavenVersionLabelComponent = LabeledComponent.create(versionLabel, "");
}
Aggregations