void (List<? extends Tools> globalTools) { for (Tools tools : globalTools) { for (ScopeToolState state : tools.getTools()) { if (!state.isEnabled()) continue; NamedScope stateScope = state.getScope(getProject()); if (stateScope == null) continue; InspectionToolWrapper<?, ?> toolWrapper = state.getTool(); GlobalInspectionTool tool = (GlobalInspectionTool)toolWrapper.getTool(); if (tool.isGraphNeeded()) { try { reportWhenActivityFinished( getInspectionEventPublisher(), InspectListener.ActivityKind.REFERENCE_SEARCH, getProject(), () -> ((RefManagerImpl)getRefManager()).findAllDeclarations()); } catch (Throwable e) { getStdJobDescriptors().BUILD_GRAPH.setDoneAmount(0); throw e; } return; } } } }