mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-196765 Good code red in a module.xml when referring an action defined in the same xml
This commit is contained in:
@@ -165,9 +165,9 @@ public class ActionOrGroupResolveConverter extends ResolvingConverter<ActionOrGr
|
||||
}
|
||||
|
||||
private static boolean processPlugins(Collection<IdeaPlugin> plugins, PairProcessor<String, ActionOrGroup> processor) {
|
||||
for (IdeaPlugin plugin: plugins) {
|
||||
for (IdeaPlugin plugin : plugins) {
|
||||
final Map<String, ActionOrGroup> forFile = collectForFile(plugin);
|
||||
for (Map.Entry<String, ActionOrGroup> entry: forFile.entrySet()) {
|
||||
for (Map.Entry<String, ActionOrGroup> entry : forFile.entrySet()) {
|
||||
if (!processor.process(entry.getKey(), entry.getValue())) return false;
|
||||
}
|
||||
}
|
||||
@@ -178,22 +178,22 @@ public class ActionOrGroupResolveConverter extends ResolvingConverter<ActionOrGr
|
||||
final XmlFile xmlFile = DomUtil.getFile(plugin);
|
||||
return CachedValuesManager.getCachedValue(xmlFile, () -> {
|
||||
Map<String, ActionOrGroup> result = new HashMap<>();
|
||||
for (Actions actions: plugin.getActions()) {
|
||||
for (Actions actions : plugin.getActions()) {
|
||||
collectRecursive(result, actions);
|
||||
}
|
||||
|
||||
return CachedValueProvider.Result.create(result, xmlFile);
|
||||
return CachedValueProvider.Result.create(result, DomManager.getDomManager(xmlFile.getProject()));
|
||||
});
|
||||
}
|
||||
|
||||
private static void collectRecursive(Map<String, ActionOrGroup> result, Actions actions) {
|
||||
for (Action action: actions.getActions()) {
|
||||
for (Action action : actions.getActions()) {
|
||||
final String name = getName(action);
|
||||
if (!StringUtil.isEmptyOrSpaces(name)) {
|
||||
result.put(name, action);
|
||||
}
|
||||
}
|
||||
for (Group group: actions.getGroups()) {
|
||||
for (Group group : actions.getGroups()) {
|
||||
final String name = getName(group);
|
||||
if (!StringUtil.isEmptyOrSpaces(name)) {
|
||||
result.put(name, group);
|
||||
|
||||
Reference in New Issue
Block a user