@copy Tag
This tag specifies a block of text to be copied into the test device file when the tagged additional code file is added. This text can span multiple lines; all text within //! comments following the @copy tag will be copied, up to the next tag if one is specified, or up until the end of all //! comment lines in the file. The text will be inserted at the top of the file immediately after the preamble.
//! When this additional code file is added to a device, copy this text into //! the test device file. //! //! @copy //! // This comment text will be copied into the test device file. //! // This comment text will also be copied (on the next line) //! // and this line will likewise be copied. //! // The commented line, blank line and variable declaration line //! // following this one will also be copied. //! // //! //! LOCAL STRING MY_STRING := "Example"; //! @bus SCL
Note that unlike other XJEaseDoc tags, line breaks in a @copy tag will typically be honoured, but there are two exceptions to this:
- If the @copy tag is immediately followed by a line break, this line break will be removed from the text to be copied - this means that you are able to have visually-consistent levels of indentation across the entire body of the tag.
- If the next //! line following the body of the @copy tag starts with another tag, then this final line break will not be included as part of the @copy tag - this means that you are not forced to have the next tag on the same line if you don't want an extra line break to be copied.
In addition, a single line break will be appended to the end of all the text to be copied, so that the existing text of the test device file always starts on a new line. So in this example above, the copied text will span 8 lines. The end result will look like this:
// This comment text will be copied into the test device file. // This comment text will also be copied (on the next line) // and this line will likewise be copied. // The commented line, blank line and variable declaration line // following this one will also be copied. // LOCAL STRING MY_STRING := "Example"; // This is the first line of the test device file.
XJTAG v4.1.100