|
Hi Adrian, Many thanks for this. I'll have a play. It's extremely helpful just to see a simple example of what needs to be done. Is there any news on integrating Rexx as a macro language to jLpex? As you say, quick is relative, and java is a degree more complex to pick up for casual stuff like this than Rexx. Cheers Rob -----Original Message----- From: wdsci-l-bounces@xxxxxxxxxxxx [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Adrian Sent: 26 June 2003 21:19 To: wdsci-l@xxxxxxxxxxxx Subject: [WDSCI-L] Re: jLpex keys for re-definition Robin Coles wrote: > 2) Is there a way of defining multiple key actions or other "mini > macros" without having to resort to Java? E.g. In code I have a key > that maps to shift a block right 3 spaces. In jLpex I can map a key > that shifts a block right one space, but I can't pass it the number of > spaces to shift, and I can't work out how to repeat the "shift once" > automatically. Not right now. However, you can try a 'quick and dirty' Java "macro", if you're not inclined to go through developing a plug-in for LPEX extensions, etc. Disclaimer: Quick here is relative, just as you may so consider the dirty part! 1.- Edit a file ThreeRight.java: ====================================================================== import com.ibm.lpex.core.LpexAction; import com.ibm.lpex.core.LpexView; public class ThreeRight implements LpexAction { public void doAction(LpexView lpexView) { int shift = lpexView.actionId("blockShiftRight"); lpexView.doAction(shift); lpexView.doAction(shift); lpexView.doAction(shift); } public boolean available(LpexView lpexView) { return lpexView.actionAvailable(lpexView.actionId("blockShiftRight")); } } ====================================================================== 2.- Compile with: javac ThreeRight.java Your classpath must include: <wdsc install root>\eclipse\plugins\com.ibm.lpex_1.3.8\lpex.jar 3.- Copy the resulting class to the LPEX plug-in directory: copy ThreeRight.class <wdsc_install_root>\eclipse\plugins\com.ibm.lpex_1.3.8\*.* 4.- In the LPEX "User Actions" preferences, define the new class: Name: threeRight Class name: ThreeRight Now you can call this action from LPEX's command line: action threeRight or bind it to a key from the "User Key Actions" preferences: Key: a-backSpace Action: threeRight _______________________________________________ This is the Websphere Development Studio Client for iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/wdsci-l or email: WDSCI-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.