void (@NotNull InspectionToolWrapper<?,?> toolWrapper, @NotNull final AnalysisScope scope, @NotNull final GlobalInspectionContextForTests globalContext) { final String shortName = toolWrapper.getShortName(); final HighlightDisplayKey key = HighlightDisplayKey.find(shortName); if (key == null){ HighlightDisplayKey.register(shortName, toolWrapper.getDisplayName(), toolWrapper.getID()); } globalContext.doInspections(scope); do { UIUtil.dispatchAllInvocationEvents(); } while (!globalContext.isFinished()); }