Setting the Apama Preferences

This section provides information on the Apama-specific preferences.

Showing the Apama-specific preferences

The Apama-specific preferences are set in the Preferences dialog box of Eclipse.

To show the Apama-specific preferences

  1. From the Window menu, choose Preferences.

  2. In the tree of the resulting dialog box, expand the Apama node.

    Different pages are provided for setting different types of preferences.

  3. Select one of the pages in the tree and set the required options as described in the topics below.

  4. Click OK to save your changes and to close the dialog box.

Exporting the Apama-specific preferences

You can export the Apama-specific preferences to a file from one workspace and import the same in another workspace.

The following sub-categories of the Apama preferences are not part of exporting the Apama-specific preferences:

  • Apama Build Path Variables
  • Catalogs
  • Editor Templates

To export the Apama-specific preference

  1. Select File > Export > General > Preferences from the Apama Plugin for Eclipse menu. Click Next.

  2. Select Apama Preferences from the list of available preferences.

    Info
    Apama Preferences will only be available in the list of available preferences if at least one of the Apama preferences are set to a value other than the default value.
  3. Provide a file name in the To preference file field.

  4. Click Finish.

Importing the Apama-specific preferences

You can import the Apama-specific preferences that is exported from a workspace to other workspace.

To import the Apama-specific preference

  1. Select File > Export > General > Preferences from the Apama Plugin for Eclipse menu. Click Next.

  2. Browse and select the exported Apama-specific preference file.

  3. Select Apama Preferences from the list of available preferences.

    Info
    Apama Preferences will only be available in the list of available preferences if the input file has some previously exported Apama-specific preferences.
  4. Click Finish.

Apama

The top-level page of the Apama preferences provides the following options:

  • Hide “Terminate Launch” dialog box

    By default, the Terminate Launch dialog box is shown when you stop a running Apama project and associated processes are still running. This dialog box allows you to close these processes manually. It also provides the Do this automatically from now on option. When you enable this option, all running processes are automatically closed each time you stop a running Apama project, and the Terminate Launch dialog box is no longer shown. In addition, the Hide “Terminate Launch” dialog box option is automatically enabled in the preferences. If the Terminate Launch dialog box is to be shown again, you have to disable this option in the preferences.

    Info
    You can always terminate a running Apama project using the corresponding button in the Console view, regardless of the setting of the Hide “Terminate Launch” dialog box option.
  • Location of Apama log file for Apama Plugin for Eclipse

    This text box informs you in which directory you can find the Apama log file for Apama Plugin for Eclipse. This is just for your information; the text box cannot be edited. If you want to go to this directory directly, click the Open location for Apama log file link which is shown below the text box.

Catalogs

The Catalogs page of the Apama preferences allows you to specify what catalogs are available to your workspace. You can add catalogs for bundles that are not included as part of the standard Apama installation. You can also remove catalogs.

The Bundle catalogs tab provides the following buttons:

Command Button Description
Add Add a catalog for bundles that are not included as part of the standard Apama installation. In the resulting dialog, you have to select the folder that you want to add.
Add Variable Add variables to your build path. In the resulting dialog, you can select one or more variables which point to a folder. Or you can click the Extend button for a selected variable and then select an archive within the folder.
Remove Remove the selected catalog.

EPL

