}
// Occurs outside the EDT
protected Object construct() throws Exception {
if(query != null && query.trim().length() > 0){
GoogleSearch googleSearch = new GoogleSearch();
googleSearch.setKey(getGoogleKey());
googleSearch.setQueryString(query);
googleSearch.setStartResult(startResult);
try{
MessageSource messageSource = (MessageSource)ApplicationServicesLocator.services().getService(MessageSource.class);
String title = messageSource.getMessage(PROGESS_MESSAGE, new Object[]{}, Locale.getDefault());
getStatusBar().getProgressMonitor().taskStarted(title, StatusBarProgressMonitor.UNKNOWN);
return googleSearch.doSearch();
}
finally{
getStatusBar().getProgressMonitor().done();
}
}