Re: Code snippet line numbering

Dominic Amann <[email protected]> Wed, 31 Aug 2016 12:21:38 -0400
Newsgroups gmane.text.doxygen.devel
Message-ID <CAM34Q-PO+Rm1cFDHhxCgPrt2qCm1yW+UX76OMUU__5Q-BeE3LQ@mail.gmail.com>
--===============1148522380065472946==
Content-Type: multipart/alternative; boundary=94eb2c07e9f4ede56a053b607d23

--94eb2c07e9f4ede56a053b607d23
Content-Type: text/plain; charset=UTF-8

Here is the Doxygen comment that produces the snippet:

#   To demonstrate the API, take a look at the transducer_setup method of
#   the app class (in pyscope_any.py) below:
#
#   \snippet this transducer setup
#
#   multiMode must be set to 4 to support multiple transducers (0 for
legacy mode).


Here is the snippet as produced (seen in my browser).

====

To demonstrate the API, take a look at the transducer_setup method of the
app class (in pyscope_any.py) below:
1  def transducer_setup(self):
2  tc1 = TraceCollector()
3  tc1.on_init()
4  settings = TraceCollectorPy.SGprSettings()
5  settings.points_per_trace = PPT
6  # This may need shifting for different frequencies
7  settings.window_timeshift_ps = -42000
8  settings.multiMode = 4
9  # edit tuples in following call for different transducer arrangements
10  tc1.prepare_transducers(0, 1, settings, [(1, 1, 1), (2, 2, 1)])
11  # put RX scopes in right slots
12  tc1.add_scope(2)
13  # add our new trace-collector to list
14  self._trace_collectors.append(tc1)

multiMode must be set to 4 to support multiple transducers (0 for legacy
mode).

====

Ideally, the line numbers would be 325..338 (the actual line numbers within
the code).



On 31 August 2016 at 11:56, Albert <[email protected]> wrote:

