=== modified file 'rules/annotations/menu_scoping.rules'
--- rules/annotations/menu_scoping.rules	2018-12-20 18:16:17 +0000
+++ rules/annotations/menu_scoping.rules	2020-03-19 19:42:27 +0000
@@ -89,6 +89,11 @@
    <variable name="parentId"    type="java.lang.Long" />
    <variable name="defRef"      type="com.goldencode.ast.Aast" />
 
+   <!-- Map menus, submenus, menu items to their javanames -->
+   <variable name="keys_jnames" type="java.util.Map" />
+   <variable name="menukey"     type="java.lang.String" />
+   <variable name="jname"       type="java.lang.String" />
+    
    <!--
       Map of unqualified MENU-ITEMs to their resolved MENUs,
       the map key is MENU-ITEM and the value is DEFINE MENU Ast
@@ -119,10 +124,11 @@
          <return    name="cur"   type="java.lang.String" />
           
          <rule>true
-            <action>parnt = sm_menus.get(sm)</action>
+            <action>parnt = sm_menus.get(sm.toLowerCase())</action>
+            <action>printfln("find_sm_menu-> %s = sm_menus.get(%s)", parnt, sm)</action>
             <action>cur = parnt</action>
             <while>parnt != null and sm_menus.containsKey(parnt)
-               <!--<action>printfln("parnt: %s, sm_menus.get(parnt): %s", parnt, sm_menus.get(parnt))</action>-->
+               <action>printfln("parnt: %s, sm_menus.get(parnt): %s", parnt, sm_menus.get(parnt))</action>
                <action>cur = sprintf("%s.%s", sm_menus.get(parnt), parnt)</action>
                <action>parnt = sm_menus.get(parnt)</action>
             </while>
@@ -135,7 +141,8 @@
          <return    name="res"   type="java.lang.Boolean" />
 
          <rule>true
-            <action>sm = names.convert(smRef.text, names.variable)</action>
+            <action>sm = names.convert(smRef.text.toLowerCase(), names.variable)</action>
+            <action>printfln("is_submenu-> %s = names.convert(%s, names.variable)", sm, smRef.text)</action>
             <action>res = sm_menus.containsKey(sm)</action>
          </rule>
       </function>
@@ -143,6 +150,7 @@
 
    <init-rules>
       <rule>menu_defs = #(java.util.Map) create('java.util.HashMap')</rule>
+      <rule>keys_jnames = #(java.util.Map) create('java.util.HashMap')</rule>
       <rule>sm_menus = #(java.util.Map) create('java.util.HashMap')</rule>
       <rule>items = #(java.util.Map) create('java.util.HashMap')</rule>
       <rule>items_subs = #(java.util.Map) create('java.util.HashMap')</rule>
@@ -158,6 +166,8 @@
    <walk-rules>
       <rule>type == prog.define_menu
          <action>menu_defs.put(getNoteString("name").toLowerCase(), this.id)</action>
+         <action>printfln("menu_defs.put(%s, %s)", getNoteString("name"), this.id)</action>
+         <action>keys_jnames.put(getNoteString("name").toLowerCase(), this.getAnnotation("javaname"))</action>
       </rule>
       <rule>type == prog.wid_menu and menu_defs.containsKey(this.text.toLowerCase())
          <action>putNote("refid", #(long) menu_defs.get(this.text.toLowerCase()))</action>
@@ -169,15 +179,16 @@
       <rule>type == prog.wid_sub_menu and
             parent.type == prog.kw_sub_menu 
            
-         <action>submenu = names.convert(text, names.variable)</action>
- 
+         <action>submenu = names.convert(text.toLowerCase(), names.variable)</action>
+         <action>printfln("%s = names.convert(%s, names.variable)", submenu, text)</action>
+         
          <rule>parent.parent != null and
                (parent.parent.type == prog.define_menu or
                parent.parent.type == prog.define_sub_menu) and 
                !sm_menus.containsKey(submenu) 
             <action>menu = parent.parent.getAnnotation("name")</action>
             <action>menu = names.convert(menu, names.variable)</action>
-            <!--<action>printfln("adding %s to %s", submenu, menu)</action>-->
+            <action>printfln("adding %s to %s", submenu, menu)</action>
             <action>sm_menus.put(submenu, menu)</action>
          </rule>
 
@@ -198,7 +209,7 @@
                <action>ref = ref.getImmediateChild(wid_m_or_sm, null)</action>
                <action>
                   putNote(sprintf("IN_%s", ref.getSymbolicTokenType()), 
-                          names.convert(ref.text, names.variable))
+                          keys_jnames.get(ref.text))
                </action>
                <action>
                   putNote(sprintf("IN_%s_ID", ref.getSymbolicTokenType()), ref.id)
@@ -206,6 +217,13 @@
             </rule>
       </rule>
 
+      <rule>type == prog.define_sub_menu
+         <action>menukey = getNoteString("name")</action>
+         <rule> menukey != null
+            <action>keys_jnames.put(menukey.toLowerCase(), this.getAnnotation("javaname"))</action>
+         </rule>
+      </rule>
+
       <!--
          MENU-ITEM and SUB-MENU with the same name can appear in multiple MENUs and/or SUB-MENUs. When
          referencing unqualified MENU-ITEMs or SUB-MENUs (SUB-MENU and/or MENU qualifiers missing) in WAIT-FOR
