void () { int rows = myGraphTable.getSelectedRowCount(); if (rows < 1) { onLoadingStopped(); onEmptySelection(); } else { int[] toLoad = onSelection(myGraphTable.getSelectedRows()); onLoadingStarted(); EmptyProgressIndicator indicator = new EmptyProgressIndicator(); myLastRequest = indicator; myCommitDetailsGetter.loadCommitsData(myGraphTable.getModel().createSelection(toLoad).getIds(), detailsList -> { if (myLastRequest == indicator && !(indicator.isCanceled())) { if (toLoad.length != detailsList.size()) { LOG.error("Loaded incorrect number of details " + detailsList + " for selection " + Arrays.toString(toLoad)); } myLastRequest = null; onDetailsLoaded(detailsList); onLoadingStopped(); } }, t -> { if (myLastRequest == indicator && !(indicator.isCanceled())) { myLastRequest = null; LOG.error("Error loading details for selection " + Arrays.toString(toLoad), t); onError(t); onLoadingStopped(); } }, indicator); } }