Difference between revisions of "WDSC tips/Editor"
(Enter key problem) |
Starbuck5250 (talk | contribs) (+categories) |
||
(29 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
==EDITOR== | ==EDITOR== | ||
For keyboard shortcuts, see [[WDSC shortcuts]] | For keyboard shortcuts, see [[WDSC shortcuts]] | ||
===Editor Commands === | ===Editor Commands === | ||
− | + | {{midrangearchive|/wdsci-l/200707/msg00061.html}} | |
(Note the post mentions ?SEU, I found ?Editor to be also useful) | (Note the post mentions ?SEU, I found ?Editor to be also useful) | ||
Line 23: | Line 21: | ||
There is more find info at [[WDSC Find Tips]] | There is more find info at [[WDSC Find Tips]] | ||
− | + | [[#top]] | |
===WDSCi vs SEU F15=Browse options=== | ===WDSCi vs SEU F15=Browse options=== | ||
− | + | {{midrangearchive|/wdsci-l/200603/msg00057.html|/wdsci-l/200711/msg00266.html}} | |
− | |||
− | |||
*To edit the same member, the method most analogous to the SEU {{keypress|F15}} browse is {{keypress|Ctrl|2}} to split view, | *To edit the same member, the method most analogous to the SEU {{keypress|F15}} browse is {{keypress|Ctrl|2}} to split view, | ||
Line 56: | Line 52: | ||
===Position my cursor to where I need to key additional data. (On IBM rqmts list)=== | ===Position my cursor to where I need to key additional data. (On IBM rqmts list)=== | ||
− | + | {{midrangearchive|/wdsci-l/200706/msg00409.html}} | |
− | In SEU, when I hit | + | In SEU, when I hit {{keypress|Enter}}, the editor will automatically position my cursor to where I need to key additional data? I know tab moves me to the next input position, but not whether it requires input. And by the time auto syntax checking informs me, I have spent time reading the message, relocating my cursor, etc. |
*There is no way to currently do this. It is on IBM's list of requirements. | *There is no way to currently do this. It is on IBM's list of requirements. | ||
Automatic cursor positioning can be configured by choosing 'Preferences' from the 'Window' menu. | Automatic cursor positioning can be configured by choosing 'Preferences' from the 'Window' menu. | ||
− | *In version 7, you are looking for <code>Remote Systems | + | *In version 7, you are looking for <code>Remote Systems→ Remote Systems LPEX Editor→ iSeries Parsers→ ILE RPG</code> |
− | + | [[#top]] | |
===Do I have to use the mouse to copy lines from one member to another?=== | ===Do I have to use the mouse to copy lines from one member to another?=== | ||
− | + | {{midrangearchive|/wdsci-l/200706/msg00409.html}} | |
Standard windows copy/paste keys can be used, along with a few extras provided in LPEX (check the Edit menu for selection options) | Standard windows copy/paste keys can be used, along with a few extras provided in LPEX (check the Edit menu for selection options) | ||
− | + | ||
To copy X lines, | To copy X lines, | ||
*put your cursor is on the first line of the block you want to move, | *put your cursor is on the first line of the block you want to move, | ||
− | *press Home, | + | *press {{keypress|Home}}, |
− | *then hold Shift and press the down arrow X times. | + | *then hold {{keypress|Shift}} and press the {{keypress|down arrow}} X times. |
− | *Now press Ctrl+C, | + | *Now press {{keypress|Ctrl+C}}, |
− | *then Shift+F6 (this is like Alt-Tab in windows, but for LPEX editor tabs) until you get to the target member. | + | *then {{keypress|Shift+F6}} (this is like {{keypress|Alt-Tab}} in windows, but for LPEX editor {{keypress|tabs}}) until you get to the target member. |
− | *Now find the line you want to insert at, and press Ctrl+V. | + | *Now find the line you want to insert at, and press {{keypress|Ctrl+V}}. |
− | Another method | + | Another method is to |
− | *mark the lines to copy using Alt-L, | + | *mark the lines to copy using {{keypress|Alt-L}}, |
− | *then copy them into position using Alt-C. | + | *then copy them into position using {{keypress|Alt-C}}. |
The lines will be inserted beginning with the line after your cursor position. You should also explore the other Select/Selected functions, which are listed under the Edit menu with their [[WDSC_shortcuts|keyboard shortcuts]]. | The lines will be inserted beginning with the line after your cursor position. You should also explore the other Select/Selected functions, which are listed under the Edit menu with their [[WDSC_shortcuts|keyboard shortcuts]]. | ||
Line 88: | Line 84: | ||
See list, [[WDSC_shortcuts]]. | See list, [[WDSC_shortcuts]]. | ||
− | + | [[#top]] | |
===How can I copy field names in to the member? (On IBM rqmts list)=== | ===How can I copy field names in to the member? (On IBM rqmts list)=== | ||
− | + | {{midrangearchive|/wdsci-l/200706/msg00409.html}} | |
*This is on IBM's list of requirements. | *This is on IBM's list of requirements. | ||
Line 99: | Line 95: | ||
*Drag and drop from table view to RS LPEX is currently not available. | *Drag and drop from table view to RS LPEX is currently not available. | ||
*You can always open the DDS source and copy the names from there. | *You can always open the DDS source and copy the names from there. | ||
− | *Be sure to have a look at the [[WDSC tips/Editor#How do I shift a block of text left/right?|rectangle select]] - it may come in handy for this (alt | + | *Be sure to have a look at the [[WDSC tips/Editor#How do I shift a block of text left/right?|rectangle select]] - it may come in handy for this ({{keypress|alt|R}}, {{keypress|alt|C}}.) |
− | + | [[#top]] | |
===Can I condition page ups and downs by cursor position?=== | ===Can I condition page ups and downs by cursor position?=== | ||
− | + | {{midrangearchive|/wdsci-l/200706/msg00409.html|/wdsci-l/200612/msg00013.html}} | |
*Or at least jump the cursor to the top or bottom of the displayed view, then I could roll by line up or down. | *Or at least jump the cursor to the top or bottom of the displayed view, then I could roll by line up or down. | ||
Line 111: | Line 107: | ||
Try this from the archives; | Try this from the archives; | ||
− | How to set an Alt + xx key to position the current line to the top or bottom of your source window. | + | How to set an {{keypress|Alt|+ xx}} key to position the current line to the top or bottom of your source window. |
− | *I use the alt page up and down keys, | + | *I use the {{keypress|alt|page up}} and {{keypress|alt|down keys}}, |
− | *I also have alt | + | *I also have {{keypress|alt|T}} set to put the current line at the top of the editor window. |
− | *Ctrl | + | *{{keypress|Ctrl|T}} (v7) will put the line where the cursor is at the top of the screen. |
Also check [[WDSC Workbench]] for more info on key remapping. | Also check [[WDSC Workbench]] for more info on key remapping. | ||
− | + | [[#top]] | |
===Do I have to continually save my work?=== | ===Do I have to continually save my work?=== | ||
− | + | {{midrangearchive|/wdsci-l/200706/msg00409.html}} | |
− | In SEU, when I hit | + | In SEU, when I hit {{keypress|Enter}}, I know it has been saved, even if I lose my session. |
*Remote Systems LPEX Editor has an auto-save feature. | *Remote Systems LPEX Editor has an auto-save feature. | ||
*Default is set to every 5 minutes. | *Default is set to every 5 minutes. | ||
− | *Check out Windows | + | *Check out Windows→ Preferences→Remote Systems→ LPEX Editor |
I save every PC document after every few lines. | I save every PC document after every few lines. | ||
− | Virtually all PC software recognises Ctrl | + | Virtually all PC software recognises {{keypress|Ctrl|S}} as the 'Save' sequence. |
− | + | [[#top]] | |
===Auto Marking Changes to the Source=== | ===Auto Marking Changes to the Source=== | ||
ref [[User:FKOL|FKOL]], 3 January 2007 (CST) | ref [[User:FKOL|FKOL]], 3 January 2007 (CST) | ||
− | Select Window | + | Select Window →Preferences→ Remote Systems→ Iseries→ LPEX Editor Parsers |
*Check the box with text 'Add signature to changed lines' | *Check the box with text 'Add signature to changed lines' | ||
*and enter your Change number in the Signature box. | *and enter your Change number in the Signature box. | ||
Line 146: | Line 142: | ||
also see [[WDSC tips/Editor#Record/Playback for Signature marks|Record/Playback for Signature marks]] | also see [[WDSC tips/Editor#Record/Playback for Signature marks|Record/Playback for Signature marks]] | ||
− | + | [[#top]] | |
===How do I shift a block of text left/right?=== | ===How do I shift a block of text left/right?=== | ||
Line 152: | Line 148: | ||
Select the block of text by putting the cursor on the upper left corner of the block. | Select the block of text by putting the cursor on the upper left corner of the block. | ||
− | Press | + | Press {{keypress|alt|R}}. |
Move the cursor to the lower left corner. | Move the cursor to the lower left corner. | ||
− | Press | + | Press {{keypress|alt|R}} again. |
− | Do '''NOT''' use Windows copy/paste (ctrl | + | Do '''NOT''' use Windows copy/paste ({{keypress|ctrl|c/x/v}}) |
You now have a block of text selected. | You now have a block of text selected. | ||
− | *An alternate way to select is | + | *An alternate way to select is {{keypress|alt|L}} (line) |
− | |||
and then hold down the Shift key while using the cursor keys to continue highlighting lines. | and then hold down the Shift key while using the cursor keys to continue highlighting lines. | ||
− | *You can also | + | *You can also {{keypress|alt|L}} on the first and last lines of the block. |
− | You can shift it left/right with alt | + | You can shift it left/right with {{keypress|alt|F7}}/{{keypress|alt|F8}} If you remap the keys, the action is ''blockShiftLeft'' and ''blockShiftRight'' |
− | *You can shift it via the menu Edit | + | *You can shift it via the menu Edit→Selected→Shift selection |
*You can uppercase or lowercase it with alt-k/alt-i or via the menu | *You can uppercase or lowercase it with alt-k/alt-i or via the menu | ||
*You can move it: position the cursor where you want the upper left corner to end up and press alt-m or use the menu | *You can move it: position the cursor where you want the upper left corner to end up and press alt-m or use the menu | ||
− | *You can copy it with alt | + | *You can copy it with {{keypress|alt|C}} |
− | *You can delete it with alt | + | *You can delete it with {{keypress|alt|D}} |
− | Remember that | + | Remember that {{keypress|alt|U}} de-selects the block. |
*Note the following will shift the entire line of code, not just a section or block. | *Note the following will shift the entire line of code, not just a section or block. | ||
Line 177: | Line 172: | ||
See list of other keyboard shortcuts: [[WDSC_shortcuts]]. | See list of other keyboard shortcuts: [[WDSC_shortcuts]]. | ||
− | + | [[#top]] | |
===Vertical line in WDSCI editor=== | ===Vertical line in WDSCI editor=== | ||
− | + | {{midrangearchive|/wdsci-l/200711/msg00174.html}} | |
− | Select Window | + | Select Window→ Preferences→ LPEX Editor→ User commands |
*Click on the drop down arrow in Class Name box, | *Click on the drop down arrow in Class Name box, | ||
*select com.ibm.lpex.samples.HairlineCommand | *select com.ibm.lpex.samples.HairlineCommand | ||
− | *Click Set apply OK | + | *Click Set, apply, OK. |
*Then in the LPEX command line I enter | *Then in the LPEX command line I enter | ||
*'hairline cursor' or 'hairline off', to turn on and off. | *'hairline cursor' or 'hairline off', to turn on and off. | ||
− | + | [[#top]] | |
===Prevent Enter generating a new line === | ===Prevent Enter generating a new line === | ||
− | + | {{midrangearchive|/wdsci-l/200710/msg00422.html}} | |
− | *Window | + | *Window→ Preferences→ LPEX Editor→ User Key actions |
− | *Map Enter to action 'home' or 'end' | + | *Map {{keypress|Enter}} to action 'home' or 'end' |
− | Note if [[WDSC tips/Editor#Automatic structure completion|Automatic structure completion]] is on then 'Enter' will always generate a new line. | + | Note if [[WDSC tips/Editor#Automatic structure completion|Automatic structure completion]] is on then '{{keypress|Enter}}' will always generate a new line. |
<pre> | <pre> | ||
Helpful Keys to edit lines | Helpful Keys to edit lines | ||
− | CTRL | + | CTRL|Enter Generate an empty Line |
− | CTRL | + | CTRL|Backspace Delete a line |
− | CTRL | + | CTRL|Delete Field Exit |
− | Home | + | Home Position cursor to beginning of line |
− | Home then SHFT | + | Home then back-cursor Position cursor in Line Numbers |
+ | Home then SHFT|Tab Position cursor in Line Numbers | ||
</pre> | </pre> | ||
See list of other keyboard shortcuts: [[WDSC_shortcuts]]. | See list of other keyboard shortcuts: [[WDSC_shortcuts]]. | ||
− | + | [[#top]] | |
===To Print RPG Indented Source=== | ===To Print RPG Indented Source=== | ||
− | + | {{midrangearchive|/wdsci-l/200710/msg00482.html}} | |
*You can print using the command line below the editor window | *You can print using the command line below the editor window | ||
− | *press Esc when you are in the source. Or just click | + | *press {{keypress|Esc}} when you are in the source. Or just click the command line. |
*Type ? print - you will see all the options. | *Type ? print - you will see all the options. | ||
*To get the entire source use | *To get the entire source use | ||
Line 223: | Line 219: | ||
*If you want line numbers and/or shading of elements, make the obvious changes. | *If you want line numbers and/or shading of elements, make the obvious changes. | ||
− | *The print command works even if the File | + | *The print command works even if the File→Print option is disabled - as it is for indented source. |
− | + | [[#top]] | |
===To show dates for source lines:=== | ===To show dates for source lines:=== | ||
− | + | {{midrangearchive|/wdsci-l/200711/msg00201.html}} | |
*1. Open source in LPEX | *1. Open source in LPEX | ||
Line 238: | Line 234: | ||
*3. Enter the date (or range) and selection criteria on the popup. | *3. Enter the date (or range) and selection criteria on the popup. | ||
− | + | [[#top]] | |
===See SQL HOST variables in OUTLINE view. (is not possible) === | ===See SQL HOST variables in OUTLINE view. (is not possible) === | ||
− | + | {{midrangearchive|/wdsci-l/200711/msg00227.html}} | |
*I've long wished that SQL host variables would be part of the outline. | *I've long wished that SQL host variables would be part of the outline. | ||
Line 249: | Line 245: | ||
See [[WDSC tips/Find#Find Field usage (for SQL where OUTLINE doesnt work) |Find Field usage (for SQL where OUTLINE doesnt work)]] for a work around. | See [[WDSC tips/Find#Find Field usage (for SQL where OUTLINE doesnt work) |Find Field usage (for SQL where OUTLINE doesnt work)]] for a work around. | ||
− | + | [[#top]] | |
===Downloading source to PC to work offline === | ===Downloading source to PC to work offline === | ||
− | + | {{midrangearchive|/wdsci-l/200511/msg00015.html}} | |
*Select all the members that you want to download, | *Select all the members that you want to download, | ||
Line 264: | Line 260: | ||
*You can also travel with this project by exporting it, | *You can also travel with this project by exporting it, | ||
*right click on project name and selecting Export. | *right click on project name and selecting Export. | ||
− | *Then select Project Interchange,check off your project, | + | *Then select Other, Project Interchange, check off your project, |
*name a zip file to store it in, click finish. | *name a zip file to store it in, click finish. | ||
Line 271: | Line 267: | ||
*You will need to have WDSCi installed on your home PC. | *You will need to have WDSCi installed on your home PC. | ||
− | *In Iseries Project Navigator you need to Import the zip file, reverse the Export steps above. You may need to create a project. File | + | *In Iseries Project Navigator you need to Import the zip file, reverse the Export steps above. |
+ | *You may need to create a project. File→ New→ Iseries Project | ||
Be aware of the issue with Iseries Projects in the [[WDSC tips/Compile#RPG source was not being saved|RPG source was not being saved]] | Be aware of the issue with Iseries Projects in the [[WDSC tips/Compile#RPG source was not being saved|RPG source was not being saved]] | ||
tip. | tip. | ||
− | + | Don Yantzi has some interesting comments on Iseries Projects PLUS MORE tips [http://wdsc.wordpress.com/category/tips/]. | |
+ | |||
+ | [[#top]] | ||
+ | |||
+ | ===OFFLINE work vs ONLINE === | ||
+ | |||
+ | {{midrangearchive|/wdsci-l/200311/msg00179.html}} | ||
+ | |||
+ | There is a difference between editing in Iseries Projects and Editing in RSE. | ||
+ | |||
+ | In Iseries Projects you are working OFFLINE. WSDCi will [[WDSC tips/Editor#Tracking Source changes|track]] your changes. | ||
+ | |||
+ | In RSE you are working ONLINE. WDSCI does no tracking. | ||
+ | |||
+ | Even on your local PC you can work OFFLINE. | ||
+ | |||
+ | When you are ready you PUSH your changes to the ONLINE source. | ||
+ | *Right click on your source Projects Remote Actions→Push Selected. | ||
+ | |||
+ | You are warned if someone else has done other changes while you did yours. | ||
+ | |||
+ | |||
+ | [[#top]] | ||
===Fast Open another Source === | ===Fast Open another Source === | ||
− | + | {{midrangearchive|/wdsci-l/200509/msg00045.html}} | |
− | Use Ctrl | + | Use {{keypress|Ctrl| Shift| A}} |
Check [[WDSC shortcuts]] | Check [[WDSC shortcuts]] | ||
− | + | [[#top]] | |
===Record/Playback for Signature marks=== | ===Record/Playback for Signature marks=== | ||
− | + | {{midrangearchive|/wdsci-l/200801/msg00118.html}} | |
You can also record the key strokes by using the start and stop recording | You can also record the key strokes by using the start and stop recording | ||
Line 298: | Line 317: | ||
also see [[WDSC tips/Editor#Auto Marking Changes to the Source|Auto Marking Changes to the Source]] | also see [[WDSC tips/Editor#Auto Marking Changes to the Source|Auto Marking Changes to the Source]] | ||
− | + | [[#top]] | |
===Field Exit=== | ===Field Exit=== | ||
− | + | {{midrangearchive|/wdsci-l/200509/msg00139.html}} | |
− | Ctrl | + | {{keypress|Ctrl|Del}} works like {{keypress|Field Exit}}. |
− | + | [[#top]] | |
===Automatic structure completion === | ===Automatic structure completion === | ||
− | + | {{midrangearchive|/wdsci-l/200602/msg00001.html}} | |
− | In Window | + | In Window→ Preferences→ Remote Systems→ iSeries→LPEX Editor Parsers→ILE RPG |
Check the 'Automatic closure of control block' and select your style. | Check the 'Automatic closure of control block' and select your style. | ||
Line 316: | Line 335: | ||
You may need to 'Check' the 'Repeat previous specification type' to see the 'Automatic closure of control block' | You may need to 'Check' the 'Repeat previous specification type' to see the 'Automatic closure of control block' | ||
− | + | [[#top]] | |
===Enter Key not Working === | ===Enter Key not Working === | ||
− | + | {{midrangearchive|/wdsci-l/200803/msg00005.html}} | |
*The profile had been changed to LPEX. | *The profile had been changed to LPEX. | ||
*Changed it back to Seu. | *Changed it back to Seu. | ||
− | |||
− | FWIW My setting is LPEX and | + | Windows →Preferences → LPEX Editor |
+ | |||
+ | Change the Editor Profile to SEU | ||
+ | |||
+ | FWIW My setting is LPEX and {{keypress|Enter}} key is OK. | ||
+ | |||
+ | [[#top]] | ||
+ | |||
+ | ===Snippets=== | ||
+ | Check [[Snippets#SNIPPETS|SNIPPETS]] | ||
+ | |||
+ | [[#top]] | ||
+ | |||
+ | ===Switch Auto Syntax Check On/Off=== | ||
+ | {{midrangearchive|/wdsci-l/200602/msg00303.html}} | ||
+ | |||
+ | If you are not editing the SQL statements and want to just enable the | ||
+ | syntax checking of the rest of your RPG source, you can turn off the SQL | ||
+ | syntax checking. | ||
+ | |||
+ | *Windows →Preferences→ Remote Systems→iSeries→LPEX Editor Parsers→ILE RPG, | ||
+ | *check box "Automatic syntax checking of SQL statements (performed on the server)" | ||
+ | |||
+ | |||
+ | [[#top]] | ||
+ | |||
+ | ===CL auto format=== | ||
+ | {{midrangearchive|/wdsci-l/200306/msg00162.html}} | ||
+ | |||
+ | To turn it on/off, go to Windows→ Preferences→ RemoteSystems→Remote Systems Lpex | ||
+ | Editor→ iSeries Parsers→ CL | ||
+ | |||
+ | |||
+ | [[#top]] | ||
+ | |||
+ | ===Show fields in a file=== | ||
+ | {{midrangearchive|/wdsci-l/200706/msg00344.html}} | ||
+ | |||
+ | Right-click on the line with the F-spec and select {{keypress|Show fields}} | ||
+ | |||
+ | [[#top]] | ||
+ | |||
+ | ===Refresh Cache for New Field=== | ||
+ | {{midrangearchive|/wdsci-l/200808/msg00094.html}} | ||
+ | |||
+ | Select a FILE OBJECT, not source member. Right click and you should see {{keypress|Cache File Descriptions}}. | ||
+ | |||
+ | VERIFY (prompt)> Refresh Cache will also work. | ||
+ | |||
+ | [[#top]] | ||
+ | |||
+ | |||
+ | ===Work on a fix while keeping another project open=== | ||
+ | |||
+ | {{midrangearchive|/wdsci-l/200807/msg00141.html}} | ||
+ | |||
+ | Open another window in the same workspace Window →New Window. | ||
+ | |||
+ | [[#top]] | ||
+ | |||
+ | ===Tracking Source changes=== | ||
+ | {{midrangearchive|/wdsci-l/200604/msg00049.html}} | ||
+ | |||
+ | This option is only available for [[WDSC tips/Editor#Downloading source to PC to work offline|Offline Projects ]] | ||
+ | For normal projects this option does not show up. | ||
+ | |||
+ | A local history of a file is maintained by WDSCi. | ||
+ | |||
+ | The default settings allow you to save the last 50 versions of a file for at least seven days. | ||
+ | |||
+ | If you make a mistake and want to go back to an older version of a file, you | ||
+ | don’t need to have a team environment installed. | ||
+ | |||
+ | You can use your local history feature. | ||
+ | |||
+ | To change the default setting for the local history feature, select Window→Preferences→Workbench→Local History. | ||
+ | |||
+ | To use this feature, right-click any file in the Navigator view and select Replace With →Local History. | ||
+ | |||
+ | The workbench shows you the list of available versions and the compare utility. | ||
+ | |||
+ | |||
+ | [[#top]] | ||
+ | |||
+ | |||
+ | ===Column Sensitive Editing=== | ||
+ | |||
+ | {{midrangearchive|/wdsci-l/200406/msg00155.html}} | ||
+ | |||
+ | *Window→Preferences→Remote Systems→iSeries→Lpex Editor Parsers | ||
+ | *Check Column sensitive editing | ||
+ | |||
+ | There is a IBM mod. request to have this setting at the Parser level. | ||
+ | |||
+ | |||
+ | [[#top]] | ||
+ | |||
+ | ===Block Nesting === | ||
+ | |||
+ | {{midrangearchive|/wdsci-l/200801/msg00069.html}} | ||
+ | |||
+ | Indent View does not work for CLP, but Block Nesting works for RPG and CLP. | ||
+ | |||
+ | Position Cursor on the IF Right Click → Source→Show Block Nesting | ||
+ | |||
+ | (max 5 levels deep) | ||
+ | |||
+ | Crtl F5 to remove Nesting Marks | ||
+ | |||
+ | [[#top]] | ||
+ | |||
+ | === View Source Side By Side === | ||
+ | |||
+ | {{midrangearchive|/wdsci-l/200602/msg00153.html}} | ||
+ | |||
+ | In RSE you can right click on the tab and drag it across until the | ||
+ | cursor changes to a left pointing arrow and then the sources will appear | ||
+ | side by side. | ||
+ | |||
+ | Right Click and drag back to restore. | ||
+ | |||
+ | [[#top]] | ||
+ | |||
+ | === Refreshing the Project Perspective === | ||
+ | |||
+ | {{midrangearchive|/wdsci-l/200910/msg00047.html}} | ||
+ | |||
+ | Window→Open Perspective→Iseries Projects | ||
+ | |||
+ | To see the status of your local source versus the contents of the remote source members. | ||
+ | *In tab iSeries Project Navigator click 'menu' (upside-down triangle icon) | ||
+ | *'menu'→Show Local/Remote Decorator | ||
+ | *'menu'→Show→Remote Objects | ||
+ | |||
+ | To make iSeries Projects match the host source. | ||
+ | |||
+ | If you have local changes or new members you may want to save them first. | ||
+ | *right click on src→Remote Actions→Push Changes | ||
+ | To Refresh from host | ||
+ | *right click on src→Replace from Associated Library | ||
+ | |||
+ | or | ||
+ | |||
+ | In Remote Systems View (after you Delete the source in iSeries Projects) | ||
+ | *right click on src → Add to iSeries Project | ||
+ | *or right click on src → Make Available Offline | ||
+ | |||
+ | [[#top]] | ||
− | + | == Categories == | |
+ | [[Category:WDSC]] | ||
+ | [[Category:Editors]] |
Latest revision as of 22:04, 16 January 2015
Contents
- 1 EDITOR
- 1.1 Editor Commands
- 1.2 WDSCi vs SEU F15=Browse options
- 1.3 Position my cursor to where I need to key additional data. (On IBM rqmts list)
- 1.4 Do I have to use the mouse to copy lines from one member to another?
- 1.5 How can I copy field names in to the member? (On IBM rqmts list)
- 1.6 Can I condition page ups and downs by cursor position?
- 1.7 Do I have to continually save my work?
- 1.8 Auto Marking Changes to the Source
- 1.9 How do I shift a block of text left/right?
- 1.10 Vertical line in WDSCI editor
- 1.11 Prevent Enter generating a new line
- 1.12 To Print RPG Indented Source
- 1.13 To show dates for source lines:
- 1.14 See SQL HOST variables in OUTLINE view. (is not possible)
- 1.15 Downloading source to PC to work offline
- 1.16 OFFLINE work vs ONLINE
- 1.17 Fast Open another Source
- 1.18 Record/Playback for Signature marks
- 1.19 Field Exit
- 1.20 Automatic structure completion
- 1.21 Enter Key not Working
- 1.22 Snippets
- 1.23 Switch Auto Syntax Check On/Off
- 1.24 CL auto format
- 1.25 Show fields in a file
- 1.26 Refresh Cache for New Field
- 1.27 Work on a fix while keeping another project open
- 1.28 Tracking Source changes
- 1.29 Column Sensitive Editing
- 1.30 Block Nesting
- 1.31 View Source Side By Side
- 1.32 Refreshing the Project Perspective
- 2 Categories
EDITOR
For keyboard shortcuts, see WDSC shortcuts
Editor Commands
- Original article(s) in the midrange archive: [1]
(Note the post mentions ?SEU, I found ?Editor to be also useful)
- Type ?Editor on the command line
- Click on 'Default editor commands' to see the commands
- Click on the command for more info, including usage
Check LPEX commands.
- Note the Short Commands (see following small extract from the text)
/text Find the next occurrence of the specified text. -/text Find the specified text searching backwards from the current position. 'text Find the next occurrence of the specified text. The search is a case-sensitive search. -'text Find the specified text searching backwards from the current position. The search is a case-sensitive search.
(there is more info in the help text)
There is more find info at WDSC Find Tips
WDSCi vs SEU F15=Browse options
- Original article(s) in the midrange archive: [2][3]
- To edit the same member, the method most analogous to the SEU F15 browse is Ctrl+2 to split view,
- click on subroutine name in Outline View to position the new view to the subroutine,
- do whatever,
- Ctrl+0 to close the second view.
Note that new views opened this way can all allow editing, and you can have up to 5 views open on a single member, not just 2 as in SEU.
- To edit/browse a different member, Ctrl+Shift+A (or open using any other method). Then drag the member name tab down or to the right until it turns into an arrow and release. This splits the screen (top/bottom or left right) for editing/browse. Does not work when in maximized mode.
- Alternately,
- just go to the subroutine by clicking on it in the Outline View,
- do whatever,
- then return to the Exsr by clicking on the line number where the subroutine is used.
- A third way is to set a quick mark and return to it.
- A fourth way is to set a named mark and return to it.
- A fifth way (but the Outline View is easier) is to filter the source by the subroutine name
- (either Ctrl+F, enter name, click All, or right click, Selected, Filter selected,
- which can also be set up as a key combo if you like),
- put the cursor on the Exsr or Begsr as you choose, and then Ctrl+W.
Note: If you have 6.0.0.1, you're too far behind - I believe you need 6.0.1.0 or higher to be able to open multiple views on the same member.
Position my cursor to where I need to key additional data. (On IBM rqmts list)
- Original article(s) in the midrange archive: [4]
In SEU, when I hit Enter, the editor will automatically position my cursor to where I need to key additional data? I know tab moves me to the next input position, but not whether it requires input. And by the time auto syntax checking informs me, I have spent time reading the message, relocating my cursor, etc.
- There is no way to currently do this. It is on IBM's list of requirements.
Automatic cursor positioning can be configured by choosing 'Preferences' from the 'Window' menu.
- In version 7, you are looking for
Remote Systems→ Remote Systems LPEX Editor→ iSeries Parsers→ ILE RPG
Do I have to use the mouse to copy lines from one member to another?
- Original article(s) in the midrange archive: [5]
Standard windows copy/paste keys can be used, along with a few extras provided in LPEX (check the Edit menu for selection options)
To copy X lines,
- put your cursor is on the first line of the block you want to move,
- press Home,
- then hold Shift and press the down arrow X times.
- Now press Ctrl+C,
- then Shift+F6 (this is like Alt-Tab in windows, but for LPEX editor tabs) until you get to the target member.
- Now find the line you want to insert at, and press Ctrl+V.
Another method is to
- mark the lines to copy using Alt-L,
- then copy them into position using Alt-C.
The lines will be inserted beginning with the line after your cursor position. You should also explore the other Select/Selected functions, which are listed under the Edit menu with their keyboard shortcuts.
See list, WDSC_shortcuts.
How can I copy field names in to the member? (On IBM rqmts list)
- Original article(s) in the midrange archive: [6]
- This is on IBM's list of requirements.
- I added a table to the Table View, I can see all my fields, but can't copy and paste from there.
- Drag and drop from table view to RS LPEX is currently not available.
- You can always open the DDS source and copy the names from there.
- Be sure to have a look at the rectangle select - it may come in handy for this (alt+R, alt+C.)
Can I condition page ups and downs by cursor position?
- Original article(s) in the midrange archive: [7][8]
- Or at least jump the cursor to the top or bottom of the displayed view, then I could roll by line up or down.
- Keys can be easily remapped to do other things - check the mailing list archives for discussions on this at length.
- You'll also want to read the reference help for what LPEX actions are available/do (scrollTop, scrollUp come to mind)
Try this from the archives; How to set an Alt++ xx key to position the current line to the top or bottom of your source window.
- I use the alt+page up and alt+down keys,
- I also have alt+T set to put the current line at the top of the editor window.
- Ctrl+T (v7) will put the line where the cursor is at the top of the screen.
Also check WDSC Workbench for more info on key remapping.
Do I have to continually save my work?
- Original article(s) in the midrange archive: [9]
In SEU, when I hit Enter, I know it has been saved, even if I lose my session.
- Remote Systems LPEX Editor has an auto-save feature.
- Default is set to every 5 minutes.
- Check out Windows→ Preferences→Remote Systems→ LPEX Editor
I save every PC document after every few lines.
Virtually all PC software recognises Ctrl+S as the 'Save' sequence.
Auto Marking Changes to the Source
ref FKOL, 3 January 2007 (CST)
Select Window →Preferences→ Remote Systems→ Iseries→ LPEX Editor Parsers
- Check the box with text 'Add signature to changed lines'
- and enter your Change number in the Signature box.
- Click OK
Now whenever you change a line of source code, the 'signature' will be placed in pos 1-5 of the source line.
also see Record/Playback for Signature marks
How do I shift a block of text left/right?
ref Starbuck5250, 5 November 2007 (CST)
Select the block of text by putting the cursor on the upper left corner of the block.
Press alt+R. Move the cursor to the lower left corner. Press alt+R again. Do NOT use Windows copy/paste (ctrl+c/x/v) You now have a block of text selected.
- An alternate way to select is alt+L (line)
and then hold down the Shift key while using the cursor keys to continue highlighting lines.
- You can also alt+L on the first and last lines of the block.
You can shift it left/right with alt+F7/alt+F8 If you remap the keys, the action is blockShiftLeft and blockShiftRight
- You can shift it via the menu Edit→Selected→Shift selection
- You can uppercase or lowercase it with alt-k/alt-i or via the menu
- You can move it: position the cursor where you want the upper left corner to end up and press alt-m or use the menu
- You can copy it with alt+C
- You can delete it with alt+D
Remember that alt+U de-selects the block.
- Note the following will shift the entire line of code, not just a section or block.
You can use SEU mode line commands LL and RR typed over the sequence number area. LLnn will shift left nn columns.
See list of other keyboard shortcuts: WDSC_shortcuts.
Vertical line in WDSCI editor
- Original article(s) in the midrange archive: [10]
Select Window→ Preferences→ LPEX Editor→ User commands
- Click on the drop down arrow in Class Name box,
- select com.ibm.lpex.samples.HairlineCommand
- Click Set, apply, OK.
- Then in the LPEX command line I enter
- 'hairline cursor' or 'hairline off', to turn on and off.
Prevent Enter generating a new line
- Original article(s) in the midrange archive: [11]
- Window→ Preferences→ LPEX Editor→ User Key actions
- Map Enter to action 'home' or 'end'
Note if Automatic structure completion is on then 'Enter' will always generate a new line.
Helpful Keys to edit lines CTRL|Enter Generate an empty Line CTRL|Backspace Delete a line CTRL|Delete Field Exit Home Position cursor to beginning of line Home then back-cursor Position cursor in Line Numbers Home then SHFT|Tab Position cursor in Line Numbers
See list of other keyboard shortcuts: WDSC_shortcuts.
To Print RPG Indented Source
- Original article(s) in the midrange archive: [12]
- You can print using the command line below the editor window
- press Esc when you are in the source. Or just click the command line.
- Type ? print - you will see all the options.
- To get the entire source use
print tokenized off lineNumbers off
- To print only what you've selected, use
print block tokenized off lineNumbers off
- If you want line numbers and/or shading of elements, make the obvious changes.
- The print command works even if the File→Print option is disabled - as it is for indented source.
To show dates for source lines:
- Original article(s) in the midrange archive: [13]
- 1. Open source in LPEX
- 2. Right click on the source pane, select SOURCE, then SHOW DATE AREA.
To filter source line by date:
- 1. Open source in LPEX
- 2. Right click on the source pane, select FILTER VIEW, then DATE.
- 3. Enter the date (or range) and selection criteria on the popup.
See SQL HOST variables in OUTLINE view. (is not possible)
- Original article(s) in the midrange archive: [14]
- I've long wished that SQL host variables would be part of the outline.
- And file references in SQL statements - they CAN be parsed, after all, otherwise they could never be run by the system.
- So it is not impossible, just not in scope, it seems.
See Find Field usage (for SQL where OUTLINE doesnt work) for a work around.
Downloading source to PC to work offline
- Original article(s) in the midrange archive: [15]
- Select all the members that you want to download,
- right click,
- select Make available offline.
- Select Yes to the next dialog box.
WDSC will download all the selected members to a iSeries project (named in my version as the CONNECTIONNAME_WINUSERNAME).
- You can also travel with this project by exporting it,
- right click on project name and selecting Export.
- Then select Other, Project Interchange, check off your project,
- name a zip file to store it in, click finish.
You can then put the zip on a mem-stick and take it home (if that's what you want to do with your time off).
- You will need to have WDSCi installed on your home PC.
- In Iseries Project Navigator you need to Import the zip file, reverse the Export steps above.
- You may need to create a project. File→ New→ Iseries Project
Be aware of the issue with Iseries Projects in the RPG source was not being saved tip.
Don Yantzi has some interesting comments on Iseries Projects PLUS MORE tips [16].
OFFLINE work vs ONLINE
- Original article(s) in the midrange archive: [17]
There is a difference between editing in Iseries Projects and Editing in RSE.
In Iseries Projects you are working OFFLINE. WSDCi will track your changes.
In RSE you are working ONLINE. WDSCI does no tracking.
Even on your local PC you can work OFFLINE.
When you are ready you PUSH your changes to the ONLINE source.
- Right click on your source Projects Remote Actions→Push Selected.
You are warned if someone else has done other changes while you did yours.
Fast Open another Source
- Original article(s) in the midrange archive: [18]
Use Ctrl+ Shift+ A
Check WDSC shortcuts
Record/Playback for Signature marks
- Original article(s) in the midrange archive: [19]
You can also record the key strokes by using the start and stop recording icons ( small squares) on the toolbar.
- Press the start recording icon, insert your signature once, then stop the recording.
- Everytime you want to insert the signature,
- press the Playback recording (green arrow beside the two squares).
also see Auto Marking Changes to the Source
Field Exit
- Original article(s) in the midrange archive: [20]
Ctrl+Del works like Field Exit.
Automatic structure completion
- Original article(s) in the midrange archive: [21]
In Window→ Preferences→ Remote Systems→ iSeries→LPEX Editor Parsers→ILE RPG
Check the 'Automatic closure of control block' and select your style.
You may need to 'Check' the 'Repeat previous specification type' to see the 'Automatic closure of control block'
Enter Key not Working
- Original article(s) in the midrange archive: [22]
- The profile had been changed to LPEX.
- Changed it back to Seu.
Windows →Preferences → LPEX Editor
Change the Editor Profile to SEU
FWIW My setting is LPEX and Enter key is OK.
Snippets
Check SNIPPETS
Switch Auto Syntax Check On/Off
- Original article(s) in the midrange archive: [23]
If you are not editing the SQL statements and want to just enable the syntax checking of the rest of your RPG source, you can turn off the SQL syntax checking.
- Windows →Preferences→ Remote Systems→iSeries→LPEX Editor Parsers→ILE RPG,
- check box "Automatic syntax checking of SQL statements (performed on the server)"
CL auto format
- Original article(s) in the midrange archive: [24]
To turn it on/off, go to Windows→ Preferences→ RemoteSystems→Remote Systems Lpex Editor→ iSeries Parsers→ CL
Show fields in a file
- Original article(s) in the midrange archive: [25]
Right-click on the line with the F-spec and select Show fields
Refresh Cache for New Field
- Original article(s) in the midrange archive: [26]
Select a FILE OBJECT, not source member. Right click and you should see Cache File Descriptions.
VERIFY (prompt)> Refresh Cache will also work.
Work on a fix while keeping another project open
- Original article(s) in the midrange archive: [27]
Open another window in the same workspace Window →New Window.
Tracking Source changes
- Original article(s) in the midrange archive: [28]
This option is only available for Offline Projects For normal projects this option does not show up.
A local history of a file is maintained by WDSCi.
The default settings allow you to save the last 50 versions of a file for at least seven days.
If you make a mistake and want to go back to an older version of a file, you don’t need to have a team environment installed.
You can use your local history feature.
To change the default setting for the local history feature, select Window→Preferences→Workbench→Local History.
To use this feature, right-click any file in the Navigator view and select Replace With →Local History.
The workbench shows you the list of available versions and the compare utility.
Column Sensitive Editing
- Original article(s) in the midrange archive: [29]
- Window→Preferences→Remote Systems→iSeries→Lpex Editor Parsers
- Check Column sensitive editing
There is a IBM mod. request to have this setting at the Parser level.
Block Nesting
- Original article(s) in the midrange archive: [30]
Indent View does not work for CLP, but Block Nesting works for RPG and CLP.
Position Cursor on the IF Right Click → Source→Show Block Nesting
(max 5 levels deep)
Crtl F5 to remove Nesting Marks
View Source Side By Side
- Original article(s) in the midrange archive: [31]
In RSE you can right click on the tab and drag it across until the cursor changes to a left pointing arrow and then the sources will appear side by side.
Right Click and drag back to restore.
Refreshing the Project Perspective
- Original article(s) in the midrange archive: [32]
Window→Open Perspective→Iseries Projects
To see the status of your local source versus the contents of the remote source members.
- In tab iSeries Project Navigator click 'menu' (upside-down triangle icon)
- 'menu'→Show Local/Remote Decorator
- 'menu'→Show→Remote Objects
To make iSeries Projects match the host source.
If you have local changes or new members you may want to save them first.
- right click on src→Remote Actions→Push Changes
To Refresh from host
- right click on src→Replace from Associated Library
or
In Remote Systems View (after you Delete the source in iSeries Projects)
- right click on src → Add to iSeries Project
- or right click on src → Make Available Offline