use of net.sourceforge.pmd.eclipse.ui.preferences.br.RuleLabelProvider in project pmd-eclipse-plugin by pmd.
the class RuleSetSelectionDialog method setupRuleTable.
private void setupRuleTable() {
Table tbl = ruleTable.getTable();
tbl.setLinesVisible(true);
tbl.setHeaderVisible(true);
ruleTable.setContentProvider(new IStructuredContentProvider() {
public Object[] getElements(Object inputElement) {
RuleSet rs = selectedRuleset();
return rs == null ? new Object[0] : rs.getRules().toArray();
}
public void dispose() {
}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
});
ruleTable.addCheckStateListener(new ICheckStateListener() {
public void checkStateChanged(CheckStateChangedEvent event) {
ruleChecked();
}
});
createCheckBoxColumn(tbl);
for (int i = 0; i < columns.length; i++) {
columns[i].newTableColumnFor(tbl, i + 1, null, null);
}
ruleTable.setLabelProvider(new RuleLabelProvider(columns));
}
Aggregations