void (@NotNull PsiKeyword keyword) { super.visitKeyword(keyword); if (languageLevel.isAtLeast(LanguageLevel.JDK_1_9) && !languageLevel.isAtLeast(LanguageLevel.JDK_10)) { @PsiModifier.ModifierConstant String modifier = keyword.getText(); if (PsiKeyword.STATIC.equals(modifier) || PsiKeyword.TRANSITIVE.equals(modifier)) { PsiElement parent = keyword.getParent(); if (parent instanceof PsiModifierList) { PsiElement grand = parent.getParent(); if (grand instanceof PsiRequiresStatement && PsiJavaModule.JAVA_BASE.equals(((PsiRequiresStatement)grand).getModuleName())) { String message = JavaErrorBundle.message("module.unwanted.modifier.warn"); LocalQuickFix fix = QuickFixFactory.getInstance().createModifierListFix((PsiModifierList)parent, modifier, false, false); holder.registerProblem(keyword, message, fix); } } } } }