initialize(event, element);
Map fields = getFields();
final Shell p = DLTKUIPlugin.getActiveWorkbenchShell();
GetterSetterContentProvider cp = new GetterSetterContentProvider(fields);
GetterSetterDialog dialog = new GetterSetterDialog(p, new GetterSetterLabelProvider(), cp, type);
dialog.setContainerMode(true);
dialog.setInput(type);
dialog.setTitle("Generate Getters and Setters");
if (fields.size() == 0) {
return exitMessage();
}
if (dialog.open() == Window.OK) {
List<GetterSetterEntry> entries = new ArrayList<GetterSetterEntry>();
Object[] dialogResult = dialog.getResult();
for (Object o : dialogResult) {
if (o instanceof GetterSetterEntry) {
entries.add((GetterSetterEntry) o);
}
}
insertFirst = false;
insertAfter = null;
if (dialog.insertAsFirstMember())
insertFirst = true;
else if (dialog.insertAsLastMember()) {
} else insertAfter = dialog.getInsertionPoint();
generate(entries, dialog.getModifier(), dialog.doGenerateComments(), dialog.hasFluentInterface());
}
} catch (Exception e) {