File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
src/com/magento/idea/magento2plugin/php Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import com .intellij .codeInspection .ProblemHighlightType ;
4
4
import com .intellij .codeInspection .ProblemsHolder ;
5
+ import com .intellij .openapi .project .DumbService ;
5
6
import com .intellij .psi .PsiElement ;
6
7
import com .intellij .psi .PsiElementVisitor ;
7
8
import com .jetbrains .php .lang .documentation .phpdoc .psi .PhpDocComment ;
@@ -42,6 +43,7 @@ public void visitPhpMethodReference(MethodReference reference) {
42
43
if (!Settings .isEnabled (reference .getProject ())) {
43
44
return ;
44
45
}
46
+
45
47
PsiElement referencedElement = reference .resolve ();
46
48
47
49
if (referencedElement instanceof Method ) {
Original file line number Diff line number Diff line change 2
2
3
3
import com .intellij .json .psi .JsonFile ;
4
4
import com .intellij .json .psi .JsonObject ;
5
+ import com .intellij .openapi .project .DumbService ;
5
6
import com .intellij .openapi .project .Project ;
6
7
import com .intellij .openapi .vfs .VirtualFile ;
7
8
import com .intellij .psi .PsiDirectory ;
@@ -57,6 +58,10 @@ public <T extends MagentoComponent> Collection<T> getAllComponentsOfType(@NotNul
57
58
}
58
59
59
60
synchronized private Map <String , MagentoComponent > getComponents () {
61
+ if (DumbService .getInstance (project ).isDumb ()) {
62
+ return new HashMap <>();
63
+ }
64
+
60
65
if (cacheStartTime + CACHE_LIFE_TIME < System .currentTimeMillis ()) {
61
66
flushModules ();
62
67
loadModules ();
You can’t perform that action at this time.
0 commit comments