use of ch.acanda.eclipse.pmd.wizard.AddRuleSetConfigurationWizard in project eclipse-pmd by acanda.
the class PMDPropertyPageController method addRuleSetConfiguration.
public void addRuleSetConfiguration(final Shell shell) {
final AddRuleSetConfigurationWizard wizard = new AddRuleSetConfigurationWizard(project);
final WizardDialog dialog = new WizardDialog(shell, wizard);
dialog.setPageSize(300, SWT.DEFAULT);
final int result = dialog.open();
if (result == Window.OK && wizard.getRuleSetModel() != null) {
final RuleSetViewModel viewModel = toViewModel(wizard.getRuleSetModel(), project);
model.addRuleSet(viewModel);
final HashSet<RuleSetViewModel> activeConfigs = new HashSet<>(model.getActiveRuleSets());
activeConfigs.add(viewModel);
model.setActiveRuleSets(activeConfigs);
}
}
Aggregations