Skip to content

Commit cfd6273

Browse files
864: Code refactoring
1 parent b537b45 commit cfd6273

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/com/magento/idea/magento2plugin/actions/generation/NewBlockAction.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import org.jetbrains.annotations.NotNull;
1919

2020
public 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-

0 commit comments

Comments
 (0)