mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspections i18n: add warning about non-localized groupName
GitOrigin-RevId: 9c0ac3afa44dbc626c0e3b9bced1a7492f942afc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0cb372451c
commit
ad97258c09
@@ -78,13 +78,20 @@ public class PluginXmlI18nInspection extends DevKitPluginXmlInspectionBase {
|
||||
if (implementationClass == null || implementationClass.getStringValue() == null) {
|
||||
return;
|
||||
}
|
||||
GenericAttributeValue displayNameAttr = getAttribute(element, "displayName");
|
||||
if (displayNameAttr != null && displayNameAttr.getStringValue() != null) {
|
||||
holder.createProblem(element, ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
DevKitBundle.message("inspections.plugin.xml.i18n.inspection.tag.family.name"),
|
||||
null,
|
||||
new InspectionI18NQuickFix());
|
||||
}
|
||||
checkInspectionDisplayName(holder, element, "displayName", new InspectionI18NQuickFix());
|
||||
checkInspectionDisplayName(holder, element, "groupName", null);
|
||||
//checkInspectionDisplayName(holder, element, "groupPath", null);
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkInspectionDisplayName(DomElementAnnotationHolder holder,
|
||||
DomElement element,
|
||||
String attributeName, InspectionI18NQuickFix fix) {
|
||||
GenericAttributeValue displayNameAttr = getAttribute(element, attributeName);
|
||||
if (displayNameAttr != null && displayNameAttr.getStringValue() != null) {
|
||||
holder.createProblem(element,
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
DevKitBundle.message("inspections.plugin.xml.i18n.inspection.tag.family.name", attributeName), null, fix);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +200,7 @@ public class PluginXmlI18nInspection extends DevKitPluginXmlInspectionBase {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return DevKitBundle.message("inspections.plugin.xml.i18n.inspection.tag.family.name");
|
||||
return DevKitBundle.message("inspections.plugin.xml.i18n.inspection.tag.family.name", "displayName");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user