Skip to content

Commit a284fcf

Browse files
author
Vitaliy Boyko
committed
Adjusted Magento version resolving and refactoring
1 parent dc0d014 commit a284fcf

File tree

60 files changed

+311
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+311
-233
lines changed

Diff for: resources/META-INF/plugin.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
</actions>
8181

8282
<extensions defaultExtensionNs="com.intellij">
83-
<directoryProjectGenerator implementation="com.magento.idea.magento2plugin.generation.MagentoModuleGenerator"/>
84-
<projectTemplatesFactory implementation="com.magento.idea.magento2plugin.generation.MagentoTemplatesFactory"/>
83+
<directoryProjectGenerator implementation="com.magento.idea.magento2plugin.generation.php.MagentoModuleGenerator"/>
84+
<projectTemplatesFactory implementation="com.magento.idea.magento2plugin.generation.php.MagentoTemplatesFactory"/>
8585

8686
<projectService serviceImplementation="com.magento.idea.magento2plugin.project.Settings"/>
8787

@@ -109,10 +109,10 @@
109109
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.js.RequireJsIndex" />
110110
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.js.MagentoLibJsIndex" />
111111

112-
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.php.linemarker.PluginLineMarkerProvider"/>
113-
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.php.linemarker.PluginTargetLineMarkerProvider"/>
114-
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.php.linemarker.ClassConfigurationLineMarkerProvider"/>
115-
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.php.linemarker.WebApiLineMarkerProvider"/>
112+
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.linemarker.php.PluginLineMarkerProvider"/>
113+
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.linemarker.php.PluginTargetLineMarkerProvider"/>
114+
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.linemarker.php.ClassConfigurationLineMarkerProvider"/>
115+
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.linemarker.php.WebApiLineMarkerProvider"/>
116116

117117
<directoryProjectConfigurator implementation="com.magento.idea.magento2plugin.project.ProjectDetector"/>
118118

Diff for: resources/META-INF/withJsGraphQl.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<idea-plugin>
22
<extensions defaultExtensionNs="com.intellij">
33
<fileBasedIndex implementation="com.magento.idea.magento2plugin.stubs.indexes.graphql.GraphQlResolverIndex" />
4-
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.php.linemarker.GraphQlResolverUsageLineMarkerProvider"/>
5-
<codeInsight.lineMarkerProvider language="GraphQL" implementationClass="com.magento.idea.magento2plugin.graphql.linemarker.GraphQlResolverClassLineMarkerProvider"/>
4+
<codeInsight.lineMarkerProvider language="PHP" implementationClass="com.magento.idea.magento2plugin.linemarker.php.GraphQlResolverUsageLineMarkerProvider"/>
5+
<codeInsight.lineMarkerProvider language="GraphQL" implementationClass="com.magento.idea.magento2plugin.linemarker.graphql.GraphQlResolverClassLineMarkerProvider"/>
66
<localInspection language="PHP" groupPath="PHP"
77
shortName="GraphQlResolverInspection" displayName="Graphql must implements ResolverInterface"
88
groupName="Magento 2"

Diff for: resources/magento2/validation.properties

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ validator.module.noSuchModule=No such module {0}
99
validator.file.alreadyExists={0} already exists
1010
validator.file.cantBeCreated={0} can't be created
1111
validator.class.alreadyDeclared={0} already declared in the target module
12+
validator.magentoVersionInvalid=Please specify valid Magento version or use 'any' keyword as default

Diff for: src/com/magento/idea/magento2plugin/MagentoIcons.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@
55
package com.magento.idea.magento2plugin;
66

77
import com.intellij.openapi.util.IconLoader;
8-
98
import javax.swing.*;
109

11-
/**
12-
* Created by dkvashnin on 11/14/15.
13-
*/
1410
public class MagentoIcons {
15-
public static final Icon WEB_API = IconLoader.getIcon("icons/webapi.png");
11+
public static final Icon WEB_API = IconLoader.getIcon("/icons/webapi.png");
1612
public static final Icon MODULE = IconLoader.getIcon("/icons/module.png");
1713
}

