Re: Code snippet line numbering
Dominic Amann <[email protected]> Wed, 31 Aug 2016 13:06:12 -0400
| Newsgroups | gmane.text.doxygen.devel |
|---|---|
| Message-ID | <CAM34Q-MrE1WwV8wAzPw7TzpdQPcesH2qD7s9bnE3gX41XStuTw@mail.gmail.com> |
--===============4253864286755507785== Content-Type: multipart/alternative; boundary=001a114794e44b6a0d053b611dd4 --001a114794e44b6a0d053b611dd4 Content-Type: text/plain; charset=UTF-8 I have submitted a report (based on what I get using python). My doxygen version is 1.8.11. BTW - doxygen is awesome, and you guys are awesome for maintaining it. On 31 August 2016 at 12:56, Albert <[email protected]> wrote: > Dominic, > > I can reproduce it with python code, the small test I ran before used C > code and didn't show the line numbers, so we have a second problem here. > We have to dive into these problems, please submit bug reports for it. > > Note: you use as snippet identification transducer setup which is at the > moment fully correct, but please use transducer_setup as the definition > of the snippet command might slightly change in a future version (adding > some extra arguments, which might require a small inconsistency). > > Albert > > > On Wed, Aug 31, 2016 at 6:21 PM, Dominic Amann <[email protected]> > wrote: > >> 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 >> > > -- 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 --001a114794e44b6a0d053b611dd4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">I have submitted a report (based on what I get using pytho= n). My doxygen version is 1.8.11. BTW - doxygen is awesome, and you guys ar= e awesome for maintaining it.</div><div class=3D"gmail_extra"><br><div clas= s=3D"gmail_quote">On 31 August 2016 at 12:56, Albert <span dir=3D"ltr"><= <a href=3D"mailto:[email protected]" target=3D"_blank">albert.tests@gm= ail.com</a>></span> wrote:<br><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><div><div>Dominic,<br><br></div>I can reproduce it with pyt= hon code, the small test I ran before used C code and didn't show the l= ine numbers, so we have a second problem here.<br></div>We have to dive int= o these problems, please submit bug reports for it.<br><br></div>Note: you = use as snippet identification <font face=3D"monospace, monospace">transduce= r setup<font face=3D"arial,helvetica,sans-serif"> which is at the moment fu= lly correct, but please use </font></font><font face=3D"monospace, monospac= e">transducer_setup<font face=3D"arial,helvetica,sans-serif"> as the defini= tion of the snippet command might slightly change in a future version (addi= ng some extra arguments, which might require a small inconsistency).<span c= lass=3D"HOEnZb"><font color=3D"#888888"><br><br></font></span></font></font= ></div><span class=3D"HOEnZb"><font color=3D"#888888"><font face=3D"monospa= ce, monospace"><font face=3D"arial,helvetica,sans-serif">Albert<br></font><= /font><div><div><div><div><br></div></div></div></div></font></span></div><= div class=3D"HOEnZb"><div class=3D"h5"><div class=3D"gmail_extra"><br><div = class=3D"gmail_quote">On Wed, Aug 31, 2016 at 6:21 PM, Dominic Amann <span = dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank= ">[email protected]</a>></span> wrote:<br><blockquote class=3D"gma= il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef= t:1ex"><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 c= lass (in pyscope_any.py) below:</font></div><div><font face=3D"monospace, m= onospace">#</font></div><div><font face=3D"monospace, monospace"># =C2=A0 \= snippet this transducer setup</font></div><div><font face=3D"monospace, mon= ospace">#</font></div><div><font face=3D"monospace, monospace"># =C2=A0 mul= tiMode must be set to 4 to support multiple transducers (0 for legacy mode)= .</font></div></div><div><br></div><div><br></div>Here is the snippet as pr= oduced (seen in my browser).<div><br></div><div>=3D=3D=3D=3D<br><div><p sty= le=3D"font-stretch:normal;font-size:14px;line-height:22px;font-family:robot= o,sans-serif;color:rgb(0,0,0)">To demonstrate the API, take a look at the t= ransducer_setup method of the app class (in pyscope_any.py) below:</p><div = style=3D"font-stretch:normal;font-size:14px;line-height:22px;font-family:ro= boto,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 styl= e=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-le= ft:53px;padding-bottom:0px;margin:0px"><a name=3D"m_-3049125693569760249_m_= 7616754002781017616_l00001" style=3D"color:rgb(61,87,140)"></a><span style= =3D"padding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);= white-space:pre-wrap;background-color:rgb(232,232,232)"> 1</span>=C2=A0 = <span style=3D"color:rgb(0,128,0)">def </span>transducer_setup(self):</d= iv><div style=3D"font-stretch:normal;font-size:13px;line-height:1;font-fami= ly:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-wor= d;padding-left:53px;padding-bottom:0px;margin:0px"><a name=3D"m_-3049125693= 569760249_m_7616754002781017616_l00002" style=3D"color:rgb(61,87,140)"></a>= <span style=3D"padding-right:4px;text-align:right;border-right:2px solid rg= b(0,255,0);white-space:pre-wrap;background-color:rgb(232,232,232)"> 2</s= pan>=C2=A0 tc1 =3D TraceCollector()</div><div 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-bo= ttom:0px;margin:0px"><a name=3D"m_-3049125693569760249_m_761675400278101761= 6_l00003" style=3D"color:rgb(61,87,140)"></a><span style=3D"padding-right:4= px;text-align:right;border-right:2px solid rgb(0,255,0);white-space:pre-wra= p;background-color:rgb(232,232,232)"> 3</span>=C2=A0 tc1.on_init(= )</div><div 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"m_-304912= 5693569760249_m_7616754002781017616_l00004" style=3D"color:rgb(61,87,140)">= </a><span style=3D"padding-right:4px;text-align:right;border-right:2px soli= d rgb(0,255,0);white-space:pre-wrap;background-color:rgb(232,232,232)"> = 4</span>=C2=A0 settings =3D TraceCollectorPy.SGprSettings(<wbr>)</di= v><div style=3D"font-stretch:normal;font-size:13px;line-height:1;font-famil= y:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-word= ;padding-left:53px;padding-bottom:0px;margin:0px"><a name=3D"m_-30491256935= 69760249_m_7616754002781017616_l00005" style=3D"color:rgb(61,87,140)"></a><= span style=3D"padding-right:4px;text-align:right;border-right:2px solid rgb= (0,255,0);white-space:pre-wrap;background-color:rgb(232,232,232)"> 5</sp= an>=C2=A0 settings.points_per_trace =3D PPT</div><div 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;pa= dding-bottom:0px;margin:0px"><a name=3D"m_-3049125693569760249_m_7616754002= 781017616_l00006" style=3D"color:rgb(61,87,140)"></a><span style=3D"padding= -right:4px;text-align:right;border-right:2px solid rgb(0,255,0);white-space= :pre-wrap;background-color:rgb(232,232,232)"> 6</span>=C2=A0 <spa= n style=3D"color:rgb(128,0,0)"># This may need shifting for different frequ= encies</span></div><div style=3D"font-stretch:normal;font-size:13px;line-he= ight:1;font-family:monospace,fixed;min-height:13px;white-space:pre-wrap;wor= d-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0px"><a name= =3D"m_-3049125693569760249_m_7616754002781017616_l00007" style=3D"color:rgb= (61,87,140)"></a><span style=3D"padding-right:4px;text-align:right;border-r= ight:2px solid rgb(0,255,0);white-space:pre-wrap;background-color:rgb(232,2= 32,232)"> 7</span>=C2=A0 settings.window_timeshift_ps =3D -42000<= /div><div style=3D"font-stretch:normal;font-size:13px;line-height:1;font-fa= mily:monospace,fixed;min-height:13px;white-space:pre-wrap;word-wrap:break-w= ord;padding-left:53px;padding-bottom:0px;margin:0px"><a name=3D"m_-30491256= 93569760249_m_7616754002781017616_l00008" style=3D"color:rgb(61,87,140)"></= a><span style=3D"padding-right:4px;text-align:right;border-right:2px solid = rgb(0,255,0);white-space:pre-wrap;background-color:rgb(232,232,232)"> 8<= /span>=C2=A0 settings.multiMode =3D 4</div><div 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"m_-3049125693569760249_m_7616754002781017= 616_l00009" style=3D"color:rgb(61,87,140)"></a><span style=3D"padding-right= :4px;text-align:right;border-right:2px solid rgb(0,255,0);white-space:pre-w= rap;background-color:rgb(232,232,232)"> 9</span>=C2=A0 <span styl= e=3D"color:rgb(128,0,0)"># edit tuples in following call for different tran= sducer arrangements</span></div><div 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"m_-3049125693569760249_m_7616754002781017616_l00010" style= =3D"color:rgb(61,87,140)"></a><span style=3D"padding-right:4px;text-align:r= ight;border-right:2px solid rgb(0,255,0);white-space:pre-wrap;background-co= lor:rgb(232,232,232)"> 10</span>=C2=A0 tc1.prepare_transducers(0, = 1, settings, [(1, 1, 1), (2, 2, 1)])</div><div style=3D"font-stretch:normal= ;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:13px;w= hite-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0= px;margin:0px"><a name=3D"m_-3049125693569760249_m_7616754002781017616_l000= 11" style=3D"color:rgb(61,87,140)"></a><span style=3D"padding-right:4px;tex= t-align:right;border-right:2px solid rgb(0,255,0);white-space:pre-wrap;back= ground-color:rgb(232,232,232)"> 11</span>=C2=A0 <span style=3D"col= or:rgb(128,0,0)"># put RX scopes in right slots</span></div><div style=3D"f= ont-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:53p= x;padding-bottom:0px;margin:0px"><a name=3D"m_-3049125693569760249_m_761675= 4002781017616_l00012" style=3D"color:rgb(61,87,140)"></a><span style=3D"pad= ding-right:4px;text-align:right;border-right:2px solid rgb(0,255,0);white-s= pace:pre-wrap;background-color:rgb(232,232,232)"> 12</span>=C2=A0 = tc1.add_scope(2)</div><div 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 na= me=3D"m_-3049125693569760249_m_7616754002781017616_l00013" style=3D"color:r= gb(61,87,140)"></a><span style=3D"padding-right:4px;text-align:right;border= -right:2px solid rgb(0,255,0);white-space:pre-wrap;background-color:rgb(232= ,232,232)"> 13</span>=C2=A0 <span style=3D"color:rgb(128,0,0)"># a= dd our new trace-collector to list</span></div><div style=3D"font-stretch:n= ormal;font-size:13px;line-height:1;font-family:monospace,fixed;min-height:1= 3px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bot= tom:0px;margin:0px"><a name=3D"m_-3049125693569760249_m_7616754002781017616= _l00014" style=3D"color:rgb(61,87,140)"></a><span style=3D"padding-right:4p= x;text-align:right;border-right:2px solid rgb(0,255,0);white-space:pre-wrap= ;background-color:rgb(232,232,232)"> 14</span>=C2=A0 self._trace_c= ollectors.append(<wbr>tc1) </div></div><p style=3D"font-stretch:normal;f= ont-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 legac= y mode).</p><p style=3D"font-stretch: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-size:14px;line-height:22px;font-family:roboto,= sans-serif;color:rgb(0,0,0)">Ideally, the line numbers would be 325..338 (t= he actual line numbers within the code).<br></p><p style=3D"font-stretch:no= rmal;font-size:14px;line-height:22px;font-family:roboto,sans-serif;color:rg= b(0,0,0)"><br></p></div></div></div><div><div><div class=3D"gmail_extra"><b= r><div class=3D"gmail_quote">On 31 August 2016 at 11:56, Albert <span dir= =3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">al= [email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_qu= ote" 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 fa= r as I know, no possibilities to do this, best is to file a bug report for = an enhancement at bugzilla (see: <a href=3D"http://www.stack.nl/~dimitri/do= xygen/manual/trouble.html#bug_reports" target=3D"_blank">http://www.stack.n= l/~dimitri/d<wbr>oxygen/manual/trouble.html#bug<wbr>_reports</a>).<br>Which= version of doxygen ar you using and which output format?<br></div>Where do= you see the line numbers?<br><br></div>Albert<br></div><div class=3D"gmail= _extra"><br><div class=3D"gmail_quote"><div><div>On Wed, Aug 31, 2016 at 5:= 11 PM, Dominic Amann <span dir=3D"ltr"><<a href=3D"mailto:dominic.amann@= gmail.com" target=3D"_blank">[email protected]</a>></span> wrote:<= br></div></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex= ;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir=3D"ltr">Is= there a way to number the code snippet lines with their absolute (file bas= ed) 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.<div><br></div><div>If there is no way to do t= his, then I would like to request this as a feature.<span><font color=3D"#8= 88888"><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 b= etter persuaded by the reasons which they have themselves discovered than b= y those which have come into the mind of others -=C2=A0<span style=3D"font-= size:12.8000001907349px">Blaise Pascal.</span></div><div><br></div>Dominic = Amann<br>M <a href=3D"tel:416-270-4587" value=3D"+14162704587" target=3D"_b= lank">416-270-4587</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 data-sm= artmail=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><pre sty= le=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 d= iscovered than by those which have come into the mind of others -=C2=A0<spa= n style=3D"font-size:12.8000001907349px">Blaise Pascal.</span></div><div><b= r></div>Dominic Amann<br>M <a href=3D"tel:416-270-4587" value=3D"+141627045= 87" target=3D"_blank">416-270-4587</a><br></div></div></div></div> </div> </div></div></blockquote></div><br></div> </div></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"><div><div dir=3D"ltr"><pre style=3D"margin:0em"><br></pre><pre sty= le=3D"margin:0em"><br></pre><div>People are generally better persuaded by t= he reasons which they have themselves discovered than by those which have c= ome into the mind of others -=C2=A0<span style=3D"font-size:12.800000190734= 9px">Blaise Pascal.</span></div><div><br></div>Dominic Amann<br>M 416-270-4= 587<br></div></div></div></div> </div> --001a114794e44b6a0d053b611dd4-- --===============4253864286755507785== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ --===============4253864286755507785== 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 --===============4253864286755507785==--