diff --git a/src/com/magento/idea/magento2plugin/inspections/xml/ObserverDeclarationInspection.java b/src/com/magento/idea/magento2plugin/inspections/xml/ObserverDeclarationInspection.java index 35d102fd9..89c02fd4a 100644 --- a/src/com/magento/idea/magento2plugin/inspections/xml/ObserverDeclarationInspection.java +++ b/src/com/magento/idea/magento2plugin/inspections/xml/ObserverDeclarationInspection.java @@ -121,25 +121,21 @@ public void visitFile(final PsiFile file) { file ); - if (observerDisabledAttribute != null - && observerDisabledAttribute.getValue() != null - && observerDisabledAttribute.getValue().equals("true") - && modulesWithSameObserverName.isEmpty() - ) { - problemsHolder.registerProblem( - observerNameAttribute.getValueElement(), - inspectionBundle.message( - "inspection.observer.disabledObserverDoesNotExist" - ), - errorSeverity - ); - } - if (observerDisabledAttribute != null && observerDisabledAttribute.getValue() != null && observerDisabledAttribute.getValue().equals("true") ) { + if (modulesWithSameObserverName.isEmpty()) { + problemsHolder.registerProblem( + observerNameAttribute.getValueElement(), + inspectionBundle.message( + "inspection.observer.disabledObserverDoesNotExist" + ), + errorSeverity + ); + } else { continue; + } } for (final HashMap moduleEntry: diff --git a/src/com/magento/idea/magento2plugin/inspections/xml/PluginDeclarationInspection.java b/src/com/magento/idea/magento2plugin/inspections/xml/PluginDeclarationInspection.java index 99412796d..13bd807b5 100644 --- a/src/com/magento/idea/magento2plugin/inspections/xml/PluginDeclarationInspection.java +++ b/src/com/magento/idea/magento2plugin/inspections/xml/PluginDeclarationInspection.java @@ -118,15 +118,18 @@ public void visitFile(final PsiFile file) { if (pluginTypeDisabledAttribute != null && pluginTypeDisabledAttribute.getValue() != null && pluginTypeDisabledAttribute.getValue().equals("true") - && modulesWithSamePluginName.isEmpty() ) { - problemsHolder.registerProblem( - pluginTypeNameAttribute.getValueElement(), - inspectionBundle.message( + if (modulesWithSamePluginName.isEmpty()) { + problemsHolder.registerProblem( + pluginTypeNameAttribute.getValueElement(), + inspectionBundle.message( "inspection.plugin.disabledPluginDoesNotExist" - ), - errorSeverity - ); + ), + errorSeverity + ); + } else { + continue; + } } for (final Pair moduleEntry: modulesWithSamePluginName) {