protected void handleBehaviourSearchButtonSelected() {
Shell shell = getShell();
IJavaProject javaProject = getJavaProject();
OpenTypeSelectionDialog2 dialog= new OpenTypeSelectionDialog2(
shell, false,
PlatformUI.getWorkbench().getProgressService(),
null, IJavaSearchConstants.TYPE);
dialog.setTitle("Search Behaviour Class");
dialog.setMessage("Search for the behaviour class to verify");
int result= dialog.open();
if (result != IDialogConstants.OK_ID)
return;
Object[] types= dialog.getResult();
if (types != null && types.length > 0) {
IType type= (IType)types[0];
behaviourText.setText(type.getFullyQualifiedName('.'));
javaProject = type.getJavaProject();
projectText.setText(javaProject.getElementName());