There are three editors in InfoSphere Streams Studio that help you write your SPL code. Here are some tips and tricks to help you write SPL applications more efficiently.

Tiling the editors side-by-side

Tiling of editors is basic Eclipse capability. Tiling the Streams Graphical Editor and the SPL Text Editor side-by-side allows you to view and edit the application graph as well as the source code at the same. While the Graphical Editor is useful for quickly creating the topology of your application, the SPL Text Editor is better suited for entering big blocks of code, for example, filling in the logic block of an operator.

Using the Graphical Editor, you can quickly construct the application graph by dragging and dropping operators and connecting them. As you save your changes, the SPL code is generated and you can see the updated code in the SPL Text Editor. When you make changes in the SPL Text Editor and save your changes, the Graphical Editor can reload the graph to pick up the latest changes from the file. With the two editor tiled side-by-side you can easily switch between the editors and take advantage of the capability of both editors.

Starting in Streams Studio Version 3.2, the SPL Mixed Mode Editor is no longer a split-pane editor showing the SPLMM code and the generated SPL code side-by-side. The SPL Mixed Mode Editor is now a single pane editor for editing the SPLMM code only. To get the same effect of a split-pane editor from previous versions, open both the SPL Mixed Mode Editor and the SPL Editor (on the generated SPL file) and then tile them side-by-side.

To tile the two editors side by side, open the file(s) in the two editors. Then left mouse click on the title area of the editor that you want to drag, hold down the left mouse button and drag the editor over to the right (or left) margin of the editor area. Notice that green boxes appear to indicate how the editors will be tiled.

tile_editor_drag

Release the mouse button when you are satisfied with the indicated placement. The editors are now tiled and you are now able to see both the graphical and textual version of the same file.

tiled_editors

Linking the views

In Streams Studio version 3.1, a feature was added to link the selection between different views that can display the same element. This feature is handy is helping you keep track of the same object in the different views. For example, an operator can be shown in the Graphical Editor, the SPL Text Editor, the Application Graph view and the Instance Graph view. If you have all of these views showing the content of the same application, then as you select an object (say, an operator) in one view, the link feature selects (and scrolls) the other views to the same operator. This is very useful when you have the two editors tiled side-by-side and you are editing in both the editors.

selection_editors

It is also useful when you are monitoring an application in the Instance Graph view and you want to find the source of an operator or a connection to understand why it is behaving in a certain manner. Selecting an operator or a stream in the Instance Graph will scroll the editor to the same element, if you have the source file open in the Graphical Editor or the SPL Text Editor at the same time.

selection_instancegraph

1 comment on"Tiling Editors in Streams Studio"

  1. Added a new category to Streams Studio for Tips and Tricks

Join The Discussion