× 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.




Snippets are always in stream mode (that is the way Eclipse thinks).
For free-form the solution would be for RDi to make it easy to
reformat/indent your pasted code. (Again this would be consistent with all
other Eclipse editors.)




From: Terry Hertel <T.Hertel@xxxxxxxxxxxxxxxxx>
To: "wdsci-l@xxxxxxxxxxxx" <wdsci-l@xxxxxxxxxxxx>
Date: 06/29/2015 02:22 PM
Subject: [WDSCI-L] Snippets
Sent by: "WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx>



No, I didn't create my snippets for insertion at column 1. I expected RDi
to do a block paste at the cursor when I did an insert. I guess I can do
that easily enough for P and D specs, but for free form calcs that doesn't
always work perfectly because you never know how much the indent should be.
A block paste would be much nicer as it would eliminate having to move the
code after inserting it. I guess that is better than messing with all the
error messages and having to move the code anyways as is the case for me
now. Thanks for the tip.

I had forgotten about the ellipsis trick for placeholders. I think I wrote
it off because it would double the number of D specs in my subprocedures
(two lines for every input parm and variable), but I'm glad you reminded me
about that. It might be time to re-work a couple of my snippets.
------------------------------

message: 2
date: Fri, 26 Jun 2015 16:50:57 -0400
from: Dave Shaw <daveshawmrc@xxxxxxxxx>
subject: Re: [WDSCI-L] Snippets

Are you saying that you don't write your snippets for insertion at column
1? I've always treated them as full lines, and haven't had any alignment
issues.

Dave Shaw
Sent from my Windows phone

-----Original Message-----
From: "Terry Hertel" <T.Hertel@xxxxxxxxxxxxxxxxx>
Sent: ?6/?26/?2015 4:22 PM
To: "wdsci-l@xxxxxxxxxxxx" <wdsci-l@xxxxxxxxxxxx>
Subject: [WDSCI-L] Snippets

I have several snippets that I use for nearly every program that I write
and have just learned to live with the alignment issues in P and D specs in
subprocedures that arise when using variables and placeholders. However, I
just created a snippet that is completely free-form calc specs (by pasting
in code from an existing program), created two variables, and inserted the
placeholders into the code. When I insert the snippet into my program, the
first line is positioned at the cursor and all of the following lines are
adjusted all the way to the left, which of course generates a bunch of pink
error messages and forces me to block that section of the code and adjust
it to the proper position. I tried to paste the block of code into the
snippet using ALT/R to mark the block and ALT/Z to paste it into the
snippet, but ALT/Z is not recognized there. The only way I have found so
far to remedy this is to add a bunch of spaces to the front of lines 2-5 in
the snippet (so the if/endif
statements don't line up in the snippet). Does anyone else have a better
solution? There has been a lot of discussion about pasting into the editor
but shouldn't snippet insert with correct alignment?
--
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.


------------------------------

message: 3
date: Fri, 26 Jun 2015 17:54:03 -0500
from: Stuart Rowe <rowestu@xxxxxxxxx>
subject: Re: [WDSCI-L] Snippets

Same here, each line starts with 5 blanks and I always position to the
start of line using home key before selecting the snippet. Works great.
I've had good luck using the ellipsis on my fixed d-specs with placeholders
(I cannot use free-form D-specs cause we're stuck at 6.1).


On Fri, Jun 26, 2015 at 3:50 PM, Dave Shaw <daveshawmrc@xxxxxxxxx> wrote:

Are you saying that you don't write your snippets for insertion at column
1? I've always treated them as full lines, and haven't had any alignment
issues.

Dave Shaw
Sent from my Windows phone

-----Original Message-----
From: "Terry Hertel" <T.Hertel@xxxxxxxxxxxxxxxxx>
Sent: ?6/?26/?2015 4:22 PM
To: "wdsci-l@xxxxxxxxxxxx" <wdsci-l@xxxxxxxxxxxx>
Subject: [WDSCI-L] Snippets

I have several snippets that I use for nearly every program that I write
and have just learned to live with the alignment issues in P and D specs
in
subprocedures that arise when using variables and placeholders. However,
I
just created a snippet that is completely free-form calc specs (by
pasting
in code from an existing program), created two variables, and inserted
the
placeholders into the code. When I insert the snippet into my program,
the
first line is positioned at the cursor and all of the following lines are
adjusted all the way to the left, which of course generates a bunch of
pink
error messages and forces me to block that section of the code and adjust
it to the proper position. I tried to paste the block of code into the
snippet using ALT/R to mark the block and ALT/Z to paste it into the
snippet, but ALT/Z is not recognized there. The only way I have found so
far to remedy this is to add a bunch of spaces to the front of lines 2-5
in
the snippet (so the if/endif
statements don't line up in the snippet). Does anyone else have a
better
solution? There has been a lot of discussion about pasting into the
editor
but shouldn't snippet insert with correct alignment?
--
--
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 ...

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.