com.intellij.webcore.ui.SwingHelper Java Examples

The following examples show how to use com.intellij.webcore.ui.SwingHelper. 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 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 #2
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 #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: 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());
}
 
Example #6
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 #7
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 #8
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 #9
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 #10
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 #11
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 #12
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 #13
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 #14
Source File: ESLintSettingsPage.java    From eslint-plugin with 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);
}
 
Example #15
Source File: RTSettingsPage.java    From react-templates-plugin with 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 #16
Source File: JscsSettingsPage.java    From jscs-plugin with 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 File: VueSettingsPage.java    From vue-for-idea with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
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 #18
Source File: RTSettingsPage.java    From react-templates-plugin with 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);
}