> Dominic,
>
> There are at the moment, as far as I know, no possibilities to do this,
> best is to file a bug report for an enhancement at bugzilla (see:
> http://www.stack.nl/~dimitri/doxygen/manual/trouble.html#bug_reports).
> Which version of doxygen ar you using and which output format?
> Where do you see the line numbers?
>
> Albert
>
> On Wed, Aug 31, 2016 at 5:11 PM, Dominic Amann <[email protected]>
> wrote:
>
>> Is there a way to number the code snippet lines with their absolute (file
>> based) line numbers? I am including the snippet to show other developers
>> where to look in the code to modify certain values, and the "1" based line
>> numbers are not helpful.
>>
>> If there is no way to do this, then I would like to request this as a
>> feature.
>>
>> --
>>
>>
>>
>> People are generally better persuaded by the reasons which they have
>> themselves discovered than by those which have come into the mind of others
>> - Blaise Pascal.
>>
>> Dominic Amann
>> M 416-270-4587
>>
>> ------------------------------------------------------------
>> ------------------
>>
>> _______________________________________________
>> Doxygen-develop mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/doxygen-develop
>>
>>
>


-- 



People are generally better persuaded by the reasons which they have
themselves discovered than by those which have come into the mind of others
- Blaise Pascal.

Dominic Amann
M 416-270-4587

--94eb2c07e9f4ede56a053b607d23
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Here is the Doxygen comment that produces the snippet=
:</div><div><br></div><div><div><font face=3D"monospace, monospace"># =C2=
=A0 To demonstrate the API, take a look at the transducer_setup method of</=
font></div><div><font face=3D"monospace, monospace"># =C2=A0 the app class =
(in pyscope_any.py) below:</font></div><div><font face=3D"monospace, monosp=
ace">#</font></div><div><font face=3D"monospace, monospace"># =C2=A0 \snipp=
et this transducer setup</font></div><div><font face=3D"monospace, monospac=
e">#</font></div><div><font face=3D"monospace, monospace"># =C2=A0 multiMod=
e must be set to 4 to support multiple transducers (0 for legacy mode).</fo=
nt></div></div><div><br></div><div><br></div>Here is the snippet as produce=
d (seen in my browser).<div><br></div><div>=3D=3D=3D=3D<br><div><p style=3D=
"font-stretch:normal;font-size:14px;line-height:22px;font-family:roboto,san=
s-serif;color:rgb(0,0,0)">To demonstrate the API, take a look at the transd=
ucer_setup method of the app class (in pyscope_any.py) below:</p><div class=
=3D"gmail-fragment" style=3D"font-stretch:normal;font-size:14px;line-height=
:22px;font-family:roboto,sans-serif;padding:4px 6px;margin:4px 8px 4px 2px;=
border:1px solid rgb(196,207,229);color:rgb(0,0,0);background-color:rgb(251=
,252,253)"><div class=3D"gmail-line" style=3D"font-stretch:normal;font-size=
:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space=
:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:=
0px"><a name=3D"l00001" style=3D"color:rgb(61,87,140)"></a><span class=3D"g=
mail-lineno" style=3D"padding-right:4px;text-align:right;border-right:2px s=
olid rgb(0,255,0);white-space:pre;background-color:rgb(232,232,232)">    1<=
/span>=C2=A0    <span class=3D"gmail-keyword" style=3D"color:rgb(0,128,0)">=
def </span>transducer_setup(self):</div><div class=3D"gmail-line" style=3D"=
font-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixe=
d;min-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53=
px;padding-bottom:0px;margin:0px"><a name=3D"l00002" style=3D"color:rgb(61,=
87,140)"></a><span class=3D"gmail-lineno" style=3D"padding-right:4px;text-a=
lign:right;border-right:2px solid rgb(0,255,0);white-space:pre;background-c=
olor:rgb(232,232,232)">    2</span>=C2=A0        tc1 =3D TraceCollector()</=
div><div class=3D"gmail-line" style=3D"font-stretch:normal;font-size:13px;l=
ine-height:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wr=
ap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0px"><a=
 name=3D"l00003" style=3D"color:rgb(61,87,140)"></a><span class=3D"gmail-li=
neno" style=3D"padding-right:4px;text-align:right;border-right:2px solid rg=
b(0,255,0);white-space:pre;background-color:rgb(232,232,232)">    3</span>=
=C2=A0        tc1.on_init()</div><div class=3D"gmail-line" style=3D"font-st=
retch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-h=
eight:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padd=
ing-bottom:0px;margin:0px"><a name=3D"l00004" style=3D"color:rgb(61,87,140)=
"></a><span class=3D"gmail-lineno" style=3D"padding-right:4px;text-align:ri=
ght;border-right:2px solid rgb(0,255,0);white-space:pre;background-color:rg=
b(232,232,232)">    4</span>=C2=A0        settings =3D TraceCollectorPy.SGp=
rSettings()</div><div class=3D"gmail-line" style=3D"font-stretch:normal;fon=
t-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white=
-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;m=
argin:0px"><a name=3D"l00005" style=3D"color:rgb(61,87,140)"></a><span clas=
s=3D"gmail-lineno" style=3D"padding-right:4px;text-align:right;border-right=
:2px solid rgb(0,255,0);white-space:pre;background-color:rgb(232,232,232)">=
    5</span>=C2=A0        settings.points_per_trace =3D PPT</div><div class=
=3D"gmail-line" style=3D"font-stretch:normal;font-size:13px;line-height:1;f=
ont-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:b=
reak-word;padding-left:53px;padding-bottom:0px;margin:0px"><a name=3D"l0000=
6" style=3D"color:rgb(61,87,140)"></a><span class=3D"gmail-lineno" style=3D=
"padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);whi=
te-space:pre;background-color:rgb(232,232,232)">    6</span>=C2=A0        <=
span class=3D"gmail-comment" style=3D"color:rgb(128,0,0)"># This may need s=
hifting for different frequencies</span></div><div class=3D"gmail-line" sty=
le=3D"font-stretch:normal;font-size:13px;line-height:1;font-family:monospac=
e,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-l=
eft:53px;padding-bottom:0px;margin:0px"><a name=3D"l00007" style=3D"color:r=
gb(61,87,140)"></a><span class=3D"gmail-lineno" style=3D"padding-right:4px;=
text-align:right;border-right:2px solid rgb(0,255,0);white-space:pre;backgr=
ound-color:rgb(232,232,232)">    7</span>=C2=A0        settings.window_time=
shift_ps =3D -42000</div><div class=3D"gmail-line" style=3D"font-stretch:no=
rmal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13=
px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bott=
om:0px;margin:0px"><a name=3D"l00008" style=3D"color:rgb(61,87,140)"></a><s=
pan class=3D"gmail-lineno" style=3D"padding-right:4px;text-align:right;bord=
er-right:2px solid rgb(0,255,0);white-space:pre;background-color:rgb(232,23=
2,232)">    8</span>=C2=A0        settings.multiMode =3D 4</div><div class=
=3D"gmail-line" style=3D"font-stretch:normal;font-size:13px;line-height:1;f=
ont-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:b=
reak-word;padding-left:53px;padding-bottom:0px;margin:0px"><a name=3D"l0000=
9" style=3D"color:rgb(61,87,140)"></a><span class=3D"gmail-lineno" style=3D=
"padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);whi=
te-space:pre;background-color:rgb(232,232,232)">    9</span>=C2=A0        <=
span class=3D"gmail-comment" style=3D"color:rgb(128,0,0)"># edit tuples in =
following call for different transducer arrangements</span></div><div class=
=3D"gmail-line" style=3D"font-stretch:normal;font-size:13px;line-height:1;f=
ont-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:b=
reak-word;padding-left:53px;padding-bottom:0px;margin:0px"><a name=3D"l0001=
0" style=3D"color:rgb(61,87,140)"></a><span class=3D"gmail-lineno" style=3D=
"padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);whi=
te-space:pre;background-color:rgb(232,232,232)">   10</span>=C2=A0        t=
c1.prepare_transducers(0, 1, settings, [(1, 1, 1), (2, 2, 1)])</div><div cl=
ass=3D"gmail-line" style=3D"font-stretch:normal;font-size:13px;line-height:=
1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wra=
p:break-word;padding-left:53px;padding-bottom:0px;margin:0px"><a name=3D"l0=
0011" style=3D"color:rgb(61,87,140)"></a><span class=3D"gmail-lineno" style=
=3D"padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);=
white-space:pre;background-color:rgb(232,232,232)">   11</span>=C2=A0      =
  <span class=3D"gmail-comment" style=3D"color:rgb(128,0,0)"># put RX scope=
s in right slots</span></div><div class=3D"gmail-line" style=3D"font-stretc=
h:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-heigh=
t:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-=
bottom:0px;margin:0px"><a name=3D"l00012" style=3D"color:rgb(61,87,140)"></=
a><span class=3D"gmail-lineno" style=3D"padding-right:4px;text-align:right;=
border-right:2px solid rgb(0,255,0);white-space:pre;background-color:rgb(23=
2,232,232)">   12</span>=C2=A0        tc1.add_scope(2)</div><div class=3D"g=
mail-line" style=3D"font-stretch:normal;font-size:13px;line-height:1;font-f=
amily:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-=
word;padding-left:53px;padding-bottom:0px;margin:0px"><a name=3D"l00013" st=
yle=3D"color:rgb(61,87,140)"></a><span class=3D"gmail-lineno" style=3D"padd=
ing-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);white-sp=
ace:pre;background-color:rgb(232,232,232)">   13</span>=C2=A0        <span =
class=3D"gmail-comment" style=3D"color:rgb(128,0,0)"># add our new trace-co=
llector to list</span></div><div class=3D"gmail-line" style=3D"font-stretch=
:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height=
:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-b=
ottom:0px;margin:0px"><a name=3D"l00014" style=3D"color:rgb(61,87,140)"></a=
><span class=3D"gmail-lineno" style=3D"padding-right:4px;text-align:right;b=
order-right:2px solid rgb(0,255,0);white-space:pre;background-color:rgb(232=
,232,232)">   14</span>=C2=A0        self._trace_collectors.append(tc1)    =
</div></div><p style=3D"font-stretch:normal;font-size:14px;line-height:22px=
;font-family:roboto,sans-serif;color:rgb(0,0,0)">multiMode must be set to 4=
 to support multiple transducers (0 for legacy mode).</p><p style=3D"font-s=
