SqrParser |
Version 0.10 (January 2004) |
The "SqrParser" plugin provides a quick and easy way to navigate through and visualize the structure of your SQR pgm.
The minimum requirements are
JRE 1.3
jEdit 4.0
ErrorList Plugin 1.2.3
SideKick 0.1
You can install it manually or automatically.
To install it manually
Download the 'SqrParser-x.xx.jar' (or .tgz or .zip) file
Extract 'SqrParser.jar' file from it using WinZip or some such program.
Copy the file to either
'jEdit/jars'
directory
or
to the '<users home
directory>/.jedit/jars' directory.
On windows the
home directory may be 'c:\windows\profiles\<userid>\'
(on win 98) or 'c:\Documents and
settings\<userid>\' (on win XP)
On Linux it may
be '/home/<userid>/'
(See
jEdit documentation for more help on this)
To install it automatically, use the jEdit Plugin Manager
Go to the jEdit menu and select Plugins.
From the drop down menu select Plugin manager and follow the instructions.
In addition to SqrPlugin you will also have to install the SideKick plugin and optionally the ErrorList plugin.
The Plugin is very simple and straight forward to use. It displays the structure of your sqr program in the form of a tree, within a window called the “Structure Browser”.
To display the “Structure Browser” go to jEdit Menu >
Plugins > SideKick > Structure Browser.
Once the window is
displayed you can move around your program by clicking different
parts of the tree inside the window.
If you click a node on the
tree, the Structure Browser would move the cursor over to the line
containing the procedure, the 'do' or the 'include' phrase.
If
you click a node while pressing the Shift key, the Structure browser
would select the whole procedure , the 'do' or 'include' line
referred to by that node.
If you click a node while pressing the
Ctrl key, the Structure browser would display the whole procedure ,
the 'do' or 'include' line referred to by that node and hide the rest
of the code. Clicking another node would redisplay the rest of the
code.
As you move around your code the corresponding node on the
tree is automatically selected.
Clicking the refresh button will force the Structure Browser to
parse and refresh the tree.
You can also set options to
automatically parse at certain time intervals or when certain events
occur.
To do so go to jEdit 'Global Options' and set the
appropriate properties of the SideKick Plugin
The SideKick plugin also enable 'folding' of your program. 'Folding' is a jEdit feature using which you can selectively display portion of the code. Imagine your program written on a piece of paper .You fold away all the parts you are not interested in and just unfold the ones you want to work on. Folding can be done based on couple of criteria. The parser result can be one of them. Go to jEdit Menu> Utilities >Global Options > Editing > Folding to use Structure Browser for folding. See jEdit help for more information on folding.
The Structure browser can also be docked using jEdit 'Global options', docking.
The SqrParser plugin works in conjunction with the SideKick
plugin. When you open a file in the jEdit editor, the SideKick plugin
checks to see if there is a parser plugin available for it. If it
finds one, it calls the parser to parse the file.
In the case of
a an sqr file it calls the SqrParser to parse the file. SqrParser
parses the file looking for heading, footings, reports, procedures
etc and passes the result back to the SideKick plugin.
The
SideKick plugin displays the results in a tree format in the
'Structure Browser' window.
It sends any error messages, captured
during parsing, to the Errolist Plugin. Th messages are displayed in
the Errorlist plugin window. Clicking an error message in the
Errorlist window highlights the erring line and moves the cursor to
that line.
This is the first version of the plugin and as such has limited functionalities. The following are additional features being looked into for future releases.
clicking a 'include' node on the tree opens the 'sqc' file in a new editor pane with it's structure displayed in the structure browser window.
display more sqr elements like select, sql, declares etc on the tree
right clicking a node displays a contextual menu with options to display logic flow, node properties etc.
code completion
contextual help
Some of the features would depend on additional enhancements to
the SideKick plugin. Right now SideKick plugin doesn't provide for
attaching actions and menus to the browser window. Hopefully we would
have those options soon.
I also have another plugin under
development. This would allow one to set various SQR run time options
and run the SQR pgm from within the jEdit environment. The log and
lis files will be automatically displayed within jEdit.
Version 0.10 (January 2004)
First version released
I look forward to any feedback, suggestions and bug reports. Email
them to me at the following address
satgurusrivastava@yahoo.com
Thanks
Satguru Srivastava