Java Code Examples for com.intellij.webcore.ui.SwingHelper#addHistoryOnExpansion()

The following examples show how to use com.intellij.webcore.ui.SwingHelper#addHistoryOnExpansion() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RTSettingsPage.java    From react-templates-plugin with MIT License 5 votes vote down vote up
private void configRTBinField() {
    configWithDefaults(rtBinField);
    SwingHelper.addHistoryOnExpansion(rtBinField.getChildComponent(), new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            List<File> newFiles = RTFinder.searchForRTBin(getProjectPath());
            return FileUtils.toAbsolutePath(newFiles);
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, rtBinField, "Select React-Templates Cli", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
 
Example 2
Source File: RTSettingsPage.java    From react-templates-plugin with MIT License 5 votes vote down vote up
private void configNodeField() {
    TextFieldWithHistory textFieldWithHistory = configWithDefaults(nodeInterpreterField);
    SwingHelper.addHistoryOnExpansion(textFieldWithHistory, new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            List<File> newFiles = NodeDetectionUtil.listAllPossibleNodeInterpreters();
            return FileUtils.toAbsolutePath(newFiles);
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, nodeInterpreterField, "Select Node Interpreter", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
 
Example 3
Source File: VueSettingsPage.java    From vue-for-idea with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void configRTBinField() {
    configWithDefaults(rtBinField);
    SwingHelper.addHistoryOnExpansion(rtBinField.getChildComponent(), new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            List<File> newFiles = VueFinder.searchForRTBin(getProjectPath());
            return FileUtils.toAbsolutePath(newFiles);
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, rtBinField, "Select vue cli", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
 
Example 4
Source File: VueSettingsPage.java    From vue-for-idea with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void configNodeField() {
    TextFieldWithHistory textFieldWithHistory = configWithDefaults(nodeInterpreterField);
    SwingHelper.addHistoryOnExpansion(textFieldWithHistory, new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            List<File> newFiles = NodeDetectionUtil.listAllPossibleNodeInterpreters();
            return FileUtils.toAbsolutePath(newFiles);
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, nodeInterpreterField, "Select Node interpreter", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
 
Example 5
Source File: JscsSettingsPage.java    From jscs-plugin with MIT License 5 votes vote down vote up
private void configBinField() {
    configWithDefaults(jscsBinField);
    SwingHelper.addHistoryOnExpansion(jscsBinField.getChildComponent(), new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            List<File> newFiles = JscsFinder.searchForJscsBin(getProjectPath());
            return FileUtils.toAbsolutePath(newFiles);
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, jscsBinField, "Select jscs.js cli", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
 
Example 6
Source File: JscsSettingsPage.java    From jscs-plugin with MIT License 5 votes vote down vote up
private void configJscsRcField() {
    TextFieldWithHistory textFieldWithHistory = configWithDefaults(jscsrcFile);
    SwingHelper.addHistoryOnExpansion(textFieldWithHistory, new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            return JscsFinder.searchForJscsRCFiles(getProjectPath());
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, jscsrcFile, "Select JSCS config", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
 
Example 7
Source File: JscsSettingsPage.java    From jscs-plugin with MIT License 5 votes vote down vote up
private void configNodeField() {
    TextFieldWithHistory textFieldWithHistory = configWithDefaults(nodeInterpreterField);
    SwingHelper.addHistoryOnExpansion(textFieldWithHistory, new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            List<File> newFiles = NodeDetectionUtil.listAllPossibleNodeInterpreters();
            return FileUtils.toAbsolutePath(newFiles);
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, nodeInterpreterField, "Select Node interpreter", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
 
Example 8
Source File: RTSettingsPage.java    From react-templates-plugin with MIT License 5 votes vote down vote up
private void configRTBinField() {
    configWithDefaults(rtBinField);
    SwingHelper.addHistoryOnExpansion(rtBinField.getChildComponent(), new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            List<File> newFiles = RTFinder.searchForRTBin(getProjectPath());
            return FileUtils.toAbsolutePath(newFiles);
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, rtBinField, "Select React-Templates Cli", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
 
Example 9
Source File: RTSettingsPage.java    From react-templates-plugin with MIT License 5 votes vote down vote up
private void configNodeField() {
    TextFieldWithHistory textFieldWithHistory = configWithDefaults(nodeInterpreterField);
    SwingHelper.addHistoryOnExpansion(textFieldWithHistory, new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            List<File> newFiles = NodeDetectionUtil.listAllPossibleNodeInterpreters();
            return FileUtils.toAbsolutePath(newFiles);
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, nodeInterpreterField, "Select Node Interpreter", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
 
Example 10
Source File: ESLintSettingsPage.java    From eslint-plugin with MIT License 5 votes vote down vote up
private void configESLintBinField() {
    configWithDefaults(eslintBinField2);
    SwingHelper.addHistoryOnExpansion(eslintBinField2.getChildComponent(), new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            List<File> newFiles = ESLintFinder.searchForESLintBin(getProjectPath());
            return FileUtils.toAbsolutePath(newFiles);
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, eslintBinField2, "Select ESLint.js Cli", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
 
Example 11
Source File: ESLintSettingsPage.java    From eslint-plugin with MIT License 5 votes vote down vote up
private void configESLintRulesField() {
    TextFieldWithHistory textFieldWithHistory = rulesPathField.getChildComponent();
    SwingHelper.addHistoryOnExpansion(textFieldWithHistory, new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            return ESLintFinder.tryFindRulesAsString(getProjectPath());
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, rulesPathField, "Select Built in Rules", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
 
Example 12
Source File: ESLintSettingsPage.java    From eslint-plugin with MIT License 5 votes vote down vote up
private void configESLintRcField() {
    TextFieldWithHistory textFieldWithHistory = configWithDefaults(eslintrcFile);
    SwingHelper.addHistoryOnExpansion(textFieldWithHistory, new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            return ESLintFinder.searchForESLintRCFiles(getProjectPath());
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, eslintrcFile, "Select ESLint Config", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}
 
Example 13
Source File: ESLintSettingsPage.java    From eslint-plugin with MIT License 5 votes vote down vote up
private void configNodeField() {
    TextFieldWithHistory textFieldWithHistory = configWithDefaults(nodeInterpreterField);
    SwingHelper.addHistoryOnExpansion(textFieldWithHistory, new NotNullProducer<List<String>>() {
        @NotNull
        public List<String> produce() {
            List<File> newFiles = NodeDetectionUtil.listAllPossibleNodeInterpreters();
            return FileUtils.toAbsolutePath(newFiles);
        }
    });
    SwingHelper.installFileCompletionAndBrowseDialog(project, nodeInterpreterField, "Select Node Interpreter", FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor());
}