src/java/de/uapcore/lightpit/ModuleManager.java

changeset 11
737ab27e37b3
parent 10
89e3e6e28b69
child 18
a94b172c3a93
--- a/src/java/de/uapcore/lightpit/ModuleManager.java	Sat Dec 16 20:19:28 2017 +0100
+++ b/src/java/de/uapcore/lightpit/ModuleManager.java	Sun Dec 17 01:45:28 2017 +0100
@@ -107,8 +107,9 @@
         }        
     }
     
-    private void addModuleToMenu(LightPITModule moduleInfo) {
+    private void addModuleToMenu(String moduleClassName, LightPITModule moduleInfo) {
         final Menu menu = new Menu(
+                moduleClassName,
                 new ResourceKey(moduleInfo.bundleBaseName(), moduleInfo.menuKey()),
                 moduleInfo.modulePath()
         );
@@ -118,7 +119,9 @@
     private void handleServletRegistration(String name, Registration reg) {
         final Optional<LightPITModule> moduleInfo = getModuleInfo(reg);
         if (moduleInfo.isPresent()) {
-            addModuleToMenu(moduleInfo.get());
+            
+            // TODO: remove this call and add the module to some dependency resolver, first
+            addModuleToMenu(reg.getClassName(), moduleInfo.get());
             
             LOG.info("Module detected: {}", name);
         } else {

mercurial