tretch:normal;font-size:14px;line-height:22px;font-family:roboto,sans-serif=
;color:rgb(0,0,0)">=3D=3D=3D=3D</p><p style=3D"font-stretch:normal;font-siz=
e:14px;line-height:22px;font-family:roboto,sans-serif;color:rgb(0,0,0)">Ide=
ally, the line numbers would be 325..338 (the actual line numbers within th=
e code).<br></p><p style=3D"font-stretch:normal;font-size:14px;line-height:=
22px;font-family:roboto,sans-serif;color:rgb(0,0,0)"><br></p></div></div></=
div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On 31 August =
2016 at 11:56, Albert <span dir=3D"ltr">&lt;<a href=3D"mailto:albert.tests@=
gmail.com" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<b=
r><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:=
1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div>Dominic,<br><br=
>There are at the moment, as far as I know, no possibilities to do this, be=
st is to file a bug report for an enhancement at bugzilla (see: <a href=3D"=
http://www.stack.nl/~dimitri/doxygen/manual/trouble.html#bug_reports" targe=
t=3D"_blank">http://www.stack.nl/~dimitri/<wbr>doxygen/manual/trouble.html#=
<wbr>bug_reports</a>).<br>Which version of doxygen ar you using and which o=
utput format?<br></div>Where do you see the line numbers?<br><br></div>Albe=
rt<br></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote"><div>=
<div class=3D"h5">On Wed, Aug 31, 2016 at 5:11 PM, Dominic Amann <span dir=
=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">d=
[email protected]</a>&gt;</span> wrote:<br></div></div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa=
dding-left:1ex"><div><div class=3D"h5"><div dir=3D"ltr">Is there a way to n=
umber the code snippet lines with their absolute (file based) line numbers?=
 I am including the snippet to show other developers where to look in the c=
