void (@NotNull List<Tools> globalTools, @NotNull List<Tools> localTools, @NotNull GlobalInspectionContext context) { if (globalTools.stream().anyMatch(tools -> { InspectionProfileEntry tool = tools.getTool().getTool(); return tool instanceof GlobalInspectionTool && ((GlobalInspectionTool)tool).isGraphNeeded(); })) { getEntryPointsManager(context.getRefManager()).resolveEntryPoints(context.getRefManager()); } // UnusedDeclarationInspection should run first for (int i = 0; i < globalTools.size(); i++) { InspectionToolWrapper<?,?> toolWrapper = globalTools.get(i).getTool(); if (UnusedDeclarationInspectionBase.SHORT_NAME.equals(toolWrapper.getShortName())) { Collections.swap(globalTools, i, 0); break; } } }