BTW,
I spoke to Barbara Morris about this and her suggestion was the maximum
line length preference should not apply to end-of-line comments, but only
to real code.
I am planning to quickly put in a fix to make sure code never get shifted
left of column 8. Eventually I can put in a preference for what the
maximum line length should be including comments (we need to at least
enforce the physical record length here).
Ken, I see your PMR about the crash since the verifier is not handling the
wrongly formatted code.
You can open another one about the formatting moving long lines to column 6
which makes them invalid.
Thanks,
Edmund
From: Edmund Reinhardt/Toronto/IBM@IBMCA
To: Rational Developer for IBM i / Websphere Development Studio
Client for System i & iSeries <wdsci-l@xxxxxxxxxxxx>
Date: 09/24/2015 05:17 PM
Subject: [WDSCI-L] RDi 9.5 indenter shifting long lines to far left
Sent by: "WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx>
Great suggestion Michael. That is certainly the intent of that preference.
But it does not solve the problem.
I have debugged it and I see where I am going wrong.
I thought that since I am guaranteed to be working with free form and
therefore, there was not implicit comments beyond column 80. So I could
just do the following and it would work for fully free and column-limited
free form RPG.
But the fatal assumption is that free form end of line comments will not
extend beyond column 80.
So I insert spaces until the end of line bumps against the end column
preference (which is always 80 for column-limited free form). So if there
is comments beyond column 80, they will have the effect of shifting the
code all the way to column 6 which causes the errors that Ken has been
seeing.
int insertIndex = (_parser.isFullyFree() ? 0 : 5);
for (int i = 0; i < currentIndent && text.length()
< _endColumn
; i++) {
text.insert(insertIndex, " ");
if ((i + 1 < currentIndent) &&
(text.length() ==
_endColumn)) {
_endOfLineReached = true;
}
}
So I can fix this to shift code no further left than column 8. But I am
wondering if I need to look within the line to see where the end of comment
starts and just make sure that it stays within column 80. But this would
be inconsistent with Fully-Free Form RPG. Perhaps the solution is a second
preference for how far right an end-of-line comment should be allowed to
extend?
What do you guys think?
What does Linoma or other formatters do with this problem?
Thanks,
Edmund
From: MichaelQuigley@xxxxxxxxxx
To: wdsci-l@xxxxxxxxxxxx
Date: 09/24/2015 08:55 AM
Subject: Re: [WDSCI-L] RDi 9.5 indenter not too bad. Not perfect,
but
pretty good!
Sent by: "WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx>
"WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx> wrote on 09/23/2015 10:08:00 PM:
----- Message from Ken Killian <kkillian@xxxxxxxxxxxx> on Thu, 24
Sep 2015 02:07:25 +0000 -----
To:
"Rational Developer for IBM i / Websphere Development Studio Client
for System i & iSeries" <wdsci-l@xxxxxxxxxxxx>
Subject:
Re: [WDSCI-L] RDi 9.5 indenter not too bad. Not perfect, but pretty
good!
Edmund,
Using RDI 9.5, I notice some of my formatted code was moved to
column-06, by the RDi 9.5 formatter.
So, some of my code such as Dcl-ds PreMsg, thinks it is a "D-Spec",
because the letter "D" in the Punch-Card Column-06.
Here is a snap-shot from RDI 9.5
http://tinyurl.com/nu2gy7q
Ken,
You may have adjusted this already, but does this work correctly if you
change the start column to 7 within the preferences under:
'Remote Systems','Remote Systems LPEX Editor','IBM i Parsers','ILE
RPG','Formatter'?
Michael Quigley
Computer Services
The Way International
www.TheWay.org
--
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.