Skip to content

Commit c3e4eed

Browse files
author
Sergiy Zhovnir
committed
#issue-57 Added requested changes
1 parent fd980d5 commit c3e4eed

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/com/magento/idea/magento2plugin/actions/generation/dialog/validator/NewCronjobValidator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public class NewCronjobValidator {
2121
private ValidatorBundle validatorBundle;
2222
private CommonBundle commonBundle;
2323
private GetPhpClassByFQN getPhpClassByFQN;
24-
private CommonBundle commonBundle;
2524

2625
public static NewCronjobValidator getInstance() {
2726
if (null == INSTANCE) {

src/com/magento/idea/magento2plugin/actions/generation/generator/ModuleControllerClassGenerator.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.magento.idea.magento2plugin.actions.generation.data.ControllerFileData;
1616
import com.magento.idea.magento2plugin.actions.generation.generator.util.DirectoryGenerator;
1717
import com.magento.idea.magento2plugin.actions.generation.generator.util.FileFromTemplateGenerator;
18+
import com.magento.idea.magento2plugin.bundles.CommonBundle;
1819
import com.magento.idea.magento2plugin.bundles.ValidatorBundle;
1920
import com.magento.idea.magento2plugin.indexes.ModuleIndex;
2021
import com.magento.idea.magento2plugin.magento.files.Controller;
@@ -38,6 +39,7 @@ public class ModuleControllerClassGenerator extends FileGenerator {
3839
private ControllerFileData controllerFileData;
3940
private Project project;
4041
private ValidatorBundle validatorBundle;
42+
private CommonBundle commonBundle;
4143
private final GetFirstClassOfFile getFirstClassOfFile;
4244
private final DirectoryGenerator directoryGenerator;
4345
private final FileFromTemplateGenerator fileFromTemplateGenerator;
@@ -50,6 +52,7 @@ public ModuleControllerClassGenerator(@NotNull ControllerFileData controllerFile
5052
this.fileFromTemplateGenerator = FileFromTemplateGenerator.getInstance(project);
5153
this.getFirstClassOfFile = GetFirstClassOfFile.getInstance();
5254
this.validatorBundle = new ValidatorBundle();
55+
this.commonBundle = new CommonBundle();
5356
}
5457

5558
public PsiFile generate(String actionName) {
@@ -63,7 +66,7 @@ public PsiFile generate(String actionName) {
6366
JOptionPane.showMessageDialog(
6467
null,
6568
errorMessage,
66-
"Error",
69+
commonBundle.message("common.error"),
6770
JOptionPane.ERROR_MESSAGE
6871
);
6972

@@ -77,7 +80,7 @@ public PsiFile generate(String actionName) {
7780
JOptionPane.showMessageDialog(
7881
null,
7982
errorMessage,
80-
"Error",
83+
commonBundle.message("common.error"),
8184
JOptionPane.ERROR_MESSAGE
8285
);
8386

0 commit comments

Comments
 (0)