File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
src/com/magento/idea/magento2plugin/actions/generation Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 17
17
import com .magento .idea .magento2plugin .actions .generation .dialog .NewCronjobDialog ;
18
18
import org .jetbrains .annotations .NotNull ;
19
19
20
- @ SuppressWarnings ({"PMD.FieldNamingConventions" , "PMD.OnlyOneReturn" })
21
20
public class NewCronjobAction extends AnAction {
21
+
22
22
public static String ACTION_NAME = "Magento 2 Cron Job" ;
23
23
public static String ACTION_DESCRIPTION = "Create a new Magento 2 Cron Job" ;
24
24
@@ -34,17 +34,16 @@ public void actionPerformed(final @NotNull AnActionEvent event) {
34
34
if (view == null ) {
35
35
return ;
36
36
}
37
-
38
37
final Project project = CommonDataKeys .PROJECT .getData (dataContext );
38
+
39
39
if (project == null ) {
40
40
return ;
41
41
}
42
-
43
42
final PsiDirectory directory = view .getOrChooseDirectory ();
43
+
44
44
if (directory == null ) {
45
45
return ;
46
46
}
47
-
48
47
NewCronjobDialog .open (project , directory );
49
48
}
50
49
Original file line number Diff line number Diff line change 26
26
import com .magento .idea .magento2plugin .ui .FilteredComboBox ;
27
27
import com .magento .idea .magento2plugin .util .CamelCaseToSnakeCase ;
28
28
import com .magento .idea .magento2plugin .util .magento .GetModuleNameByDirectoryUtil ;
29
+ import org .jetbrains .annotations .NotNull ;
30
+
29
31
import java .awt .event .ActionEvent ;
30
32
import java .awt .event .FocusEvent ;
31
33
import java .awt .event .FocusListener ;
@@ -117,7 +119,7 @@ public class NewCronjobDialog extends AbstractDialog {
117
119
* @param project Project
118
120
* @param directory Directory
119
121
*/
120
- public NewCronjobDialog (final Project project , final PsiDirectory directory ) {
122
+ public NewCronjobDialog (final @ NotNull Project project , final @ NotNull PsiDirectory directory ) {
121
123
super ();
122
124
this .project = project ;
123
125
this .moduleName = GetModuleNameByDirectoryUtil .execute (directory , project );
@@ -246,11 +248,6 @@ public String getCronjobScheduleConfigPath() {
246
248
return this .configPathField .getText ().trim ();
247
249
}
248
250
249
- @ Override
250
- protected void onCancel () {
251
- dispose ();
252
- }
253
-
254
251
private void createUIComponents () {
255
252
final List <String > cronGroups = CronGroupIndex .getInstance (project ).getGroups ();
256
253
You can’t perform that action at this time.
0 commit comments