fPackageDialogField.setDialogFieldListener(adapter);
fPackageDialogField.setLabelText(getPackageLabel());
fPackageDialogField.setButtonLabel(NewWizardMessages.NewTypeWizardPage_package_button);
fPackageDialogField.setStatusWidthHint(NewWizardMessages.NewTypeWizardPage_default);
fEnclosingTypeSelection = new SelectionButtonDialogField(SWT.CHECK);
fEnclosingTypeSelection.setDialogFieldListener(adapter);
fEnclosingTypeSelection.setLabelText(getEnclosingTypeLabel());
fEnclosingTypeDialogField = new StringButtonDialogField(adapter);
fEnclosingTypeDialogField.setDialogFieldListener(adapter);
fEnclosingTypeDialogField.setButtonLabel(NewWizardMessages.NewTypeWizardPage_enclosing_button);
fTypeNameDialogField = new StringDialogField();
fTypeNameDialogField.setDialogFieldListener(adapter);
fTypeNameDialogField.setLabelText(getTypeNameLabel());
fSuperClassDialogField = new StringButtonDialogField(adapter);
fSuperClassDialogField.setDialogFieldListener(adapter);
fSuperClassDialogField.setLabelText(getSuperClassLabel());
fSuperClassDialogField.setButtonLabel(NewWizardMessages.NewTypeWizardPage_superclass_button);
String[] addButtons = new String[] {
NewWizardMessages.NewTypeWizardPage_interfaces_add,
/* 1 */null, NewWizardMessages.NewTypeWizardPage_interfaces_remove
};
fSuperInterfacesDialogField = new ListDialogField<InterfaceWrapper>(adapter, addButtons, new InterfacesListLabelProvider());
fSuperInterfacesDialogField.setDialogFieldListener(adapter);
fSuperInterfacesDialogField.setTableColumns(new ListDialogField.ColumnsDescription(1, false));
fSuperInterfacesDialogField.setLabelText(getSuperInterfacesLabel());
fSuperInterfacesDialogField.setRemoveButtonIndex(2);
String[] buttonNames1 = new String[] {
NewWizardMessages.NewTypeWizardPage_modifiers_public, NewWizardMessages.NewTypeWizardPage_modifiers_default, NewWizardMessages.NewTypeWizardPage_modifiers_private, NewWizardMessages.NewTypeWizardPage_modifiers_protected
};
fAccMdfButtons = new SelectionButtonDialogFieldGroup(SWT.RADIO, buttonNames1, 4);
fAccMdfButtons.setDialogFieldListener(adapter);
fAccMdfButtons.setLabelText(getModifiersLabel());
fAccMdfButtons.setSelection(0, true);
String[] buttonNames2;
if (fTypeKind == CLASS_TYPE) {
buttonNames2 = new String[] {
NewWizardMessages.NewTypeWizardPage_modifiers_abstract, NewWizardMessages.NewTypeWizardPage_modifiers_final, NewWizardMessages.NewTypeWizardPage_modifiers_static
};
} else {
if (fTypeKind == ENUM_TYPE || fTypeKind == ANNOTATION_TYPE) {
buttonNames2 = new String[] {
NewWizardMessages.NewTypeWizardPage_modifiers_abstract, NewWizardMessages.NewTypeWizardPage_modifiers_static
};
} else
buttonNames2 = new String[] {};
}
fOtherMdfButtons = new SelectionButtonDialogFieldGroup(SWT.CHECK, buttonNames2, 4);
fOtherMdfButtons.setDialogFieldListener(adapter);
fAccMdfButtons.enableSelectionButton(PRIVATE_INDEX, false);
fAccMdfButtons.enableSelectionButton(PROTECTED_INDEX, false);
fOtherMdfButtons.enableSelectionButton(STATIC_INDEX, false);
if (fTypeKind == ENUM_TYPE || fTypeKind == ANNOTATION_TYPE) {
fOtherMdfButtons.enableSelectionButton(ABSTRACT_INDEX, false);
fOtherMdfButtons.enableSelectionButton(ENUM_ANNOT_STATIC_INDEX, false);
}
fAddCommentButton = new SelectionButtonDialogField(SWT.CHECK);
fAddCommentButton.setLabelText(NewWizardMessages.NewTypeWizardPage_addcomment_label);
fUseAddCommentButtonValue = false; // only used when enabled
fCurrPackageCompletionProcessor = new JavaPackageCompletionProcessor();