InspectionProfileModifiableModel () { return new InspectionProfileModifiableModel(this) { @Override public @NotNull List<InspectionToolWrapper<?, ?>> getInspectionTools(PsiElement element) { return Collections.singletonList(myUnusedToolWrapper); } @Override public boolean isToolEnabled(@Nullable HighlightDisplayKey key, PsiElement element) { return key != null && Comparing.strEqual(key.toString(), UnusedDeclarationInspectionBase.SHORT_NAME); } }; }