Search in sources :

Example 11 with ListWrappingTableModel

use of com.intellij.codeInspection.ui.ListWrappingTableModel 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)

Example 12 with ListWrappingTableModel

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

the class SizeReplaceableByIsEmptyInspection method createOptionsPanel.

@Override
@Nullable
public JComponent createOptionsPanel() {
    final JComponent panel = new JPanel(new BorderLayout());
    final ListTable table = new ListTable(new ListWrappingTableModel(ignoredTypes, InspectionGadgetsBundle.message("ignored.classes.table")));
    JPanel tablePanel = UiUtils.createAddRemoveTreeClassChooserPanel(table, InspectionGadgetsBundle.message("choose.class.type.to.ignore"));
    final CheckBox checkBox = new CheckBox(InspectionGadgetsBundle.message("size.replaceable.by.isempty.negation.ignore.option"), this, "ignoreNegations");
    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) Nullable(org.jetbrains.annotations.Nullable)

Example 13 with ListWrappingTableModel

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

the class SubtractionInCompareToInspection method createOptionsPanel.

@Nullable
@Override
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    final ListTable table = new ListTable(new ListWrappingTableModel(Arrays.asList(methodMatcher.getClassNames(), methodMatcher.getMethodNamePatterns()), InspectionGadgetsBundle.message("class.name"), InspectionGadgetsBundle.message("method.name.regex")));
    final JPanel tablePanel = UiUtils.createAddRemoveTreeClassChooserPanel(table, InspectionGadgetsBundle.message("choose.class"));
    panel.add(tablePanel, BorderLayout.CENTER);
    return panel;
}
Also used : ListTable(com.intellij.codeInspection.ui.ListTable) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel) Nullable(org.jetbrains.annotations.Nullable)

Example 14 with ListWrappingTableModel

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

the class BooleanMethodNameMustStartWithQuestionInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new GridBagLayout());
    final ListTable table = new ListTable(new ListWrappingTableModel(questionList, InspectionGadgetsBundle.message("boolean.method.name.must.start.with.question.table.column.name")));
    final JPanel tablePanel = UiUtils.createAddRemovePanel(table);
    final GridBagConstraints constraints = new GridBagConstraints();
    constraints.gridx = 0;
    constraints.gridy = 0;
    constraints.weightx = 1.0;
    constraints.weighty = 1.0;
    constraints.fill = GridBagConstraints.BOTH;
    panel.add(tablePanel, constraints);
    final CheckBox checkBox1 = new CheckBox(InspectionGadgetsBundle.message("ignore.methods.with.boolean.return.type.option"), this, "ignoreBooleanMethods");
    constraints.gridy = 1;
    constraints.weighty = 0.0;
    panel.add(checkBox1, constraints);
    final CheckBox checkBox2 = new CheckBox(InspectionGadgetsBundle.message("ignore.boolean.methods.in.an.interface.option"), this, "ignoreInAnnotationInterface");
    constraints.gridy = 2;
    panel.add(checkBox2, constraints);
    final CheckBox checkBox3 = new CheckBox(InspectionGadgetsBundle.message("ignore.methods.overriding.super.method"), this, "onlyWarnOnBaseMethods");
    constraints.gridy = 3;
    panel.add(checkBox3, constraints);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) ListTable(com.intellij.codeInspection.ui.ListTable) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel)

Example 15 with ListWrappingTableModel

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

the class NonBooleanMethodNameMayNotStartWithQuestionInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    final ListTable table = new ListTable(new ListWrappingTableModel(questionList, InspectionGadgetsBundle.message("boolean.method.name.must.start.with.question.table.column.name")));
    final JPanel tablePanel = UiUtils.createAddRemovePanel(table);
    final CheckBox checkBox1 = new CheckBox(InspectionGadgetsBundle.message("ignore.methods.with.boolean.return.type.option"), this, "ignoreBooleanMethods");
    final CheckBox checkBox2 = new CheckBox(InspectionGadgetsBundle.message("ignore.methods.overriding.super.method"), this, "onlyWarnOnBaseMethods");
    panel.add(tablePanel, BorderLayout.CENTER);
    panel.add(FormBuilder.createFormBuilder().addComponent(checkBox1).addComponent(checkBox2).getPanel(), BorderLayout.SOUTH);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) ListTable(com.intellij.codeInspection.ui.ListTable) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel)

Aggregations

ListWrappingTableModel (com.intellij.codeInspection.ui.ListWrappingTableModel)17 ListTable (com.intellij.codeInspection.ui.ListTable)14 CheckBox (com.intellij.util.ui.CheckBox)9 Nullable (org.jetbrains.annotations.Nullable)2 ClassFilter (com.intellij.ide.util.ClassFilter)1 TreeClassChooser (com.intellij.ide.util.TreeClassChooser)1 TreeClassChooserFactory (com.intellij.ide.util.TreeClassChooserFactory)1 DataContext (com.intellij.openapi.actionSystem.DataContext)1 Project (com.intellij.openapi.project.Project)1 PsiClass (com.intellij.psi.PsiClass)1 VerticalLayout (com.intellij.ui.components.panels.VerticalLayout)1 TextField (com.siyeh.ig.ui.TextField)1 TableCellEditor (javax.swing.table.TableCellEditor)1 NotNull (org.jetbrains.annotations.NotNull)1