File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/com/magento/idea/magento2plugin/actions/generation Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1818import org .jetbrains .annotations .NotNull ;
1919
2020public class NewBlockAction extends AnAction {
21+
2122 public static final String ACTION_NAME = "Magento 2 Block" ;
2223 public static final String ACTION_DESCRIPTION = "Create a new Magento 2 Block" ;
2324
@@ -26,23 +27,24 @@ public NewBlockAction() {
2627 }
2728
2829 @ Override
29- public void actionPerformed (@ NotNull final AnActionEvent event ) {
30+ public void actionPerformed (final @ NotNull AnActionEvent event ) {
3031 final DataContext dataContext = event .getDataContext ();
3132 final IdeView view = LangDataKeys .IDE_VIEW .getData (dataContext );
33+
3234 if (view == null ) {
3335 return ;
3436 }
3537
3638 final Project project = CommonDataKeys .PROJECT .getData (dataContext );
39+
3740 if (project == null ) {
3841 return ;
3942 }
40-
4143 final PsiDirectory directory = view .getOrChooseDirectory ();
44+
4245 if (directory == null ) {
4346 return ;
4447 }
45-
4648 NewBlockDialog .open (project , directory );
4749 }
4850
@@ -51,4 +53,3 @@ public boolean isDumbAware() {
5153 return false ;
5254 }
5355}
54-
You can’t perform that action at this time.
0 commit comments