WDSC LPEX

From MidrangeWiki
Revision as of 13:39, 2 July 2008 by Starbuck5250 (talk | contribs) (Fonts: +Courier New-8)
Jump to: navigation, search

WDSC LPEX - Tips for using LPEX (Live Parsing eXtensible Editor)

LPEX is a Java-based editor that 'knows' about System i code, especially in its accommodation of source members, sequence number and date stamp as well as parsers/syntax checkers for DDS, RPG and CL (among others.)

Some LPEX features:

  • Syntax checking
  • Colorised source
  • Outline view
  • Content assist
  • Code templates
  • RPG wizards
  • Automatic FOR/DO completion
  • Context-sensitive help
  • Context-sensitive editing
  • Regular expression Find/replace
  • 50 visible lines of code
  • Automatic indenting
  • Side-by-side editing
  • Filtering
  • Subsetting
  • Show block nesting
  • Filters and filter pools
  • Verify
  • Bookmarks
  • Tasks
  • Reference manuals included

Keyboard shortcuts

Keyboard Shortcuts listing

— or —

In the LPEX command line type "?action", "?query", "?lpex" or "?seu" (in the full version of WDSC) and you are taken to the appropriate help page. Note on WDSC Lite V6 typing "?seu" brought up nothing.

WDSC 7.x
Anywhere in the workbench press Ctl+Shft+L. This brings up a window called "Key Assist", which can also be accessed via the Help menu.

Drilling into an "in source" subroutine or subprocedure (RPG)

  • Position cursor over subroutine or subprocedure name.
  • Press Ctrl-Q (set a quick mark position).
  • Press F3 to move LPEX editor to that subroutine or subprocedure.
  • When you are finished with that subroutine or subprocedure and wish to return

to the call of the subroutine or subprocedure press Alt-Q.

Mattt 13:56, 29 June 2007 (CDT)

Fonts

A good font to use on some displays is the ProggyClean fonts. Located at | Proggy Progamming Fonts Download Area

  1. Download your font of choice.
  2. Install the font into your font folder (usually under the C:\Windows system folder).
  3. Window → Preferences → LPEX Editor → Appearance.
  4. Click on the Font button to change the font to Proggy font you installed.

To assign a font to the editor's printed output, you can use the set command from the command line: set default.print.font ProggyCleanTTSZBP-11 or exit WDSC and edit the properties file located in [path to workspace]\.metadata\.plugins\com.ibm.lpex\Editor.properties

default.swt.print.font.fontData="1|ProggyCleanTTSZBP|11|0|WINDOWS|1|-15|0|0|0|0|0|0|0|1|0|0|0|0|ProggyCleanTTSZBP"
default.swt.print.font="ProggyCleanTTSZBP-regular-11"

set default.print.font "Courier New-8" seems like a decent fit for US 8-1/2 x 11 inch paper printed in portrait mode.

Tip o' the hat to Adrian over at the Lab in Toronto for the printing font tips.

Remap keyboard shortcuts

  • The default action for Alt-S is to split the line and start the split at the left most position of the new line.
  • Many times it is desired to have it split and stay were it split within the new line.
  • From there you can move the new line text only a short distance.
  • To make Alt-S split and leave the starting position of the new text in the same place you want to run the ---
Split and Shift action.


Reassign a shortcut key for LPEX

  1. Window → Preferences → LPEX Editor → User Key Actions.
  2. In the Key entry box, key a-s
  3. In the Action drop down, choose splitAndShift action
  4. Press the Set button.
  5. Press the Apply button.

Mattt 13:56, 29 June 2007 (CDT)

LPEX command line

Search for the action of a keyboard shortcut.

  1. Goto into the command line by pressing Esc (if not already there).
  2. key (without quotes) "query keyAction.X-Y" where X is the keyboard shortcut in the form of a=Alt,c=Ctl or s=Shift and Y is any keyboard key.
    • Example, "query keyAction.f4" reports back in default situations "showSourcePromptView".

Search for the keyboard shortcut of an action.

  1. Goto into the command line by pressing Esc (if not already there).
  2. key (without quotes) "query actionKey.ACTION" where ACTION is the LPEX editor action.
    • Example, "query keyAction.showSourcePromptView" reports back in default situations "f4.t".

In the LPEX command line type "?action", "?query", "?lpex" or "?seu" (in the full version of WDSC) and you are taken to the appropriate help page. Note on WDSC Lite V6 typing "?seu" brought up nothing.

New actions

You can add new actions you find by default in the system or one you develop. There are some sample actions that are useful to a degree. Two of them seem the most useful. They are composeAction and setDateAction.

Map these to any keyboard shortcut you wish, I jsut choose Alt-F1 and Alt-F2 since they were not used.

  1. Window → Preferences → LPEX Editor → User Actions.
  2. In the Name entry box, key actionClass.compose
  3. In the Class name entry box, key com.ibm.lpex.samples.ComposeAction
  4. Press the Set button.
  5. Press the Apply button.
  6. Window → Preferences → LPEX Editor → User Key Actions.
  7. In the Key entry box, key a-F1
  8. In the Action drop down, choose composeAction action
  9. Press the Set button.
  10. Press the Apply button.
Repeat the above steps for setDateAction replacing Compose with SetDate and Compose with SetDate.  

IMPORTANT text case is very important here.

These actions were obtained from the online help by searching for "lpex samples".

Mattt 13:56, 29 June 2007 (CDT)

Catgeories