Support Statement: GlobalSettings enhancements

Overview

This article describes changes made in V31.20 to improve the usability of GlobalSettings files.

1) Allow the GlobalSetting file to work with the XML file directly

Create a GlobalSettings script (e.g. usr\GlobalSettings,xml).  Specify the location where the tool should create the compiled VBI file using the identifier attribute of the Storage command.  Typically this will be relative to the workspace\log folder (e.g. log\GlobalSettings.vbi). 

If you want to be able to run a VBI audit of the GlobalSetting use the standard VBI naming convention (MigName-JobName-TaskTag-NetLang). Here is an example:

<GlobalImports>
<Storage Action="Create" Identifier="MigName-GlobalSettings-std-csh" />

<Registry type="libname" source="msado28.tlb" target="msado15.dll" />

<Registry type="RefactorFile" Source="(%= VirtualRoot%)\TailwindPOS.vbp">
   <Refactor errorStatus="warn">
      <Remove identifier="TailwindPOS.frmSales.LastReceipt"/>
      <Remove identifier="TailwindPOS.frmSales.LastReceipt.Get"/>
      <Remove identifier="TailwindPOS.frmSales.ReturnFromPause"/>
      <Remove identifier="TailwindPOS.ucLettersPad.Command1_Click"/>
      <Remove identifier="TailwindPOS.EndShiftWithAmount"/>
      <Remove identifier="TailwindPOS.PadAmount"/>
      <Remove identifier="TailwindPOS.ValidateUserPassword"/>
      <Remove identifier="TailwindPOS.ValidateUserPasswordAdmin"/>
   </Refactor>
</Registry>
<Storage Action="Close" />
</GlobalImports>


Next , add a<Select GlobalSettings ...> command to the template translation script.  The value will specify the location of the GlobalSettings content to use during the translation.  To do just-in-time processing of the GlobalSetting before each translation, specify the name of the script (i.e the .xml file).  The Select will typically be placed prior to the Compile command, for example:

<gmBasic>
<Storage Action="Create" Identifier="%JobId%" />
...
<Select GlobalSettings="%UserFolder%\GlobalSettings.xml" />

<Compile Project="%SrcPath%" Resx="%ResxFolder%">
...
<Storage Action="Close" />
</gmBasic>

When the translator encounters the GlobalSettings command, it will process the indicated script then load the resulting VBI file.

2) If two <Registry commands for the same type and source exist, they are merged

A warning is displayed when merging content to encourage the user to merge them as an optimization

3) The Analytics Audits report will include Registry entries stored in the GlobalSettings file

Here is a sample of the added Registry audit.

 Detailed Description of Registry IMSLIB.Registry.EditFile.\test\App\src\App\Applications\glbl-modShift.bas with root address 15545:
 Property                       | Content
 --------                       | -------
 target                         | 15590:
 
 Text Registered via this entry:
 RecNo | Rai | nRec | Content
 ----- | --- | ---- | -------
     1 |  32 |   24 |    <Fix name="EditFile">
     2 |  32 |   67 |    <Replace status="active" name="Add Strong typing for Control 6">
     3 |  32 |   52 |    <OldBlock><![CDATA[cmbIN As Control]]></OldBlock>
     4 |  32 |   53 |    <NewBlock><![CDATA[cmbIN As ComboBox]]></NewBlock>
     5 |  32 |   13 |    </Replace>
     6 |  32 |    9 |    </Fix>

And another example:

Detailed Description of Registry IMSLIB.Registry.RefactorFile.\test\App\src\App\Applications\glbl-modMETSDBFunctions.bas with root address 15510:
Property                       | Content
--------                       | -------
target                         | 15787:

Text Registered via this entry:
RecNo | Rai | nRec | Content
----- | --- | ---- | ------- 
    1 |  32 |   13 |    <Refactor>
    2 |  32 |  103 |       <FixType identifier="FillFunctionPriorityCombo.cmbFunctionIN" type="ComboBox" Status="Dynamic" />
    3 |  32 |   72 |       <FixType identifier="CheckCloseDB.dbIn" type="ADODB.Connection" />
    4 |  32 |   94 |          <FixType identifier="modMETSDBFunctions.CheckCloseDB.dbIN" type="ADODB.Connection" />
    5 |  32 |  112 |          <FixType identifier="modMETSDBFunctions.ClearBPUDisplay.lblArrayIN" type="Collection" status="Label" />
    6 |  32 |   17 |       </Refactor>