StreamBase Compare Editor

You can view the differences between two files by comparing them in the Compare editor. You can compare different files, you can compare versions in the Workbench with versions in the repository, or with the local edit history. In some cases you can compare three files (when a common ancestor exists). After a comparison is carried out, the compare editor opens. As described in the Eclipse Workbench User Guide, the Compare editor provides a graphical view of the differences between the files or versions of the same file, helping you to navigate and (in some cases) edit differences between the files.

StreamBase extends the Eclipse Compare function, providing additional support for comparing the XML structures of sbapp StreamBase EventFlow application files.

Note

You cannot directly edit merge sbapp files in the Compare editor; instead, use an editor such as the EventFlow Editor.

You can compare sbapp files using either of the standard Eclipse methods:

  • Select two different sbapp files, then right-click and choose Compare WithEach Other. The StreamBase EventFlow Application Compare editor opens in your main editor view.

  • Right-click a single sbapp file that has been modified before, and choose Compare WithLocal History. The StreamBase Compare with Local History editor opens outside the main editor view. You can compare your current workspace copy with any saved copy in the local history.

To illustrate, suppose we have modified the firstapp.sbapp sample application (after loading it using FileLoad StreamBase Sample). In the application's Properties, we opened the Predicate Settings tab and changed the expression there from SKU > 6000 to SKU > 5500. Then we saved the application and clicked FileCompare WithLocal History to open the Compare editor shown in the following figure:

The following notes describe the features of each pane in the sample Compare editor screen:

Local History

This pane shows all the versions of the selected file that are currently stored in the workspace. You can select any version to compare to the working copy version. (This pane occurs only in the Compare with Local History editor; it is absent when you compare different files in the EventFlow Application Compare editor.)

StreamBase EventFlow Application Compare

Shows a structured view of the XML nodes in the compared sbapp files. In this pane:

  • You can collapse and expand the tree to show and hide nodes.

  • Differences are indicated by component icons with either a plus or minus graphic. Our example shows that the Filter operator contains a difference.

  • You can click a node in this pane to see its corresponding XML code in the Text Compare pane. For example, clicking the root element displays the entire file in the Text Compare pane; clicking the Filter operator (as shown in the screen) displays just the code for the operator.

  • The Filter button in this pane is a toggle control that determines whether the structure view includes non-semantic difference nodes: these are elements that do not affect the application function, such as those that describe the layout in the EventFlow editor. By default, the filter is on.

    The sample screen shows the filter off; if the filter were on, only the Filter operator nodes would be shown.

Text Compare

Shows the source code of the compared files side by side. Use the down and up arrows in the pane to step through all the differences sequentially. In our example, you can clearly see the changed value of the Filter operator expression.

Related Topics

StreamBase Compare includes many features of the Eclipse Compare function. For primary information refer to these topics in the Eclipse Workbench User Guide:

  • Comparing explains how to use the Eclipse Compare function.

  • Comparing Resources explains the Compare function in detail.

Back to Top ^