OpenTypeSelectionDialog dialog= new OpenTypeSelectionDialog(parent, PlatformUI.getWorkbench().getProgressService(), IJavaSearchConstants.TYPE, SearchEngine.createWorkspaceScope());
OpenTypeSelectionDialog dialog; try { dialog= new OpenTypeSelectionDialog(parent, PlatformUI.getWorkbench().getProgressService(), IJavaSearchConstants.TYPE, SearchEngine.createWorkspaceScope()); } catch (OperationCanceledException e) {  return; }
	public void run() {		Shell parent= JavaPlugin.getActiveWorkbenchShell();		OpenTypeSelectionDialog dialog= new OpenTypeSelectionDialog(parent, PlatformUI.getWorkbench().getProgressService(), 			IJavaSearchConstants.TYPE, SearchEngine.createWorkspaceScope());				dialog.setMatchEmptyString(true);			dialog.setTitle(JavaUIMessages.getString("OpenTypeAction.dialogTitle")); //$NON-NLS-1$		dialog.setMessage(JavaUIMessages.getString("OpenTypeAction.dialogMessage")); //$NON-NLS-1$		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];			try {				IEditorPart part= EditorUtility.openInEditor(type, true);				EditorUtility.revealInEditor(part, type);			} catch (CoreException x) {				String title= JavaUIMessages.getString("OpenTypeAction.errorTitle"); //$NON-NLS-1$				String message= JavaUIMessages.getString("OpenTypeAction.errorMessage"); //$NON-NLS-1$				ExceptionHandler.handle(x, title, message);			}		}	}