page
.setDescription(AttributeGroupMessages
.getString(
"DialogUtil.createDescription", group.getTagName(), parent.getTagName())); //$NON-NLS-1$
Wizard wizard = new Wizard() {
public void addPages() {
super.addPage(page);
}
public boolean performFinish() {
DialogField[] fields = group.getDialogFields();
Map map = new HashMap();
for (int i = 0; i < fields.length; i++) {
IPropertyPageDescriptor desc = group
.getPropertyDescriptor(fields[i]);
if (desc != null && fields[i] instanceof ISupportTextValue) {
String value = ((ISupportTextValue) fields[i])
.getText();
if (value != null && value.length() > 0) {
map.put(desc.getAttributeName(), value);
}
}
}
createSubNode(group, parent, map);
return true;
}
};
wizard.setWindowTitle(AttributeGroupMessages.getString(
"DialogUtil.createTitle", group.getTagName())); //$NON-NLS-1$
wizard.setDefaultPageImageDescriptor(PDPlugin.getDefault()
.getImageDescriptor("newsuade_wiz.gif")); //$NON-NLS-1$
CommonWizardDialog dialog = new CommonWizardDialog(shell, wizard);
return dialog.open() == Window.OK;
}