<commit_before><html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=Cp1252"/>
    <link rel="stylesheet" href="default.css" type="text/css" />
    <title>
    Macro
    </title>
  </head>
  <body>

    <h2>
       Macro       
    </h2>
    <p>Macros are some predefined strings that can be
     embedded in any string based properties such as "PV Name", "Text", "Tooltip", 
     "Rules" and so on. Macro will be replaced with its string value at Runtime.</p>
     <p><b>Exception</b>: the script text or the generated script text from rule will not be
      parsed for macro replacing because that is too expensive.</p> 
     <h3>Format</h3>
     <p>
     The macro format can be either <b>$(macro_name)</b> or <b>${macro_name}</b>
     </p>
     <p>
There are three types of macros: Symbol Macro, Property Macro and System Macro. 
</p>
<h2>
Symbol Macro</h2>

<p>Symbol Macros can be defined in several places as listed below. 
 If a same macro is defined in multiple places and 
 the option <code>Include macros from parent</code> in Macros property is selected,
 it will be overriden in the order as below. 
 For example, macros defined in Display's Macro property will override the macros defined in Open OPI Actions, 
 and macros defined in Open OPI Actions will override the macros defined in BOY Preferences.
</p>

<ol>
<li>BOY Runtime Preferences<br> BOY runtime preference can be opened from menu: 
<code>CSS->Preferences...->CSS Applications->Display->BOY->OPI Runtime</code></li>
<li>Open OPI Actions<br>It includes open OPI from actions, open OPI from command line and 
open OPI from top OPIs button.</li>
<li>Display<br> Defined in the <code>Macros</code> property of Display.</li>
<li>Contianer<br>Defined in the <code>Macros</code> property of container widget, such as
 Grouping Container, Linking Container and Tabbed Container.</li>
</ol>

<p><b><font color="red">Attention</font></b>: Macro name only allows letters and numbers (should not start with number).
   
</p>

<a name="commandLine"></a>
<h3>Input Symbol Macros from command line</h3>
<p>
When you startup css from command line, you can specify the OPI files you want to run and their macros input:

<pre class="example_code">css --launcher.openFile "&lt;path_to_opi&gt;/file1.opi macro1=value1, macro2=value2" "&lt;path_to_opi2&gt;/file2.opi"
</pre>
<p>
It also allows embedding <tt>[\ascii-code]</tt> in macros when inputting macros from command line. For example:
<pre class="example_code">css --launcher.openFile "&lt;path_to_opi&gt;/file1.opi macro1=A[\58]B, macro2=value2" "&lt;path_to_opi2&gt;/file2.opi"
</pre><p>In above example, the value of <code>macro1</code> is <tt>A:B</tt>.

</p><p>
If there is already a CSS instance running, it will open the OPIs in the running CSS. The option <tt>--launcher.openFile</tt> is not necessary if following lines were added to css.ini: 
<pre class="example_code">--launcher.defaultAction 
openFile
</pre><p>Note1: For Linux GTK, ":" is not allowed in macros. Instead using <tt>[\58]</tt>.<br />
Note2: To make this command line work for Linux machine, you may need to add follow lines to your css.ini which is under your CSS directory (this line should be added before <tt>-vmargs</tt>):
<pre class="example_code">-vm 
/path to/libjvm.so 
</pre><p>You may able to find the path to libjvm.so by using command <tt>locate libjvm.so</tt>
See <a class="ext-link" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331122">
<span class="icon">https://bugs.eclipse.org/bugs/show_bug.cgi?id=331122</span></a>

</p>
 
<h2>Widget Property Value Macro</h2>
<p>This allows you to access the value of a property of the widget in run mode. In this case, the macro_name is the property id of the widget property. For example, $(pv_name), $(pv_value), $(forground_color)...
<br>A good example of Widget Property Value Macro is the tooltip: A tooltip of "$(pv_name)$(pv_value)" will display the PV Name and its value in run mode.  
</p>
<p><img src="img/tooltip.png"></p>
  
<h2>System Macros</h2>
<p>These macros are predefined in BOY. They can be overriden by Symbol Macros. Here are two macros available: </p>
<ul>
	<li><code>$(DID)</code>: The unique ID for each display. Even if there are
	 multiple displays refering to the same physical OPI file,  each display still has an unique ID.
	 This macro is useful for avoiding 
	name conflict. For example, if we add a prefix of <code>$(DID)_</code> to a local PV name, we can easily 
	guarantee the PV name is unique to this display. </li>
</ul>
<ul><li><code>$(DNAME)</code>: The name of the display.</li></ul>

</p>  
  
