String userId = getUserId();
if (userId == null) {
return;
}
TaskClient client = getTaskClient();
if (client == null) {
return;
}
try {
BlockingTaskSummaryResponseHandler responseHandler = new BlockingTaskSummaryResponseHandler();
client.getTasksAssignedAsPotentialOwner(userId, language, responseHandler);
List<TaskSummary> tasks = responseHandler.getResults();
tableViewer.setInput(tasks);
tableViewer.refresh();
tableViewer.setSelection(null);
updateButtons();
} catch (TimeoutException e) {
showMessage("Could not connect to task server, refresh first.");
try {
client.disconnect();
} catch (Exception exc) {
exc.printStackTrace();
}
this.client = null;
tableViewer.setInput(new ArrayList<TaskSummary>());