try { TypeNameMatch typeInfo= selected[i]; IType type= typeInfo.getType(); if (type == null) { String title= JavaUIMessages.TypeSelectionDialog_errorTitle; String message= Messages.format(JavaUIMessages.TypeSelectionDialog_dialogMessage, typeInfo.getFullyQualifiedName()); MessageDialog.openError(getShell(), title, message); history.remove(typeInfo); setResult(null); } else { history.accessed(typeInfo); result.add(type); } } catch (JavaModelException e) { String title= JavaUIMessages.MultiTypeSelectionDialog_errorTitle; String message= JavaUIMessages.MultiTypeSelectionDialog_errorMessage; ErrorDialog.openError(getShell(), title, message, e.getStatus());
TypeNameMatch typeInfo= selected[i]; IType type= typeInfo.getType(); if (type == null) { String title= JavaUIMessages.TypeSelectionDialog_errorTitle; String message= Messages.format(JavaUIMessages.TypeSelectionDialog_dialogMessage, typeInfo.getFullyQualifiedName()); MessageDialog.openError(getShell(), title, message); history.remove(typeInfo); setResult(null); } else { history.accessed(typeInfo); result.add(type);
	protected void computeResult() {		TypeNameMatch[] selected= fContent.getSelection();		if (selected == null || selected.length == 0) {			setResult(null);			return;		}				// If the scope is null then it got computed by the type selection component.		if (fScope == null) {			fScope= fContent.getScope();		}				OpenTypeHistory history= OpenTypeHistory.getInstance();		List result= new ArrayList(selected.length);		for (int i= 0; i < selected.length; i++) {			try {				TypeNameMatch typeInfo= selected[i];				IType type= typeInfo.getType();				if (type == null) {					String title= JavaUIMessages.TypeSelectionDialog_errorTitle; 					String message= Messages.format(JavaUIMessages.TypeSelectionDialog_dialogMessage, typeInfo.getFullyQualifiedName()); 					MessageDialog.openError(getShell(), title, message);					history.remove(typeInfo);					setResult(null);				} else {					history.accessed(typeInfo);					result.add(type);				}			} catch (JavaModelException e) {				String title= JavaUIMessages.MultiTypeSelectionDialog_errorTitle; 				String message= JavaUIMessages.MultiTypeSelectionDialog_errorMessage; 				ErrorDialog.openError(getShell(), title, message, e.getStatus());			}		}		setResult(result);	}