designer.setSelectedWidget(list);
}else{
Shell parent = expandBar.getShell();
try {
SelectionDialog typeDialog = JavaUI.createTypeDialog(parent, new ProgressMonitorDialog(parent), VisualSwingPlugin.getCurrentProject().getProject(), IJavaElementSearchConstants.CONSIDER_CLASSES, false);
if(typeDialog.open()==Window.OK){
Object[] result = typeDialog.getResult();
if(result!=null&&result.length>0){
IType type = (IType) result[0];
String className = type.getElementName();
IPackageFragment packageFragment = type.getPackageFragment();