@@ -45,18 +45,30 @@ public List<String> getEditableModuleNames() {
4545 return getModuleNames (Package .VENDOR , true );
4646 }
4747
48+ public List <String > getEditableThemeNames () {
49+ return getThemeNames ("/" + Package .VENDOR + "/|/tests/|/test/" , true );
50+ }
51+
4852 public List <String > getModuleNames () {
4953 return getModuleNames ("/tests/|/test/" , false );
5054 }
5155
5256 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 ) {
5365 FileBasedIndex index = FileBasedIndex
5466 .getInstance ();
5567 List <String > allModulesList = new ArrayList <>();
5668 Collection <String > allModules = index .getAllKeys (ModuleNameIndex .KEY , project );
5769 Pattern p = Pattern .compile (filterPattern );
5870 for (String moduleName : allModules ) {
59- if (!moduleName .matches (RegExUtil . Magento . MODULE_NAME )) {
71+ if (!moduleName .matches (pattern )) {
6072 continue ;
6173 }
6274 Collection <VirtualFile > files = index .getContainingFiles (ModuleNameIndex .KEY , moduleName , GlobalSearchScope .getScopeRestrictedByFileTypes (
0 commit comments