File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/com/magento/idea/magento2plugin/actions/context/xml Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ protected boolean isVisible(
3636 final @ NotNull PsiDirectory targetDirectory ,
3737 final PsiFile targetFile
3838 ) {
39+ final PsiDirectory configDir = moduleData .getConfigDir ();
40+ final PsiDirectory globalScopeDir = getGlobalScopeDir (targetDirectory );
41+
42+ if (configDir == null || globalScopeDir == null ) {
43+ return false ;
44+ }
3945 final List <String > allowedDirectories = Arrays .asList (
4046 Package .moduleBaseAreaDir ,
4147 Areas .adminhtml .toString (),
@@ -45,12 +51,6 @@ protected boolean isVisible(
4551 Areas .graphql .toString (),
4652 Areas .crontab .toString ()
4753 );
48- final PsiDirectory configDir = moduleData .getConfigDir ();
49- final PsiDirectory globalScopeDir = getGlobalScopeDir (targetDirectory );
50-
51- if (configDir == null || globalScopeDir == null ) {
52- return false ;
53- }
5454
5555 return allowedDirectories .contains (targetDirectory .getName ())
5656 && globalScopeDir .equals (configDir )
You can’t perform that action at this time.
0 commit comments