Script Editor
The script editor is embedded in the Source tab of these multipage editors:
You can edit multiple software components simultaneously. Each component is displayed in a separate tab.
Associated with the script editor is an Outline view, which shows the structure of the active source code. The Outline view is updated automatically when you edit the source code.
See the following figure for an example.
Editing source code
To edit the source code of a component, go to the Source tab of the corresponding multipage editor:
- To edit the source code of a function, open the function in the Function Editor and go to the Source tab.
- To edit the source code of a library, open the library in the Library Editor and go to the Source tab.
- To edit the source code of
a report script, open the corresponding report in the Report Editor and go to the Source tab. Note: You can also start a separate script editor to set breakpoints in the report's debug script.
See Using breakpoints.
- To edit the source code of a UI script, open the corresponding session in the Session Editor and go to the Source tab.
- To edit the source code of a DAL script, open the corresponding table in the Table Editor and go to the Source tab.
The editor displays error markers to indicate errors in the source
code. When you save a component which contains errors, the component is only
stored in your local workspace but is not saved to the server. In the
Activity Explorer, the component has a dirty
state (
) decorator in the bottom right
corner of the software component image. When you solve the error and save the
component, the component is saved to the server again and the decorator
disappears.
Alternative ways to open source code
You can also start the script editor in the following ways:
- Through the
See Open Declaration.
command. - From various views, such
as the
Problems view, the
Tasks view and the
Bookmarks view. For example:
- When you double-click a problem, task, or bookmark associated with a specific component, the editor opens the corresponding source.
- When you double-click a problem, task, or bookmark associated with a specific line in a specific component, the editor opens the corresponding source on that line.
Note: The editor is not started when you double-click a generic problem, task, or bookmark not associated with any specific component.Instead of double-clicking, you can use the
command on the view's shortcut menu.
Script editor features
This topic focuses primarily on the LN Studio specific features. It does not describe the standard Eclipse editor functionality, such as the , , , , and commands.
For details on the standard Eclipse editor features, see the Workbench User Guide.
For details on the LN Studio specific editor features, see these sections:
- Comparing Source Code Versions
- Source Tab
- Comments
- Open Declaration
- Keyword Search
- Code Assist
- Incremental Find
- Generating Source from WSDL
- Folding
- ToDo Comments
- Toggle Breakpoints
- Text Hovering
- Application Search
- Mark Occurrences
- Quick Outline view
- Outline view
- Executing Assignment Expressions (only during debugging)
For information on preference settings for the editor, see Script Editor Preferences.
For information on the limitations of the editor, see LN Studio Limitations.