File tree Expand file tree Collapse file tree 2 files changed +20
-21
lines changed
src/com/magento/idea/magento2plugin/inspections/xml Expand file tree Collapse file tree 2 files changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -121,25 +121,21 @@ public void visitFile(final PsiFile file) {
121
121
file
122
122
);
123
123
124
- if (observerDisabledAttribute != null
125
- && observerDisabledAttribute .getValue () != null
126
- && observerDisabledAttribute .getValue ().equals ("true" )
127
- && modulesWithSameObserverName .isEmpty ()
128
- ) {
129
- problemsHolder .registerProblem (
130
- observerNameAttribute .getValueElement (),
131
- inspectionBundle .message (
132
- "inspection.observer.disabledObserverDoesNotExist"
133
- ),
134
- errorSeverity
135
- );
136
- }
137
-
138
124
if (observerDisabledAttribute != null
139
125
&& observerDisabledAttribute .getValue () != null
140
126
&& observerDisabledAttribute .getValue ().equals ("true" )
141
127
) {
128
+ if (modulesWithSameObserverName .isEmpty ()) {
129
+ problemsHolder .registerProblem (
130
+ observerNameAttribute .getValueElement (),
131
+ inspectionBundle .message (
132
+ "inspection.observer.disabledObserverDoesNotExist"
133
+ ),
134
+ errorSeverity
135
+ );
136
+ } else {
142
137
continue ;
138
+ }
143
139
}
144
140
145
141
for (final HashMap <String , String > moduleEntry :
Original file line number Diff line number Diff line change @@ -118,15 +118,18 @@ public void visitFile(final PsiFile file) {
118
118
if (pluginTypeDisabledAttribute != null
119
119
&& pluginTypeDisabledAttribute .getValue () != null
120
120
&& pluginTypeDisabledAttribute .getValue ().equals ("true" )
121
- && modulesWithSamePluginName .isEmpty ()
122
121
) {
123
- problemsHolder .registerProblem (
124
- pluginTypeNameAttribute .getValueElement (),
125
- inspectionBundle .message (
122
+ if (modulesWithSamePluginName .isEmpty ()) {
123
+ problemsHolder .registerProblem (
124
+ pluginTypeNameAttribute .getValueElement (),
125
+ inspectionBundle .message (
126
126
"inspection.plugin.disabledPluginDoesNotExist"
127
- ),
128
- errorSeverity
129
- );
127
+ ),
128
+ errorSeverity
129
+ );
130
+ } else {
131
+ continue ;
132
+ }
130
133
}
131
134
132
135
for (final Pair <String , String > moduleEntry : modulesWithSamePluginName ) {
You can’t perform that action at this time.
0 commit comments