ode to modify certain values, and the &quot;1&quot; based line numbers are =
not helpful.<div><br></div><div>If there is no way to do this, then I would=
 like to request this as a feature.<span><font color=3D"#888888"><br clear=
=3D"all"><div><br></div>-- <br><div data-smartmail=3D"gmail_signature"><div=
 dir=3D"ltr"><div><div dir=3D"ltr"><pre style=3D"margin:0em"><br></pre><pre=
 style=3D"margin:0em"><br></pre><div>People are generally better persuaded =
by the reasons which they have themselves discovered than by those which ha=
ve come into the mind of others -=C2=A0<span style=3D"font-size:12.80000019=
07349px">Blaise Pascal.</span></div><div><br></div>Dominic Amann<br>M <a hr=
ef=3D"tel:416-270-4587" value=3D"+14162704587" target=3D"_blank">416-270-45=
87</a><br></div></div></div></div>
</font></span></div></div>
<br></div></div>------------------------------<wbr>------------------------=
------<wbr>------------------<br>
<br>______________________________<wbr>_________________<br>
Doxygen-develop mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">=
[email protected]<wbr>rge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/doxygen-develop" re=
l=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/<wbr>lists=
/listinfo/doxygen-develop</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div class=
=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><d=
iv><div dir=3D"ltr"><pre style=3D"margin:0em"><br></pre><pre style=3D"margi=
n:0em"><br></pre><div>People are generally better persuaded by the reasons =
which they have themselves discovered than by those which have come into th=
e mind of others -=C2=A0<span style=3D"font-size:12.8000001907349px">Blaise=
 Pascal.</span></div><div><br></div>Dominic Amann<br>M 416-270-4587<br></di=
v></div></div></div>
</div>

--94eb2c07e9f4ede56a053b607d23--


--===============1148522380065472946==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============1148522380065472946==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Doxygen-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-develop

--===============1148522380065472946==--