Diff for: src/com/magento/idea/magento2plugin/actions/generation/dialog/validator/CreateAPluginDialogValidator.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import com.intellij.openapi.project.Project;
88
import com.magento.idea.magento2plugin.actions.generation.dialog.CreateAPluginDialog;
99
import com.magento.idea.magento2plugin.indexes.ModuleIndex;
10-
import com.magento.idea.magento2plugin.util.Regex;
10+
import com.magento.idea.magento2plugin.util.RegExUtil;
1111
import com.magento.idea.magento2plugin.bundles.ValidatorBundle;
1212
import javax.swing.*;
1313
import java.util.List;
@@ -42,7 +42,7 @@ public boolean validate(Project project)
4242
return false;
4343
}
4444

45-
if (!pluginClassName.matches(Regex.ALPHANUMERIC)) {
45+
if (!pluginClassName.matches(RegExUtil.ALPHANUMERIC)) {
4646
String errorMessage = validatorBundle.message("validator.alphaNumericCharacters", "Plugin Class Name");
4747
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
4848

@@ -64,7 +64,7 @@ public boolean validate(Project project)
6464
return false;
6565
}
6666

67-
if (!pluginDirectory.matches(Regex.DIRECTORY)) {
67+
if (!pluginDirectory.matches(RegExUtil.DIRECTORY)) {
6868
String errorMessage = validatorBundle.message("validator.directory.isNotValid", "Plugin Directory");
6969
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
7070

@@ -79,7 +79,7 @@ public boolean validate(Project project)
7979
return false;
8080
}
8181

82-
if (!pluginName.matches(Regex.IDENTIFIER)) {
82+
if (!pluginName.matches(RegExUtil.IDENTIFIER)) {
8383
String errorMessage = validatorBundle.message("validator.identifier", "Plugin Name");
8484
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
8585

@@ -94,7 +94,7 @@ public boolean validate(Project project)
9494
return false;
9595
}
9696

97-
if (!sortOrder.matches(Regex.NUMERIC)) {
97+
if (!sortOrder.matches(RegExUtil.NUMERIC)) {
9898
String errorMessage = validatorBundle.message("validator.onlyNumbers", "Sort Order");
9999
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
100100

Diff for: src/com/magento/idea/magento2plugin/actions/generation/dialog/validator/CreateAnObserverDialogValidator.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import com.intellij.openapi.project.Project;
88
import com.magento.idea.magento2plugin.actions.generation.dialog.CreateAnObserverDialog;
99
import com.magento.idea.magento2plugin.indexes.ModuleIndex;
10-
import com.magento.idea.magento2plugin.util.Regex;
10+
import com.magento.idea.magento2plugin.util.RegExUtil;
1111
import com.magento.idea.magento2plugin.bundles.ValidatorBundle;
1212
import javax.swing.*;
1313
import java.util.List;
@@ -40,7 +40,7 @@ public boolean validate(Project project)
4040
return false;
4141
}
4242

43-
if (!observerClassName.matches(Regex.ALPHANUMERIC)) {
43+
if (!observerClassName.matches(RegExUtil.ALPHANUMERIC)) {
4444
String errorMessage = validatorBundle.message("validator.alphaNumericCharacters", "Observer Class Name");
4545
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
4646

@@ -63,7 +63,7 @@ public boolean validate(Project project)
6363
return false;
6464
}
6565

66-
if (!observerDirectory.matches(Regex.DIRECTORY)) {
66+
if (!observerDirectory.matches(RegExUtil.DIRECTORY)) {
6767
String errorMessage = validatorBundle.message("validator.directory.isNotValid", "Observer Directory");
6868
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
6969

Diff for: src/com/magento/idea/magento2plugin/actions/generation/dialog/validator/NewBlockValidator.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package com.magento.idea.magento2plugin.actions.generation.dialog.validator;
66

77
import com.magento.idea.magento2plugin.actions.generation.dialog.NewBlockDialog;
8-
import com.magento.idea.magento2plugin.util.Regex;
8+
import com.magento.idea.magento2plugin.util.RegExUtil;
99
import com.magento.idea.magento2plugin.bundles.ValidatorBundle;
1010
import javax.swing.*;
1111

@@ -38,7 +38,7 @@ public boolean validate()
3838
return false;
3939
}
4040

41-
if (!moduleName.matches(Regex.ALPHANUMERIC)) {
41+
if (!moduleName.matches(RegExUtil.ALPHANUMERIC)) {
4242
String errorMessage = validatorBundle.message("validator.alphaNumericCharacters", "Block Name");
4343
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
4444

@@ -60,7 +60,7 @@ public boolean validate()
6060
return false;
6161
}
6262

63-
if (!pluginDirectory.matches(Regex.DIRECTORY)) {
63+
if (!pluginDirectory.matches(RegExUtil.DIRECTORY)) {
6464
String errorMessage = validatorBundle.message("validator.directory.isNotValid", "Block Directory");
6565
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
6666

Diff for: src/com/magento/idea/magento2plugin/actions/generation/dialog/validator/NewGraphQlResolverValidator.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package com.magento.idea.magento2plugin.actions.generation.dialog.validator;
66

77
import com.magento.idea.magento2plugin.actions.generation.dialog.NewGraphQlResolverDialog;
8-
import com.magento.idea.magento2plugin.util.Regex;
8+
import com.magento.idea.magento2plugin.util.RegExUtil;
99
import com.magento.idea.magento2plugin.bundles.ValidatorBundle;
1010

1111
import javax.swing.*;
@@ -39,7 +39,7 @@ public boolean validate()
3939
return false;
4040
}
4141

42-
if (!resolverClassName.matches(Regex.ALPHANUMERIC)) {
42+
if (!resolverClassName.matches(RegExUtil.ALPHANUMERIC)) {
4343
String errorMessage = validatorBundle.message("validator.alphaNumericCharacters", "GraphQL Resolver Name");
4444
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
4545

@@ -61,7 +61,7 @@ public boolean validate()
6161
return false;
6262
}
6363

64-
if (!graphQlResolverDirectory.matches(Regex.DIRECTORY)) {
64+
if (!graphQlResolverDirectory.matches(RegExUtil.DIRECTORY)) {
6565
String errorMessage = validatorBundle.message("validator.directory.isNotValid", "GraphQL Resolver Directory");
6666
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
6767

Diff for: src/com/magento/idea/magento2plugin/actions/generation/dialog/validator/NewModuleDialogValidator.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import com.magento.idea.magento2plugin.actions.generation.dialog.NewModuleDialog;
88
import com.magento.idea.magento2plugin.bundles.ValidatorBundle;
9-
import com.magento.idea.magento2plugin.util.Regex;
9+
import com.magento.idea.magento2plugin.util.RegExUtil;
1010
import javax.swing.*;
1111

1212
public class NewModuleDialogValidator {
@@ -37,7 +37,7 @@ public boolean validate()
3737
return false;
3838
}
3939

40-
if (!packageName.matches(Regex.ALPHANUMERIC)) {
40+
if (!packageName.matches(RegExUtil.ALPHANUMERIC)) {
4141
String errorMessage = validatorBundle.message("validator.alphaNumericCharacters", "Package Name");
4242
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
4343

@@ -59,7 +59,7 @@ public boolean validate()
5959
return false;
6060
}
6161

62-
if (!moduleName.matches(Regex.ALPHANUMERIC)) {
62+
if (!moduleName.matches(RegExUtil.ALPHANUMERIC)) {
6363
String errorMessage = validatorBundle.message("validator.alphaNumericCharacters", "Module Name");
6464
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
6565

Diff for: src/com/magento/idea/magento2plugin/actions/generation/dialog/validator/NewViewModelValidator.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package com.magento.idea.magento2plugin.actions.generation.dialog.validator;
66

77
import com.magento.idea.magento2plugin.actions.generation.dialog.NewViewModelDialog;
8-
import com.magento.idea.magento2plugin.util.Regex;
8+
import com.magento.idea.magento2plugin.util.RegExUtil;
99
import com.magento.idea.magento2plugin.bundles.ValidatorBundle;
1010

1111
import javax.swing.*;
@@ -39,7 +39,7 @@ public boolean validate()
3939
return false;
4040
}
4141

42-
if (!moduleName.matches(Regex.ALPHANUMERIC)) {
42+
if (!moduleName.matches(RegExUtil.ALPHANUMERIC)) {
4343
String errorMessage = validatorBundle.message("validator.alphaNumericCharacters", "View Model Name");
4444
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
4545

@@ -61,7 +61,7 @@ public boolean validate()
6161
return false;
6262
}
6363

64-
if (!pluginDirectory.matches(Regex.DIRECTORY)) {
64+
if (!pluginDirectory.matches(RegExUtil.DIRECTORY)) {
6565
String errorMessage = validatorBundle.message("validator.directory.isNotValid", "View Model Directory");
6666
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
6767

Diff for: src/com/magento/idea/magento2plugin/actions/generation/dialog/validator/OverrideClassByAPreferenceDialogValidator.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import com.intellij.openapi.project.Project;
88
import com.magento.idea.magento2plugin.actions.generation.dialog.OverrideClassByAPreferenceDialog;
99
import com.magento.idea.magento2plugin.indexes.ModuleIndex;
10-
import com.magento.idea.magento2plugin.util.Regex;
10+
import com.magento.idea.magento2plugin.util.RegExUtil;
1111
import com.magento.idea.magento2plugin.bundles.ValidatorBundle;
1212
import javax.swing.*;
1313
import java.util.List;
@@ -40,7 +40,7 @@ public boolean validate(Project project)
4040
return false;
4141
}
4242

43-
if (!preferenceClassName.matches(Regex.ALPHANUMERIC)) {
43+
if (!preferenceClassName.matches(RegExUtil.ALPHANUMERIC)) {
4444
String errorMessage = validatorBundle.message("validator.alphaNumericCharacters", "Preference Class");
4545
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
4646

@@ -62,7 +62,7 @@ public boolean validate(Project project)
6262
return false;
6363
}
6464

65-
if (!preferenceDirectory.matches(Regex.DIRECTORY)) {
65+
if (!preferenceDirectory.matches(RegExUtil.DIRECTORY)) {
6666
String errorMessage = validatorBundle.message("validator.directory.isNotValid", "Preference Directory");
6767
JOptionPane.showMessageDialog(null, errorMessage, errorTitle, JOptionPane.ERROR_MESSAGE);
6868
return false;

Diff for: src/com/magento/idea/magento2plugin/actions/generation/generator/PluginDiXmlGenerator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import com.magento.idea.magento2plugin.actions.generation.generator.util.GetCodeTemplate;
1919
import com.magento.idea.magento2plugin.actions.generation.generator.util.XmlFilePositionUtil;
2020
import com.magento.idea.magento2plugin.magento.files.ModuleDiXml;
21-
import com.magento.idea.magento2plugin.xml.XmlPsiTreeUtil;
21+
import com.magento.idea.magento2plugin.util.xml.XmlPsiTreeUtil;
2222
import org.jetbrains.annotations.NotNull;
2323
import java.io.IOException;
2424
import java.util.*;

Diff for: src/com/magento/idea/magento2plugin/actions/generation/generator/PreferenceDiXmlGenerator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import com.magento.idea.magento2plugin.actions.generation.generator.util.GetCodeTemplate;
1818
import com.magento.idea.magento2plugin.actions.generation.generator.util.XmlFilePositionUtil;
1919
import com.magento.idea.magento2plugin.magento.files.ModuleDiXml;
20-
import com.magento.idea.magento2plugin.xml.XmlPsiTreeUtil;
20+
import com.magento.idea.magento2plugin.util.xml.XmlPsiTreeUtil;
2121
import org.jetbrains.annotations.NotNull;
2222
import java.io.IOException;
2323
import java.util.Collection;

Diff for: src/com/magento/idea/magento2plugin/completion/provider/PhpClassCompletionProvider.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
import com.jetbrains.php.PhpIndex;
1717
import com.jetbrains.php.lang.psi.elements.PhpClass;
1818
import com.jetbrains.php.lang.psi.elements.PhpNamespace;
19-
import com.magento.idea.magento2plugin.php.util.PhpRegex;
19+
import com.magento.idea.magento2plugin.util.RegExUtil;
2020
import gnu.trove.THashSet;
2121
import org.jetbrains.annotations.NotNull;
22-
2322
import java.util.ArrayList;
2423
import java.util.Collection;
2524
import java.util.regex.Matcher;
@@ -29,7 +28,7 @@
2928
public class PhpClassCompletionProvider extends CompletionProvider<CompletionParameters> {
3029

3130
final private static String PHP_CLASS_COMPLETION_REGEX
32-
= "\\\\?" + PhpRegex.FQN + "\\\\?";
31+
= "\\\\?" + RegExUtil.PhpRegex.FQN + "\\\\?";
3332

3433
@Override
3534
protected void addCompletions(@NotNull CompletionParameters parameters,

Diff for: src/com/magento/idea/magento2plugin/generation/MagentoModuleGenerator.java renamed to src/com/magento/idea/magento2plugin/generation/php/MagentoModuleGenerator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
package com.magento.idea.magento2plugin.generation;
5+
package com.magento.idea.magento2plugin.generation.php;
66

77
import com.intellij.ide.util.projectWizard.WebProjectTemplate;
88
import com.intellij.openapi.application.ApplicationManager;

Diff for: src/com/magento/idea/magento2plugin/generation/MagentoProjectGeneratorSettings.java renamed to src/com/magento/idea/magento2plugin/generation/php/MagentoProjectGeneratorSettings.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
package com.magento.idea.magento2plugin.generation;
5+
package com.magento.idea.magento2plugin.generation.php;
66

77
import com.magento.idea.magento2plugin.project.Settings;
88
import java.util.List;

Diff for: src/com/magento/idea/magento2plugin/generation/MagentoProjectPeer.java renamed to src/com/magento/idea/magento2plugin/generation/php/MagentoProjectPeer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
package com.magento.idea.magento2plugin.generation;
5+
package com.magento.idea.magento2plugin.generation.php;
66

77
import com.intellij.ide.util.projectWizard.SettingsStep;
88
import com.intellij.openapi.ui.ValidationInfo;

Diff for: src/com/magento/idea/magento2plugin/generation/MagentoTemplatesFactory.java renamed to src/com/magento/idea/magento2plugin/generation/php/MagentoTemplatesFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
package com.magento.idea.magento2plugin.generation;
5+
package com.magento.idea.magento2plugin.generation.php;
66

77
import com.intellij.ide.util.projectWizard.WizardContext;
88
import com.intellij.platform.ProjectTemplate;

Diff for: src/com/magento/idea/magento2plugin/generation/NewModuleForm.form renamed to src/com/magento/idea/magento2plugin/generation/php/NewModuleForm.form

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.magento.idea.magento2plugin.generation.NewModuleForm">
2+
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.magento.idea.magento2plugin.generation.php.NewModuleForm">
33
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
44
<margin top="10" left="10" bottom="10" right="10"/>
55
<constraints>

Diff for: src/com/magento/idea/magento2plugin/generation/NewModuleForm.java renamed to src/com/magento/idea/magento2plugin/generation/php/NewModuleForm.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
package com.magento.idea.magento2plugin.generation;
5+
package com.magento.idea.magento2plugin.generation.php;
66

77
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
88
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
@@ -16,7 +16,7 @@
1616
import com.intellij.openapi.vfs.VirtualFile;
1717
import com.intellij.platform.ProjectGeneratorPeer;
1818
import com.intellij.ui.DocumentAdapter;
19-
import com.magento.idea.magento2plugin.generation.validator.NewModuleFormValidator;
19+
import com.magento.idea.magento2plugin.generation.php.validator.NewModuleFormValidator;
2020
import com.magento.idea.magento2plugin.magento.packages.Package;
2121
import com.magento.idea.magento2plugin.project.Settings;
2222
import com.magento.idea.magento2plugin.util.CamelCaseToHyphen;

Diff for: src/com/magento/idea/magento2plugin/generation/validator/NewModuleFormValidator.java renamed to src/com/magento/idea/magento2plugin/generation/php/validator/NewModuleFormValidator.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
package com.magento.idea.magento2plugin.generation.validator;
5+
package com.magento.idea.magento2plugin.generation.php.validator;
66

7-
import com.magento.idea.magento2plugin.generation.NewModuleForm;
7+
import com.magento.idea.magento2plugin.generation.php.NewModuleForm;
88
import com.magento.idea.magento2plugin.bundles.ValidatorBundle;
9-
import com.magento.idea.magento2plugin.util.Regex;
9+
import com.magento.idea.magento2plugin.util.RegExUtil;
1010
import com.magento.idea.magento2plugin.util.magento.MagentoBasePathUtil;
1111

1212
public class NewModuleFormValidator {
@@ -33,7 +33,7 @@ public String validate()
3333
return validatorBundle.message("validator.notEmpty", "Package Name");
3434
}
3535

36-
if (!packageName.matches(Regex.ALPHANUMERIC)) {
36+
if (!packageName.matches(RegExUtil.ALPHANUMERIC)) {
3737
return validatorBundle.message("validator.alphaNumericCharacters", "Package Name");
3838
}
3939

@@ -46,7 +46,7 @@ public String validate()
4646
return validatorBundle.message("validator.notEmpty", "Module Name");
4747
}
4848

49-
if (!moduleName.matches(Regex.ALPHANUMERIC)) {
49+
if (!moduleName.matches(RegExUtil.ALPHANUMERIC)) {
5050
return validatorBundle.message("validator.alphaNumericCharacters", "Module Name");
5151
}
5252

0 commit comments

Comments
 (0)