|
I followed the instructions to the letter, but it doesn't seem to work for me.
Here's the source of my UserProfile1 class:
package com.mycompany.lpexExtensions;
import com.ibm.lpex.core.LpexAction;
import com.ibm.lpex.core.LpexView;
public class UserProfile1 {
public static void userProfile(LpexView lpexView) {
// define new action
lpexView.defineAction("insertSemicolon2Action", new LpexAction() {
public void doAction(LpexView view) {
// go to the end of the line
view.doAction(view.actionId("contextEnd"));
// insert a semicolon and comment string
view.doCommand("insertText ; /* */");
// position the cursor in the middle of the comment
view.doAction(view.actionId("left"));
view.doAction(view.actionId("left"));
view.doAction(view.actionId("left"));
}
public boolean available(LpexView view) {
// allow the actino to run for any visible text line in a writable document
return view.currentElement() != 0 && !view.queryOn("readonly");
}
});
// assign keys "Ctrl+5" to run insertSemicolon2Action
lpexView.doCommand("set keyAction.c-5 insertSemicolon2Action");
lpexView.doCommand("hairline cursor");
lpexView.doDefaultCommand("updateProfile");
}
}
Am I doing something wrong, because I don't see the hairline when I open an RPGLE member. I still need to type "hairline cursor" every time I open a source.
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.