× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks all for your input - I appreciate it all.

@Mark - I have had a play with templates Mark - I do use them for a few
things and they can work quite well but my experience is that the are bit
too context sensitive for my needs - for example if I try to insert a
comment on the same line as, but after a valid instruction, the template
doesn't seem to insert.

Also, (and I just had another quite play to check if it was different in my
current version ) I have found it a bit idiosyncratic with regard to how
some special characters are handled. I tried creating a Template that was
just "//" followed by EBCDIC x'22' - which I already have in the source and
can happily cut and paste around, and I had to right click and use hex edit
in the Add Template Dialogue, but having done that it didn't seem to insert
correctly when I tried to apply it.

But in any case, as long as it won't allow me to put comments on the same
line as, and after valid instructions, it won't meet my needs. Thanks
though for the reminder about Templates.

@Buck - Hi Buck, yes I recall now that you posted most of the stuff I had
seen on creating the User Commands or Actions. You may notice as we go
along that I suffer from lack of brevity myself. I hope I don't digress too
much when I mention that there is a line in the movie Shooting Fish where a
girl turns around to her boyfriend and says something like: "never
underestimate how much pain your attention to detail can cause others" and
my friend just looked at me and burst out laughing! So, don't curtail your
efforts on my account, I enjoy your turn of phrase :-)
I have run commands from the command line, I used to use the find command
from down there because I didn't like the way Ctrl-F jumped around as you
typed, but I haven't used it so much as that particular command is pretty
verbose and also doesn't ( or didn't ) take account of the set regular
expression setting, which made it even more verbose if you wanted to use
those!
But thanks for the reminder - when I get a chance I will go through your
links and see if I can get them working for myself - thanks!

@Matt - thanks Matt, useful stuff, I appreciate your input!

best regards,
Craig

On 12 August 2016 at 13:35, Mark Murphy/STAR BASE Consulting Inc. <
mmurphy@xxxxxxxxxxxxxxx> wrote:

You could use a template. Go to Window->Preferences. Type template in the
search bar, and select Remote Systems->Remote Systems LPEX Editor->ILE
RPG->Templates.

You can add what is essentially a snippet without replacement variables.
So I added a snippet that looks like this:

Name: //--
Context: FREE-FORM
Description: procedure header
Content:
// ------------------------------------------
// ${cursor}
// ------------------------------------------


Now I can type // ctrl+space, and a popup is displayed with all the
templates starting with //. I select the one I want, and it is added. Since
I only have one, the entire sequence is // ctrl+space enter.

That ${cursor} bit tells RDi where to put the cursor after the template is
inserted.

If you use both RPGLE and SQLRPGLE, you will have to create duplicate
templates, one for FREE-FORM, and one for SQLFREE-FORM contexts.

Ages ago, I used a programmer editor named Brief. It had a very powerful
macro language in which I created many templates like snippets on steroids.
Not only could I have replacement variables, but I could conditionally
include or exclude boilerplate code based on questions and answers provided
during the script run. I wish eclipse had such a scripting language.

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx


-----Craig Richards <craig@xxxxxxxxxxxxxxxx> wrote: -----
To: "Rational Developer for IBM i / Websphere Development Studio Client
for System i & iSeries" <wdsci-l@xxxxxxxxxxxx>
From: Craig Richards <craig@xxxxxxxxxxxxxxxx>
Date: 08/12/2016 02:26AM
Subject: [WDSCI-L] Inserting specific text with an Editor Action or Command


Hi All,

In my pre-RDi days, I wrote an SEU exit program that allowed me to perform
things like:

- Insert a comment with a horizontal line across the full source width (
as an aid to make it easier to see subprocedure / subroutine boundaries
- Insert comment metadata ( either a double slash (//) or a carefully
positioned asterisk (*) followed by a hex control character ( usually
x'20'
) to make the comment highlighted.

Although I do perform most of my development using RDi these days - I still
keep with the habit of inserting horizontal line separators and inserting a
hex character at the beginning of comment text to help it stand out when
view via SEU which doesn't auto-colour comments.

I have never really found an easy way to do this in RDi, mostly I scroll
about and select and copy what I need from another place in the source ( I
usually have one, even the simplest programs I write usually start life as
a copy of another program )

I did at one point create some snippets with bits of text in I could insert
but I think they only worked on CALC lines and if you tried to insert
partway along a new line, the text would insert at the beginning of the
line, not where the cursor/carat was positioned ( which of course I
understand, the line doesn't automatically get blank filled up to the
insertion point )

I think I decided that there wasn't an existing Action or Command that I
could use for this purpose and I didn't get very far on my only attempt at
trying to write my own.

Does anyone have an easy way of doing this?

In it's simplest form I guess I'd like to be able to get a predefined
character inserted at the current carat position by pressing a shortcut
key.

Does anyone have a way of doing this or something similar they could point
me at?

thanks kindly,
Craig
--
This is the Rational Developer for IBM i / Websphere Development Studio
Client for System i & 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.
--
This is the Rational Developer for IBM i / Websphere Development Studio
Client for System i & 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 thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.