@@ -549,13 +549,13 @@ else if (existingChild != null) {
549549 if (childInfo != null && info .getPriority () == childInfo .getPriority ())
550550 {
551551 log .warn ("ShadowMenu: menu item already exists:\n " + //
552- "\t existing: " + childInfo + "\n " + //
553- "\t ignored: " + info );
552+ "\t existing: " + details ( childInfo ) + "\n " + //
553+ "\t ignored: " + details ( info ) );
554554 }
555555 else {
556556 log .debug ("ShadowMenu: higher-priority menu item already exists:\n " +
557- "\t existing: " + childInfo + "\n " + //
558- "\t ignored: " + info );
557+ "\t existing: " + details ( childInfo ) + "\n " + //
558+ "\t ignored: " + details ( info ) );
559559 }
560560 }
561561 }
@@ -566,6 +566,21 @@ private boolean isLeaf(final int depth, final MenuPath path) {
566566 return depth == path .size () - 1 ;
567567 }
568568
569+ private String details (final ModuleInfo info ) {
570+ if (info == null ) return "<null>" ;
571+ String className , classLocation ;
572+ try {
573+ final Class <?> c = info .loadDelegateClass ();
574+ className = c .getName ();
575+ classLocation = ClassUtils .getLocation (c ).toString ();
576+ }
577+ catch (final ClassNotFoundException exc ) {
578+ className = info .getDelegateClassName ();
579+ classLocation = "<invalid>" ;
580+ }
581+ return info .getMenuPath () + " : " + className + " [" + classLocation + "]" ;
582+ }
583+
569584 private ShadowMenu getMenu (final MenuPath menuPath , final int index ) {
570585 final MenuEntry entry = menuPath .get (index );
571586
0 commit comments