void (@NotNull ProgressIndicator indicator) { try { mySocket = myServerSocket.accept(); final ExecutionException[] ex = new ExecutionException[1]; NonBlockingReadAction<Void> readAction = ReadAction.nonBlocking(() -> performWithIncompleteIndex(this::search, ex)); if (requiresSmartMode() && !myAllowIndexInDumbMode) { readAction = readAction.inSmartMode(myProject); } readAction.executeSynchronously(); if (ex[0] != null) { logCantRunException(ex[0]); } ExecutionException[] onFoundEx = new ExecutionException[1]; Runnable runnable = () -> performWithIncompleteIndex(this::onFound, onFoundEx); if (requiresSmartMode() && !myAllowIndexInDumbMode) { DumbService.getInstance(getProject()).runReadActionInSmartMode(runnable); } else { ReadAction.run(runnable::run); } if (onFoundEx[0] != null) { throw onFoundEx[0]; } } catch (ProcessCanceledException e) { throw e; } catch (IOException e) { LOG.info(e); } catch (Throwable e) { LOG.error(e); } }