Java Code Examples for com.intellij.webcore.ui.SwingHelper

The following examples show how to use com.intellij.webcore.ui.SwingHelper. These examples are extracted from open source projects. 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 Project: react-templates-plugin   Source File: RTSettingsPage.java    License: 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 Project: react-templates-plugin   Source File: RTSettingsPage.java    License: 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
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
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 Project: jscs-plugin   Source File: JscsSettingsPage.java    License: 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 Project: jscs-plugin   Source File: JscsSettingsPage.java    License: 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 Project: jscs-plugin   Source File: JscsSettingsPage.java    License: 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 Project: react-templates-plugin   Source File: RTSettingsPage.java    License: 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 Project: react-templates-plugin   Source File: RTSettingsPage.java    License: 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 Project: eslint-plugin   Source File: ESLintSettingsPage.java    License: 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 Project: eslint-plugin   Source File: ESLintSettingsPage.java    License: 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 Project: eslint-plugin   Source File: ESLintSettingsPage.java    License: 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 Project: eslint-plugin   Source File: ESLintSettingsPage.java    License: 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 14
Source Project: react-templates-plugin   Source File: RTSettingsPage.java    License: MIT License 4 votes vote down vote up
private void createUIComponents() {
    // TODO: place custom component creation code here
    usageLink = SwingHelper.createWebHyperlink(HOW_TO_USE_RT, HOW_TO_USE_LINK);
}
 
Example 15
private void createUIComponents() {
    // TODO: place custom component creation code here
    usageLink = com.intellij.util.ui.SwingHelper.createWebHyperlink(HOW_TO_USE_RT, HOW_TO_USE_LINK);
}
 
Example 16
Source Project: jscs-plugin   Source File: JscsSettingsPage.java    License: MIT License 4 votes vote down vote up
private void createUIComponents() {
    // TODO: place custom component creation code here
    usageLink = SwingHelper.createWebHyperlink(HOW_TO_USE_JSCS, HOW_TO_USE_LINK);
}
 
Example 17
Source Project: react-templates-plugin   Source File: RTSettingsPage.java    License: MIT License 4 votes vote down vote up
private void createUIComponents() {
    // TODO: place custom component creation code here
    usageLink = SwingHelper.createWebHyperlink(HOW_TO_USE_RT, HOW_TO_USE_LINK);
}
 
Example 18
Source Project: eslint-plugin   Source File: ESLintSettingsPage.java    License: MIT License 4 votes vote down vote up
private void createUIComponents() {
    // TODO: place custom component creation code here
    usageLink = SwingHelper.createWebHyperlink(HOW_TO_USE_ESLINT, HOW_TO_USE_LINK);
}