constraints |= IJavaSearchScope.APPLICATION_LIBRARIES;
IJavaSearchScope searchScope = SearchEngine.createJavaSearchScope( elements, constraints );
BusyIndicatorRunnableContext context = new BusyIndicatorRunnableContext();
MainTypeSelectionDialog dialog = new MainTypeSelectionDialog( parent, context, searchScope, 0 );
dialog.setTitle( "Find class" );
dialog.setMessage( "Find the class used to launch the application" );
if ( dialog.open() == Window.CANCEL ) {
return null;
}
Object[] results = dialog.getResult();
IType type = (IType) results[0];
if ( type != null ) {
return type.getFullyQualifiedName();
}