@@ -45,18 +45,30 @@ public List<String> getEditableModuleNames() {
45
45
return getModuleNames (Package .VENDOR , true );
46
46
}
47
47
48
+ public List <String > getEditableThemeNames () {
49
+ return getThemeNames ("/" + Package .VENDOR + "/|/tests/|/test/" , true );
50
+ }
51
+
48
52
public List <String > getModuleNames () {
49
53
return getModuleNames ("/tests/|/test/" , false );
50
54
}
51
55
52
56
public List <String > getModuleNames (String filterPattern , boolean withinProject ) {
57
+ return getNames (filterPattern , withinProject , RegExUtil .Magento .MODULE_NAME );
58
+ }
59
+
60
+ public List <String > getThemeNames (String filterPattern , boolean withinProject ) {
61
+ return getNames (filterPattern , withinProject , RegExUtil .Magento .THEME_NAME );
62
+ }
63
+
64
+ public List <String > getNames (String filterPattern , boolean withinProject , String pattern ) {
53
65
FileBasedIndex index = FileBasedIndex
54
66
.getInstance ();
55
67
List <String > allModulesList = new ArrayList <>();
56
68
Collection <String > allModules = index .getAllKeys (ModuleNameIndex .KEY , project );
57
69
Pattern p = Pattern .compile (filterPattern );
58
70
for (String moduleName : allModules ) {
59
- if (!moduleName .matches (RegExUtil . Magento . MODULE_NAME )) {
71
+ if (!moduleName .matches (pattern )) {
60
72
continue ;
61
73
}
62
74
Collection <VirtualFile > files = index .getContainingFiles (ModuleNameIndex .KEY , moduleName , GlobalSearchScope .getScopeRestrictedByFileTypes (
0 commit comments