Search in sources :

Example 1 with Option

use of com.intellij.codeInsight.hints.Option in project intellij-community by JetBrains.

the class ParameterNameHintsConfigurable method createOptionsPanel.

@Nullable
private JPanel createOptionsPanel(@NotNull Language language) {
    List<Option> options = getOptions(language);
    if (options.isEmpty()) {
        return null;
    }
    JPanel languageOptionsPanel = new JPanel();
    BoxLayout boxLayout = new BoxLayout(languageOptionsPanel, BoxLayout.Y_AXIS);
    languageOptionsPanel.setLayout(boxLayout);
    if (!options.isEmpty()) {
        languageOptionsPanel.setBorder(IdeBorderFactory.createTitledBorder("Options"));
    }
    for (Option option : options) {
        JBCheckBox box = new JBCheckBox(option.getName(), option.get());
        myOptions.put(option, box);
        languageOptionsPanel.add(box);
    }
    return languageOptionsPanel;
}
Also used : Option(com.intellij.codeInsight.hints.Option) JBCheckBox(com.intellij.ui.components.JBCheckBox) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

Option (com.intellij.codeInsight.hints.Option)1 JBCheckBox (com.intellij.ui.components.JBCheckBox)1 Nullable (org.jetbrains.annotations.Nullable)1