Skip to content
berryma4 edited this page Jun 20, 2013 · 11 revisions

SNL Editor

Purpose: Editor for the State Notation Language (SNL)

The State Notation Language is a superset of the C language, used for programming EPICS-based IOCs. The SNL perspective aids in editing through syntax highlighting, display of problems, code completion and outline-based navigation in the source code.

A brief introduction for using the SNL Development perspective follows, inline)]

SNL Development Perspective

Open the SNL Development perspective. Press the button in the toolbar for selecting perspectives

/00_SNL_Open_Perspective.png

click Other ... and chose the SNL perspective

/01_SNL_Select_Perspective.png

If you already have worked with it, it may have a different layout. Reset it then, so your display has a layout similar to this one:

Developer Perspective.png)]

Install Samples

Install the samples via CSS menu:

Menu Install Sample Projects.png)]

Then you will find the SNL Demo Project in the Navigator View.

Import existing source files

You may as well import your own source files. If you want to do so, first create an SNL Project with the help of its wizard

Create Project.png)]

and import your files using the Import menu of the navigator

Navigator Import.png)]

followed by the selection of the Import Wizard

Navigator Import from File System.png)]

and eventually chosing your files and the newly created project as the destination.

Editing

Now double click a file containing source code from the navigator. The editor will open. Positoning of the cursor is now reflected in the outline. You may navigate using the outline as well.

Editor And Outline With Selection.png)]

Code Completion (triggered by Ctrl-Space as usual) helps in editing:

Editor Code Completion.png)]

Problem View

Now let us have a look at the problem view. You may want to filter its output to stay focused:

Problem View Filter.png)]

The problem view shows warnings or errors which can be determined through syntactical analysis. Update occurs after saving the source file. Double-clicking an entry in the problem view navigates to the location in the source file.

Problem View Error.png)]

Editing history

Even though you are not connected to a source code repository, a limited amount of version management is available. Each time you save a file it is stored in the local history maintained by CSS. This is by no means a replacement for backup nor for a repository, just a hint for working in CSS.

Editor Show History.png)]

The History View will open, giving you access to previous versions. For example, select the versions you want to compare and start a comparison:

Editor Select For Comparison.png)]

Now you can review your changes:

Editor Differ.png)]

The actual amount of source code which is stored in the local history is a matter of preferences.

Compilation (not yet available)

Finally your source code will be ready to be compiled. However, this is currently not supported (for non-DESY versions).

Documentation

Documentation for the State Notation Language is available from the Argonne National Laboratory at the EPICS Home http://www.aps.anl.gov/epics/

Clone this wiki locally