IBM Streams 4.2.1

SPL Editor

The SPL Editor is a text-based editor that you can use to create and edit SPL source files.

SPL Editor features

The SPL Editor provides the following features:
Customizable color syntax highlighting
You can customize the color and font of SPL elements, such as keywords, operator names, and names of input and output streams to improve the readability of SPL source code. To set these preferences, from the menu bar, click Windows > Preferences > IBM Streams > SPL > Syntax Coloring.
Content assist
You can use the content assist feature to insert code snippets or to complete a line of code in the SPL Editor. The placement of the cursor in the source file provides the context for the content assist to offer suggestions for completing the code. Press the Ctrl+Spacebar key to invoke content assist.
Hover help
You can move the mouse pointer over an SPL element to view additional information about the SPL element.
Refactoring code
You can refactor SPL code by right-clicking an element in the code and selecting Rename Element. Type in the new name and press enter. All references are changed to the new name.
Customizable code template
You can define code templates for reusable code and use the content assist feature to insert code templates in an SPL source file. For more information about setting up code templates, see Setting up and using code templates.
Code folding
You can collapse or expand code sections to hide or view sections of SPL code in the SPL Editor.
Open declarations
You can quickly navigate to the definition of a selected SPL element if the SPL project dependencies are set and resolved correctly. To navigate to the definition, place the cursor in the SPL Editor and press F3, or right-click an SPL element and click Open Declaration, or move the mouse pointer over the element and hold down the Ctrl key to convert the selected element to a hyperlink.
Search SPL elements
You can search for references to an SPL element. Right-click the element and click Find References or press Ctrl+Shift+G to search for an element. The SPL Editor displays the search results in the Eclipse Search view.
Quick outline
Use the Quick Outline option instead of the Outline view, if you do not want to open a separate view to view the logical structure of an SPL application. Right-click an element and click Quick Outline or press CTRL+O to display the logical structure of an SPL application in a hover window.
Formatting code
You can customize formatting options, such as indentation, position of opening brace, and the maximum number of characters per line to improve the readability of SPL source code. To set these preferences, from the menu bar click Windows > Preferences > IBM Streams > SPL > Formatter To format the source code, right-click in the SPL Editor and click Format or press Shift+Ctrl+F.
Note: The Graphical Editor generates formatted SPL code.
Dynamic context-sensitive help
Press Ctrl+F1 to display help that is related to the current selected element in the SPL Editor. If the current selection is an input stream, the source code that describes the schema of the input stream is displayed in the Dynamic Help view. The contents in Dynamic Help view follow the current selection in the SPL Editor.