use of net.sourceforge.pmd.eclipse.ui.dialogs.NewPropertyDialog in project pmd-eclipse-plugin by pmd.
the class FormArranger method addAddButton.
private void addAddButton() {
Button button = new Button(parent, SWT.PUSH);
button.setText("Add new...");
button.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
NewPropertyDialog dialog = new NewPropertyDialog(parent.getShell(), editorFactoriesByValueType, propertySource, changeListener);
if (dialog.open() == Window.OK) {
PropertyDescriptor<?> desc = dialog.descriptor();
propertySource.definePropertyDescriptor(desc);
rearrangeFor(propertySource);
}
}
});
}
Aggregations