mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
[java] highlight the static initializers in unnamed classes
GitOrigin-RevId: 4552b7d57db98a2f9ddea85a89497fb3fdeac275
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c40178aaec
commit
461d751bc5
@@ -596,6 +596,12 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh
|
||||
if (!myHolder.hasErrorResults()) {
|
||||
add(HighlightClassUtil.checkThingNotAllowedInInterface(initializer, initializer.getContainingClass()));
|
||||
}
|
||||
if (!myHolder.hasErrorResults()) {
|
||||
if (initializer.getContainingClass() instanceof PsiUnnamedClass && HighlightingFeature.UNNAMED_CLASSES.isAvailable(initializer)) {
|
||||
add(HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(initializer).descriptionAndTooltip(
|
||||
JavaErrorBundle.message("text.initializers.are.not.allowed.in.unnamed.classes")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user