void (IndexingContext ctx, ScanningResult result) { try { if (p.isCanceled()) throw new MavenProcessCanceledRuntimeException(); p.setText("Maven Indexing Finished: " + result.getTotalFiles() + " was scanned"); } catch (RemoteException e) { throw new RuntimeException(e); } }