</body>
</html><commit_msg>BOY: Updated online help for LCID macro<commit_after><html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=Cp1252"/>
    <link rel="stylesheet" href="default.css" type="text/css" />
    <title>
    Macro
    </title>
  </head>
  <body>

    <h2>
       Macro       
    </h2>
    <p>Macros are some predefined strings that can be
     embedded in any string based properties such as "PV Name", "Text", "Tooltip", 
     "Rules" and so on. Macro will be replaced with its string value at Runtime.</p>
     <p><b>Exception</b>: the script text or the generated script text from rule will not be
      parsed for macro replacing because that is too expensive.</p> 
     <h3>Format</h3>
     <p>
     The macro format can be either <b>$(macro_name)</b> or <b>${macro_name}</b>
     </p>
     <p>
There are three types of macros: Symbol Macro, Property Macro and System Macro. 
</p>
<h2>
Symbol Macro</h2>

<p>Symbol Macros can be defined in several places as listed below. 
 If a same macro is defined in multiple places and 
 the option <code>Include macros from parent</code> in Macros property is selected,
 it will be overriden in the order as below. 
 For example, macros defined in Display's Macro property will override the macros defined in Open OPI Actions, 
 and macros defined in Open OPI Actions will override the macros defined in BOY Preferences.
</p>

<ol>
<li>BOY Runtime Preferences<br> BOY runtime preference can be opened from menu: 
<code>CSS->Preferences...->CSS Applications->Display->BOY->OPI Runtime</code></li>
<li>Open OPI Actions<br>It includes open OPI from actions, open OPI from command line and 
open OPI from top OPIs button.</li>
<li>Display<br> Defined in the <code>Macros</code> property of Display.</li>
<li>Contianer<br>Defined in the <code>Macros</code> property of container widget, such as
 Grouping Container, Linking Container and Tabbed Container.</li>
</ol>

<p><b><font color="red">Attention</font></b>: Macro name only allows letters and numbers (should not start with number).
   
</p>

<a name="commandLine"></a>
<h3>Input Symbol Macros from command line</h3>
<p>
When you startup css from command line, you can specify the OPI files you want to run and their macros input:

<pre class="example_code">css --launcher.openFile "&lt;path_to_opi&gt;/file1.opi macro1=value1, macro2=value2" "&lt;path_to_opi2&gt;/file2.opi"
</pre>
<p>
It also allows embedding <tt>[\ascii-code]</tt> in macros when inputting macros from command line. For example:
<pre class="example_code">css --launcher.openFile "&lt;path_to_opi&gt;/file1.opi macro1=A[\58]B, macro2=value2" "&lt;path_to_opi2&gt;/file2.opi"
</pre><p>In above example, the value of <code>macro1</code> is <tt>A:B</tt>.

</p><p>
If there is already a CSS instance running, it will open the OPIs in the running CSS. The option <tt>--launcher.openFile</tt> is not necessary if following lines were added to css.ini: 
<pre class="example_code">--launcher.defaultAction 
openFile
</pre><p>Note1: For Linux GTK, ":" is not allowed in macros. Instead using <tt>[\58]</tt>.<br />
Note2: To make this command line work for Linux machine, you may need to add follow lines to your css.ini which is under your CSS directory (this line should be added before <tt>-vmargs</tt>):
<pre class="example_code">-vm 
/path to/libjvm.so 
</pre><p>You may able to find the path to libjvm.so by using command <tt>locate libjvm.so</tt>
See <a class="ext-link" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=331122">
<span class="icon">https://bugs.eclipse.org/bugs/show_bug.cgi?id=331122</span></a>

</p>
 
<h2>Widget Property Value Macro</h2>
<p>This allows you to access the value of a property of the widget in run mode. In this case, the macro_name is the property id of the widget property. For example, $(pv_name), $(pv_value), $(forground_color)...
<br>A good example of Widget Property Value Macro is the tooltip: A tooltip of "$(pv_name)$(pv_value)" will display the PV Name and its value in run mode.  
</p>
<p><img src="img/tooltip.png"></p>
  
<h2>System Macros</h2>
<p>These macros are predefined in BOY. They can be overriden by Symbol Macros. Here are two macros available: </p>
<ul>
	<li><code>$(DID)</code>: The unique ID for each display. Even if there are
	 multiple displays refering to the same physical OPI file,  each display still has an unique ID.
	 This macro is useful for avoiding 
	name conflict. For example, if we add a prefix of <code>$(DID)_</code> to a local PV name, we can easily 
	guarantee the PV name is unique to this display. </li>
	<li><code>$(DNAME)</code>: The name of the display.</li>
	<li><code>$(LCID)</code>: The unique ID for linking container instance in runtime mode.
	Even if there are multiple linking containers refering to the same physical OPI file, each OPI file in 
	the linking container has a unique ID.
	</li>
</ul>

</p>  
  
</body>
</html>
{'fraction_non_alphanumeric': 0.12425290972003775, 'fraction_numerical': 0.010066058508965083, 'mean_word_length': 4.169647696476964, 'pattern_counts': {'":': 2, '<': 257, '<?xml version=': 0, '>': 267, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5105559', 'n_tokens_mistral': 3174, 'n_tokens_neox': 3048, 'n_words': 1222}