Search in sources :

Example 6 with ListTable

use of com.intellij.codeInspection.ui.ListTable in project intellij-community by JetBrains.

the class TestMethodWithoutAssertionInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    final ListTable table = new ListTable(new ListWrappingTableModel(Arrays.asList(methodMatcher.getClassNames(), methodMatcher.getMethodNamePatterns()), "Assertion class name", InspectionGadgetsBundle.message("method.name.regex")));
    final JPanel tablePanel = UiUtils.createAddRemoveTreeClassChooserPanel(table, "Choose assertion class");
    final CheckBox checkBox = new CheckBox(InspectionGadgetsBundle.message("assert.keyword.is.considered.an.assertion"), this, "assertKeywordIsAssertion");
    panel.add(tablePanel, BorderLayout.CENTER);
    panel.add(checkBox, BorderLayout.SOUTH);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) ListTable(com.intellij.codeInspection.ui.ListTable) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel)

Example 7 with ListTable

use of com.intellij.codeInspection.ui.ListTable in project intellij-community by JetBrains.

the class ClassWithoutLoggerInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JComponent panel = new JPanel(new BorderLayout());
    final ListTable table = new ListTable(new ListWrappingTableModel(loggerNames, InspectionGadgetsBundle.message("logger.class.name")));
    final JPanel tablePanel = UiUtils.createAddRemoveTreeClassChooserPanel(table, InspectionGadgetsBundle.message("choose.logger.class"));
    final CheckBox checkBox = new CheckBox(InspectionGadgetsBundle.message("super.class.logger.option"), this, "ignoreSuperLoggers");
    panel.add(tablePanel, BorderLayout.CENTER);
    panel.add(checkBox, BorderLayout.SOUTH);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) ListTable(com.intellij.codeInspection.ui.ListTable) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel)

Example 8 with ListTable

use of com.intellij.codeInspection.ui.ListTable in project intellij-community by JetBrains.

the class LogStatementGuardedByLogConditionInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    final JLabel classNameLabel = new JLabel(InspectionGadgetsBundle.message("logger.name.option"));
    classNameLabel.setHorizontalAlignment(SwingConstants.TRAILING);
    final TextField loggerClassNameField = new TextField(this, "loggerClassName");
    final ListTable table = new ListTable(new ListWrappingTableModel(Arrays.asList(logMethodNameList, logConditionMethodNameList), InspectionGadgetsBundle.message("log.method.name"), InspectionGadgetsBundle.message("log.condition.text")));
    panel.add(UiUtils.createAddRemovePanel(table), BorderLayout.CENTER);
    panel.add(FormBuilder.createFormBuilder().addLabeledComponent(classNameLabel, loggerClassNameField).getPanel(), BorderLayout.NORTH);
    panel.add(new CheckBox(InspectionGadgetsBundle.message("log.statement.guarded.by.log.condition.flag.all.unguarded.option"), this, "flagAllUnguarded"), BorderLayout.SOUTH);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) ListTable(com.intellij.codeInspection.ui.ListTable) TextField(com.siyeh.ig.ui.TextField) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel)

Example 9 with ListTable

use of com.intellij.codeInspection.ui.ListTable in project intellij-community by JetBrains.

the class CollectionsListSettings method createOptionsPanel.

public JComponent createOptionsPanel() {
    final String title = QuickFixBundle.message("collection.addall.can.be.replaced.with.constructor.fix.options.title");
    final ListTable table = new ListTable(new ListWrappingTableModel(myCollectionClassesRequiringCapacity, title));
    return UiUtils.createAddRemoveTreeClassChooserPanel(table, title, CommonClassNames.JAVA_LANG_OBJECT);
}
Also used : ListTable(com.intellij.codeInspection.ui.ListTable) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel)

Example 10 with ListTable

use of com.intellij.codeInspection.ui.ListTable in project intellij-community by JetBrains.

the class IOResourceInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JComponent panel = new JPanel(new BorderLayout());
    final ListTable table = new ListTable(new ListWrappingTableModel(ignoredTypes, InspectionGadgetsBundle.message("ignored.io.resource.types")));
    final JPanel tablePanel = UiUtils.createAddRemoveTreeClassChooserPanel(table, InspectionGadgetsBundle.message("choose.io.resource.type.to.ignore"), IO_TYPES);
    panel.add(tablePanel, BorderLayout.CENTER);
    panel.add(super.createOptionsPanel(), BorderLayout.SOUTH);
    return panel;
}
Also used : ListTable(com.intellij.codeInspection.ui.ListTable) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel)

Aggregations

ListTable (com.intellij.codeInspection.ui.ListTable)14 ListWrappingTableModel (com.intellij.codeInspection.ui.ListWrappingTableModel)14 CheckBox (com.intellij.util.ui.CheckBox)9 Nullable (org.jetbrains.annotations.Nullable)2 VerticalLayout (com.intellij.ui.components.panels.VerticalLayout)1 TextField (com.siyeh.ig.ui.TextField)1 NotNull (org.jetbrains.annotations.NotNull)1