Icon (@NotNull InspectionToolWrapper tool) { Icon icon = null; final Language language = Language.findLanguageByID(tool.getLanguage()); if (language != null) { final LanguageFileType fileType = language.getAssociatedFileType(); if (fileType != null) { icon = fileType.getIcon(); } } if (icon == null) { icon = UnknownFileType.INSTANCE.getIcon(); } assert icon != null; return icon; }