Menus are defined within Menusets, in XXX_TABITEMS.XML files, where XXX can be Fred4, Ted4, Shell4, Edadmin4 or Admin4.
This assumes that you've started a GN4 application, and that on your screen you are looking at the menu you want to locate in configuration files. 1.In Ted4, or Fred4, on the Help menu, click Configuration details. 2.Look under MENUSET section: the name of the current menuset is displayed there. 3.Make a note of the name. 4.Perform the search with that name (with double quotes or without them), as explained in Locate configuration items through Visual Studio Express search. 5.Double-click the found line to display the related file and to put the cursor in the related line in the file. 6.Collapse all outlining by selecting twice Edit > Outlining > Toggle All Outlining. 7.Double-click the found line to put the cursor in the related line in the file (with all code collapsed - and more readable). How to recognize the right entry in results? Main menu definition start appears in line that contain <Menuset Name="whatever">. In the below example, we were looking for the Fred4Main. The appropriate line in results may look like: C:\tera\GN4\main\config\global\GN4\fred4_TabItems.xml(774): <Menuset Name="Fred4Main"> What if there are more lines found? The same name may be found in other lines such as the one below. If the name is not preceded by <Menuset Name=", then it's not the right line: C:\tera\GN4\main\config\global\GN4\fred4_TabItems.xml(93): <l:ShellTabItem x:Name="Fred4Pages" Header="Pages" MenuConfigName="Fred4Main" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:converters="clr-namespace:TeraDP.GN4.Common.Converters;assembly=Common" l:ShellUI.ZoneName="Main" ObjectTypeNames="page" Grid.IsSharedSizeScope="True"> In the above example, the line refers to the tabitem entry and not to the menu definition. What if there are more lines with <MenuSet Name="..."> found? In some situations, a menu may be defined in one file and re-defined in other file(s). In order to locate the right definition, remember the loading order for GN4 applications (the last loaded file has the priority) Ted4: loads first the SHELL4_TABITEMS.XML and then TED4_TABITEMS.XML. If the menu is defined in both files, TED4_TABITEMS.XML definition wins. Fred4: loads first SHELL4_TABITEMS.XML, then TED4_TABITEMS.XML, and then FRED4_TABITEMS.XML. If the menu is defined in all files, FRED4_TABITEMS.XML definition wins. |
After you located the menuset, as explained above, do following: 1.Expand <Menuset and locate the <l:ShellMenu xmlns:... line. 2.Expand the <l:ShellMenu xmlns:... line.
|
This assumes that you've started a GN4 application, and that on your screen you are able to display the menu you want to locate in configuration files. Context menus cannot be identified by Help > Configuration details, as a context menu disappears if you click elsewhere. Follow this procedure instead: 1.In Ted4 or Fred4, display Script Editor (Window > Palettes > Script Editor). 2.Click the Capture button. 3.Right-click to display the menu you want to locate in the configuration. 4.Make a note of the string that appears in the Script Editor window. 5.Perform the search with that string, as explained in Locate configuration items through Visual Studio Express search. 6.In Find Results, locate a line that contains ...Sub <your_string>, and then double-click it. 7.Within the sub code, look at the line that looks like Main.ShowPopupMenu("whatever", True). The text between double quotes is the name of the pop-up menu in the configuration file. 8.Perform the search with that name (with double quotes or without them), as explained in Locate configuration items through Visual Studio Express search. How to recognize the right entry in results? Context menu definition start appears in line that contain <ContextMenu Name="whatever">. In the below example, we were looking for the Fred4Main. The appropriate line in results may look like: C:\tera\GN4\main\config\global\GN4\fred4_TabItems.xml(762): <ContextMenu Name="DesignerTabPopup"... What if there are more lines with <ContextMenu Name="..."> found? In some situations, a context menu may be defined in more than one file. In this example, we were searching for the DesignerTabPopup, and we found it in five places. Find all "DesignerTabPopup", Subfolders, Find Results 1, "C:\tera\GN4\main\config", "*.*" C:\tera\GN4\main\config\global\admin4_TabItems.xml(1239): <ContextMenu Name="DesignerTabPopup" xmlns:l="http://www.teradp.com/schemas/GN4/1/Shell/Presentation" C:\tera\GN4\main\config\global\admin4_TabItems.xml(1455): <ContextMenu Name="DesignerTabPopup" xmlns:l="http://www.teradp.com/schemas/GN4/1/Shell/Presentation" C:\tera\GN4\main\config\global\GN4\fred4_TabItems.xml(762): <ContextMenu Name="DesignerTabPopup" xmlns:l="http://www.teradp.com/schemas/GN4/1/Shell/Presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> C:\tera\GN4\main\config\global\GN4\shell4_TabItems.xml(863): <ContextMenu Name="DesignerTabPopup" xmlns:l="http://www.teradp.com/schemas/GN4/1/Shell/Presentation" C:\tera\GN4\main\config\global\GN4\ted4_TabItems.xml(1389): <ContextMenu Name="DesignerTabPopup" xmlns:l="http://www.teradp.com/schemas/GN4/1/Shell/Presentation" Matching lines: 5 Matching files: 4 Total files searched: 446 In order to locate the right definition, remember the loading order for GN4 applications (the last loaded file has the priority) Ted4: loads first the SHELL4_TABITEMS.XML and then TED4_TABITEMS.XML. If the menu is defined in both files, TED4_TABITEMS.XML definition wins. Fred4: loads first SHELL4_TABITEMS.XML, then TED4_TABITEMS.XML, and then FRED4_TABITEMS.XML. If the menu is defined in all files, FRED4_TABITEMS.XML definition wins. |