Bug 3793 Wrong formating when creating inner class using wizard (1GEUE91)
- select TestCase - create a new class using TestCase as an eclosing type observe: - new type is added at the end. Quasi standard is having the new type at the beginning. - new type doesn't have indention. NOTES: GDA (6/5/01 11:08:09 AM) defer
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/TypePage.java
ElementListSelectionDialog dialog= new ElementListSelectionDialog(getShell(), new JavaElementLabelProvider(JavaElementLabelProvider.SHOW_DEFAULT));
		dialog.setIgnoreCase(false);
		dialog.setTitle(NewWizardMessages.getString("TypePage.ChoosePackageDialog.title")); 
		dialog.setMessage(NewWizardMessages.getString("TypePage.ChoosePackageDialog.description")); 
		dialog.setEmptyListMessage(NewWizardMessages.getString("TypePage.ChoosePackageDialog.empty")); 
		dialog.setElements(packages);
		if (fCurrPackage != null) {
			dialog.setInitialSelections(new Object[] { fCurrPackage });
		}
		if (dialog.open() == dialog.OK) {
			return (IPackageFragment) dialog.getFirstResult();
		}
		return null;
	}
	
	private IType chooseEnclosingType() {
		IPackageFragmentRoot root= getPackageFragmentRoot();
		if (root == null) {
			return null;
		}
		IJavaElement[] elements= new IJavaElement[] { root.getJavaProject() };
		IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements);
			
		TypeSelectionDialog dialog= new TypeSelectionDialog(getShell(), getWizard().getContainer(), scope, IJavaElementSearchConstants.CONSIDER_TYPES);
		dialog.setTitle(NewWizardMessages.getString("TypePage.ChooseEnclosingTypeDialog.title")); 
		dialog.setMessage(NewWizardMessages.getString("TypePage.ChooseEnclosingTypeDialog.description")); 
		if (fCurrEnclosingType != null) {
			dialog.setInitialSelections(new Object[] { fCurrEnclosingType });
			dialog.setFilter(fCurrEnclosingType.getElementName().substring(0, 1));