The EPL page of the Apama preferences allows you to toggle the editor’s assistance options. The following options are available:

  • Auto Close Quotes

    If selected (default), a closing quotation mark (") is automatically added when you insert a quotation mark.

  • Auto Close Brackets

    This pertains to these types of brackets:

    • [ ]
    • ( ) If selected (default), a matching closing bracket is automatically added when you insert an opening bracket.
  • Auto Close Braces

    This pertains to this type of braces:

    • { } If selected (default), a matching closing brace is automatically added when you insert an opening brace.
  • Context Assistance

    If selected (default), context assistance is turned on. When you type an event name followed by a period (.), a list of the event parameters defined by that event type pops up. You can then choose the parameter that you want to insert in your application.

Editor Colors

The Editor Colors page is available when you expand the EPL node in the Apama preferences.

You can use this page to change the colors for various elements in the EPL editor, for example, for comments or keywords. The current colors are shown in the preview area at the bottom of the Editor Colors page.

To change the color for an element, expand a node in the Element list box (for example, the EPL node), and then click the element. The current color of that element is then shown on the Color button. Click the Color button, and then choose the new color in the resulting dialog box.

If you want to define a text style (such as bold or italic) for the selected element, select the corresponding check box(es).

Each change is shown in the preview area at the bottom of the page.

Editor Formatting

The Editor Formatting page is available when you expand the EPL node in the Apama preferences.

You can use this page to define whether tabs or spaces are to be used in the EPL editor when you press the Tab key. The following options are available:

  • Insert tabs instead of spaces

    If this check box is selected, a tab character is inserted when you press Tab. If this check box is not selected, spaces are inserted when you press Tab.

  • Number of spaces that represent an indentation

    Applies when spaces are used instead of tabs. Defines the number of spaces that are inserted when you press Tab. You can change this value as needed.

Editor Templates

The Editor Templates page is available when you expand the EPL node in the Apama preferences.

EPL templates provide a way for you to define a short name for a longer pattern that you often specify in an EPL file. For example, Apama provides the dict template. When you enter dict followed by a space in the EPL editor, dictionary<> is automatically inserted.

Apama provides the following standard templates:

Name Description Pattern
dict dictionary<> dictionary<%\c>
ona on all on all %\c
onall on all on all %\c
seq sequence<> sequence<%\c>

%\c in the pattern defines the position of the cursor after the template content has been inserted in the editor. The Template area at the bottom of the Editor Templates page always shows the pattern of the template that is currently selected.

You can define additional templates as needed. All Apama projects can use all EPL templates. You can also define templates in one Apama Plugin for Eclipse installation and then export them for use in another Apama Plugin for Eclipse installation.

The following buttons are provided:

Button Description
New Add a new template. In the resulting dialog box, specify the following: the name of the template \(that is, the name that you type in the editor\), the description \(that is, the template content that is to be inserted in the editor\), and the pattern \(that is, the cursor position\). To define the pattern, you can just copy the information from the description and then insert `%\c` at the position where you want the cursor to appear.
Edit Edit the selected template. In the resulting dialog box, you can change the description and pattern.
Remove Remove the selected pattern.
Import Import new templates that have been exported from another Apama Plugin for Eclipse installation. In the resulting dialog box, navigate to the file that contains the templates and select it.
Export All Export all templates that are currently defined. In the resulting dialog box, specify the name of the file that is to contain these templates. The name `Abbreviations.txt` is offered by default. If possible, specify a path that is reachable from other Apama Plugin for Eclipse installations that need to import the templates.

Apama Build Path Variables

The Apama Build Path Variables page of the Apama preferences allows you to define path variables that you can use in all of your Apama projects. These path variables are helpful when you share your project with other users. If the project is dependent on one or more external files, not all users might have the external files stored in the same location. You can then agree upon a path variable that defines the location of the external files, and each user can then define this path variable on this preferences page. See also Configuring the project EPL build path.

Apama provides the following standard path variables:

Variable Name Description
APAMA_HOME The directory in which Apama has been installed. This variable cannot be changed or deleted.
APAMA_WORK The Apama work directory. Do not confuse this with your Eclipse workspace. This variable cannot be changed or deleted.

The following buttons are provided:

Button Description
New Add a new variable. In the resulting dialog box, specify the following: the name of the variable and the path. To define the path, you can click either File or Folder. Choose whatever is convenient for you and then navigate to the appropriate folder or EPL file and select it. If the variable represents a directory, you can use the same variable in the path for more than one file. If the variable represents a file, you can use that variable for only that file's path.
Edit Edit the selected variable. In the resulting dialog box, you can change the name and path as described for the New button.
Remove Remove the selected variable.

When you click the OK button of the Preferences dialog after you have added, edited or deleted a variable, a message dialog appears, informing you that the build path variables have changed and that a full build is recommended for the changes to take effect. Click Yes to ensure that the current project state is consistent with the new variable. If you are sure that the new variable does not affect the current project state, you can click No instead.

The variables that you define in the preferences are available for selection in the project properties. For further information, see Specifying dependencies for a multi-user project.

Profiling and Logging

The Profiling and Logging page of the Apama preferences pertains to Apama’s EPL Profiler (see also Profiling EPL Applications). The following options are available:

  • Switch to associated perspective when profiling or importing logs

    When you launch a profiling session, a dialog appears by default, asking if you want to switch to the Apama Profiler perspective. You can change this behavior by selecting one of the following options buttons:

    • Always. When selected, the Apama Profiler perspective is shown immediately. A dialog will not appear.
    • Never. When selected, the Apama Profiler perspective is not used. A dialog will not appear.
    • Prompt (default). When selected, a dialog appears, asking if you want to switch to the Apama Profiler perspective.
  • Refreshing views

    By default, the Apama profiler polls for data automatically (Automatic Refresh), using the refresh interval (in seconds) that is defined in the Refresh interval field and then updates the display in the Execution Statistics view. You can change the polling frequency by specifying the desired value in this field.

    You can also change the way the profiler updates the data from a polling mode (Automatic Refresh) to an to an on-demand mode (Manual Refresh). The manual refresh is useful, for example, if you want to let your application run up to a certain point and then retrieve profile data, or if you want to inject a set of test events and then examine the profile deltas. To do the manual refresh, you click the corresponding button in the local toolbar of the Profiling Monitor view. See also Profiling Monitor view.

Query

The Query page of the Apama preferences does not contain any options. When you expand the corresponding node in the tree, a subnode is shown. See the following topic for more information.

Info
Apama queries are deprecated and will be removed in a future release.

Syntax Coloring

The Syntax Coloring page is available when you expand the Query node in the Apama preferences.

Info
Apama queries are deprecated and will be removed in a future release.

You can use this page to manage the syntax coloring that is used when you edit the EPL source code for a query definition in the Query Designer. See also Editing source code in Query Designer.

To change the color for a syntax element, click that element in the Token Styles list box. The current color of that element and also its background color is then shown on the Color and Background buttons. Click one of these buttons, and then choose the new color in the resulting dialog box.

If you want to define a text style (such as bold or italic) for the selected element, select the corresponding check box(es).

If you want to define a different font for the selected element, click the Change button that is shown next to the font name that is currently used. You can then define a different font in the resulting dialog box. You can also define a different font style or font size in that dialog. If you define a different color or effect in this dialog, however, this will be ignored.

Workbench

he Workbench page of the Apama preferences allows you to customize the Workbench Project View (see also Workbench Project view). It provides the following options:

  • Project view background color

    The background color that is currently used in the Workbench Project View is shown on the button. Click this button if you want to define a different background color. You can then choose a new color in the resulting dialog.

  • Project view filters

    When you define a filter, you specify the pattern that determines which files or folders are to be hidden in the Workbench Project View. By default, all files starting with a period (.*) and Java class files (*.class) are filtered out.

    The following buttons are provided:

Button Description
New Add a new filter. Specify the pattern for the filter in the resulting dialog. You can use the wildcards * (any number of characters) and ? (any single character) in the pattern.
Remove Remove the selected filter.

If you want to change the pattern for a filter, you have to remove the filter and then add it once more.