void (@NotNull List<? super Tools> outGlobalTools, @NotNull List<? super Tools> outLocalTools, @NotNull List<? super Tools> outGlobalSimpleTools, @NotNull Tools currentTools, @NotNull InspectionToolWrapper<?,?> toolWrapper) { if (toolWrapper instanceof LocalInspectionToolWrapper) { outLocalTools.add(currentTools); } else if (toolWrapper instanceof GlobalInspectionToolWrapper) { if (toolWrapper.getTool() instanceof GlobalSimpleInspectionTool) { outGlobalSimpleTools.add(currentTools); } else if (toolWrapper.getTool() instanceof GlobalInspectionTool) { outGlobalTools.add(currentTools); } else { throw new RuntimeException("unknown global tool " + toolWrapper); } } else { throw new RuntimeException("unknown tool " + toolWrapper); } }