javaLayout.numColumns = 4;
javaGroup.setLayout(javaLayout);
javaGroup.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
PackageButtonAdapter packageButtonAdapter = new PackageButtonAdapter();
_packageDialogField = new StringButtonStatusDialogField(packageButtonAdapter);
_packageDialogField.setDialogFieldListener(packageButtonAdapter);
_packageDialogField.setLabelText(NewWizardMessages.NewTypeWizardPage_package_label);
_packageDialogField.setButtonLabel(NewWizardMessages.NewTypeWizardPage_package_button);
_packageDialogField.setStatusWidthHint(NewWizardMessages.NewTypeWizardPage_default);
_packageDialogField.doFillIntoGrid(javaGroup, 4);
Text packageText = _packageDialogField.getTextControl(null);
LayoutUtil.setWidthHint(packageText, convertWidthInCharsToPixels(40));
LayoutUtil.setHorizontalGrabbing(packageText);
// JavaPackageCompletionProcessor packageCompletionProcessor= new
// JavaPackageCompletionProcessor();
// ControlContentAssistHelper.createTextContentAssistant(text,
// packageCompletionProcessor);
if (_currentSelection instanceof IPackageFragment) {
_packageDialogField.setText(((IPackageFragment) _currentSelection).getElementName());
} else {
String _package = null;
IResource _resource = ResourcesPlugin.getWorkspace().getRoot().findMember(this.getContainerFullPath());
if (_resource instanceof IFolder) {
_package = packageNameForComponentFolder((IFolder)_resource);
}
if (_package == null && (_package = packageNameForComponent("Main")) == null) {
_package = "";
}
_packageDialogField.setText(_package);
}
SuperclassButtonAdapter superclassButtonAdapter = new SuperclassButtonAdapter();
_superclassDialogField = new StringButtonStatusDialogField(superclassButtonAdapter);
_superclassDialogField.setDialogFieldListener(superclassButtonAdapter);
_superclassDialogField.setLabelText(NewWizardMessages.NewTypeWizardPage_superclass_label);
_superclassDialogField.setButtonLabel(NewWizardMessages.NewTypeWizardPage_superclass_button);
_superclassDialogField.setStatusWidthHint(NewWizardMessages.NewTypeWizardPage_default);
_superclassDialogField.doFillIntoGrid(javaGroup, 4);