@@ -224,16 +242,21 @@
       -->
       <rule>type == prog.kw_menu_itm and parent.type == prog.define_menu
          <action>item = names.convert(#(java.lang.String) this.getAnnotation("name"), names.variable)</action>
-         <action>items.put(item, parent)</action>
+         <action>items.put(item.toLowerCase(), parent)</action>
+         <action>printfln("items.put(%s, parent)", item)</action>
       </rule>
 
+      
       <rule>type == prog.kw_menu_itm and parent.type == prog.define_sub_menu
          <action>item = names.convert(#(java.lang.String) this.getAnnotation("name"), names.variable)</action>
-         <rule>!items.containsKey(item)
-            <action>list = items_subs.get(item)</action>
+         <action>printfln("%s= names.convert(%s, names.variable)", item, this.getAnnotation("name"))</action>
+         <action>keys_jnames.put(item.toLowerCase(), this.getAnnotation("javaname"))</action>
+         <rule>!items.containsKey(item.toLowerCase())
+            <action>list = items_subs.get(item.toLowerCase())</action>
             <rule>list == null
                <action>list = #(java.util.List) create("java.util.ArrayList")</action>
-               <action>items_subs.put(item, list)</action>
+               <action>items_subs.put(item.toLowerCase(), list)</action>
+               <action>printfln("items_subs.put(%s, list)", item)</action>
             </rule>
             <action>list.add(parent)</action>
          </rule>
@@ -263,8 +286,20 @@
                   <action>symToken = "wid_sub_menu"</action>
                   <action on="false">symToken = ref.getSymbolicTokenType()</action>
                </rule>
+              <action>jname = keys_jnames.get(ref.text.toLowerCase())</action>
+               <rule>jname != null
+                  <action>
+                     putNote(sprintf("IN_%s", symToken), jname)
+                  </action>
+                  <action on="false">
+                     putNote(sprintf("IN_%s", symToken), names.convert(ref.text, names.variable))
+                  </action>
+                  <action on="false">
+                     printfln("putNote(%s, %s)", sprintf("IN_%s", symToken), names.convert(ref.text, names.variable))
+                  </action>
+               </rule>
                <action>
-                  putNote(sprintf("IN_%s", symToken), names.convert(ref.text, names.variable))
+                  printfln("putNote(sprintf('IN_ s', symToken), names.convert(%s, names.variable))", ref.text)
                </action>
                <action>
                   putNote(sprintf("IN_%s_ID", symToken), ref.id)
@@ -272,7 +307,8 @@
             </rule>
 
             <rule>ref == null
-               <action>ref = items.get(names.convert(text, names.variable))</action>
+               <action>ref = items.get(names.convert(text.toLowerCase(), names.variable))</action>
+               <action>printfln("ref = items.get(names.convert(%s, names.variable))", text)</action>
             </rule>
 
             <rule>ref != null
@@ -308,7 +344,8 @@
               #(java.lang.Boolean) execLib("is_submenu", this))) and
              parent.parent.type != prog.define_menu and
              parent.parent.type != prog.define_sub_menu
-         <action>menu = execLib("find_sm_menu", names.convert(text, names.variable))</action>
+         <action>menu = execLib("find_sm_menu", names.convert(text.toLowerCase(), names.variable))</action>
+         <action>printfln("menu = execLib('find_sm_menu', names.convert(%s, names.variable))", text)</action>
          <rule>menu != null
             <action>putNote("first-menu-path", menu)</action>
             <action>putNote("in_wid_menu", menu)</action>

=== modified file 'rules/convert/methods_attributes.rules'
--- rules/convert/methods_attributes.rules	2020-03-17 02:40:10 +0000
+++ rules/convert/methods_attributes.rules	2020-03-18 18:59:30 +0000
@@ -4939,6 +4939,7 @@
                     implementation -->
                <rule>ftype == prog.kw_handle and 
                           (evalLib("widgettype", ref.type) or
+                           ref.type == prog.kw_menu_itm    or
                            ref.type == prog.kw_sub_menu    or
                            ref.type == prog.kw_menu)
                   <action>hwrap = "Widget"</action>

=== modified file 'src/com/goldencode/p2j/admin/AdminAppBase.gwt.xml'
--- src/com/goldencode/p2j/admin/AdminAppBase.gwt.xml	2017-09-22 18:25:28 +0000
+++ src/com/goldencode/p2j/admin/AdminAppBase.gwt.xml	2020-03-19 09:42:34 +0000
@@ -101,7 +101,7 @@
   <inherits name="org.gwtbootstrap3.extras.select.Select"/>
 
   <!-- Uncomment to save time during development -->
-  <!--<set-property name='user.agent' value='gecko1_8,safari'/>-->
+  <set-property name='user.agent' value='gecko1_8'/>
 
   <set-property name='locale' value='default'/>
 

