Base queries are defined in XXX_CONFIG.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 DIRECTORY STYLES.. section: the name of the current Base Query 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? Base query definition start appears in line that contain <BaseQuery Name="whatever"... 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 <BaseQuery Name=", then it's not the right line: C:\tera\GN4\main\config\global\GN4\fred4_TabItems.xml(5): <l:SearchCriteria BaseQueryName="Fred4Pages" AutoApply="True" /> C:\tera\GN4\main\config\global\GN4\fred4_TabItems.xml(93): <l:ShellTabItem x:Name="Fred4Pages"... C:\tera\GN4\main\config\global\GN4\fred4_TabItems.xml(105): <l:SearchCriteria Name="Search" BaseQueryName="Fred4Pages"... C:\tera\GN4\main\config\global\GN4\fred4_TabItems.xml(558): <l:SearchCriteria Name="PageSearch" BaseQueryName="Fred4Pages"... 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. |
This assumes that you've started a GN4 application, and that you displayed a dialog box that contains a directory style. Note: as in this case you cannot use the Configuration Details command, you need to use another method. 1.Locate the name of the dialog box in the title bar, e.g. Select elements for relations 2.Search the "Entire solution" for the title string, e.g. Select elements for relations. There are chances that you find it as a resource translatable string, e.g. C:\tera\GN4\main\src\GN4AddIns\TedSystemAddIn\My Project\Resources.resx(921): <data name="IDS_SelectElementsForRelations" 3.From the above it is clear that now you need to search for the IDS_SelectElementsForRelations, again in the Entire solution and sop you find it here: C:\tera\GN4\main\src\GN4AddIns\TedSystemAddIn\Ted.vb(2484): dlg.Title = My.Resources.IDS_SelectElementsForRelations 4.Now, go to that part of code and look if there's a call of a base query (highlighted in yellow): " <summary>Called by the MultiReferenceControl to add articles selected with the selectObjectDialog</summary> " <remarks></remarks> Public Overridable Sub ArticleAddRelations() Dim dlg As New SelectObjDialog(Main.Window) dlg.Title = My.Resources.IDS_SelectElementsForRelations dlg.BaseQueryName = "SelectFolderObject" dlg.SearchName = "Search" dlg.DirectoryStyleName = My.Resources.IDS_ListDirStyleName dlg.NewObjectUIGroupName = "NewSelectObjDialog" dlg.AutoApply = True dlg.SearchValue = Nothing 5.Now, search in entire config for the "basequery Name="Select" and you will find it in C:\tera\GN4\main\config\Global\GN4\ted4_Config.xml(3433): <BaseQuery Name="SelectFolderObject" Description="" ObjectTypeName="folderObject">. Note: when you changing such base query, have in mind that it might be used elsewhere – or create a new one just for that purpose. |