Editor shortcut menu

When you right-click on any location in the source code, a shortcut menu is displayed.

This table shows the shortcut menu commands, except basic commands, such as copy and paste:

Command Description
Compare With

Contains commands to compare different versions of the source code.

See Comparing Source Code Versions.

Clean Source

Opens a cleaned version of the source in a separate editor.

In the cleaned source, all code marked as old is removed: The script editor removes the following:

  • Lines that contain the "|#<Current ActivityName>.o" comment.
  • Blocks where the first line contains the "|#<Current ActivityName>.so" comment and the last line contains the "|#<Current ActivityName>.eo" comment.

In code marked as new, the script editor removes the corresponding comments:

  • "|#<Current ActivityName>.sn"
  • "|#<Current ActivityName>.en"
  • "|#<Current ActivityName>.n"

For details on code marked as old, and code marked as new, see Comments.

Note: 
  • The cleaned source is read-only.
  • When you close the cleaned source, the corresponding file is removed from the workspace.
Toggle Comment / Mark as New / Mark as Old / Add Comment Use these commands to comment out and uncomment lines of code. You can toggle comments, mark modified lines, mark new lines, and add comments.

See Comments.

Add Linked Library

Use this command to link a library to the component that you are editing.

Use this command as follows:

  1. In the source code, select a function call.

    The selected function must be stored in a library. The function name must meet the coding standards.

    For example, the source contains this code: RETIFNOK(tcmcs.dll0095.read.parm("tdsls000")). Select tcmcs.dll0095.read.parm("tdsls000").

  2. Right-click and run this command.

    The library in which the selected function is stored, for example tcmcs.dll0095, is added to the list of linked libraries in the Script tab.

Generate Source from WSDL Use this command to generate LN 4GL code, based on a URL or a Web Services Description Language (WSDL) file, for a general library.

See Generating Source from WSDL.

Application Search Use this command to search in which LN software components the expression, that you selected in the script editor, is used.

See Application Search.

Keyword Search Performs a keyword search in the online help.

See Keyword Search.

Open Declaration (source) Use this command to view the source code of the selected software component. LN Studio opens the Source tab of the corresponding multipage editor.

See Open Declaration.

Open Declaration (properties) Use this command to view the properties of the selected software component. LN Studio opens the Overview tab of the corresponding multipage editor.

See Open Declaration.

Quick Outline Lists the main structural elements of the source code you are editing. You can use the displayed elements to quickly navigate to the corresponding sections in the source code.

See Quick Outline view.

Modification Watchpoint Adds a modification watchpoint for the selected variable or table field. A watch expression is added automatically. When debugging, the session execution suspends each time the variable or table field changes.
Note: You must be sure that the selected text really is a variable or table field. The script editor does not check this.

See Using breakpoints.

Watch Creates a watch expression for the selected variable. When debugging, the watch expression is evaluated each time a session suspends.

See Evaluating expressions.

Condition Watchpoint Starts a dialog where you can enter a condition watchpoint for a local or global variable. A watch expression is added automatically. When debugging, the session execution suspends when the variable gets a certain value.

See Using breakpoints.