Re: Code snippet line numbering
Albert <[email protected]> Wed, 31 Aug 2016 18:56:00 +0200
| Newsgroups | gmane.text.doxygen.devel |
|---|---|
| Message-ID | <CABOOx7Yjj-ioja8A5YZMACCpif7v9LciV6FFUaDzAE3D5xOEiA@mail.gmail.com> |
--===============5560967853587502660== Content-Type: multipart/alternative; boundary=94eb2c0491f4d66b3a053b60f87f --94eb2c0491f4d66b3a053b60f87f Content-Type: text/plain; charset=UTF-8 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 > --94eb2c0491f4d66b3a053b60f87f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div><div><div><div>Dominic,<br><br></div>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.<br></div>We have = to dive into these problems, please submit bug reports for it.<br><br></div= >Note: you use as snippet identification <font face=3D"monospace, monospace= ">transducer setup<font face=3D"arial,helvetica,sans-serif"> which is at th= e moment fully correct, but please use </font></font><font face=3D"monospac= e, monospace">transducer_setup<font face=3D"arial,helvetica,sans-serif"> as= the definition of the snippet command might slightly change in a future ve= rsion (adding some extra arguments, which might require a small inconsisten= cy).<br><br></font></font></div><font face=3D"monospace, monospace"><font f= ace=3D"arial,helvetica,sans-serif">Albert<br></font></font><div><div><div><= div><br></div></div></div></div></div><div class=3D"gmail_extra"><br><div c= lass=3D"gmail_quote">On Wed, Aug 31, 2016 at 6:21 PM, Dominic Amann <span d= ir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank"= >[email protected]</a>></span> wrote:<br><blockquote class=3D"gmai= l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left= :1ex"><div dir=3D"ltr"><div>Here is the Doxygen comment that produces the s= nippet:</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 cl= ass (in pyscope_any.py) below:</font></div><div><font face=3D"monospace, mo= nospace">#</font></div><div><font face=3D"monospace, monospace"># =C2=A0 \s= nippet this transducer setup</font></div><div><font face=3D"monospace, mono= space">#</font></div><div><font face=3D"monospace, monospace"># =C2=A0 mult= iMode 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 pro= duced (seen in my browser).<div><br></div><div>=3D=3D=3D=3D<br><div><p styl= e=3D"font-stretch:normal;font-size:14px;line-height:22px;font-family:roboto= ,sans-serif;color:rgb(0,0,0)">To demonstrate the API, take a look at the tr= ansducer_setup method of the app class (in pyscope_any.py) below:</p><div s= tyle=3D"font-stretch:normal;font-size:14px;line-height:22px;font-family:rob= oto,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 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-lef= t:53px;padding-bottom:0px;margin:0px"><a name=3D"m_7616754002781017616_l000= 01" 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)"> 1</span>=C2=A0 <span style=3D"color:r= gb(0,128,0)">def </span>transducer_setup(self):</div><div style=3D"font-str= etch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;min-he= ight:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;paddi= ng-bottom:0px;margin:0px"><a name=3D"m_7616754002781017616_l00002" style=3D= "color:rgb(61,87,140)"></a><span style=3D"padding-right:4px;text-align:righ= t;border-right:2px solid rgb(0,255,0);white-space:pre-wrap;background-color= :rgb(232,232,232)"> 2</span>=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;p= adding-left:53px;padding-bottom:0px;margin:0px"><a name=3D"m_76167540027810= 17616_l00003" style=3D"color:rgb(61,87,140)"></a><span style=3D"padding-rig= ht:4px;text-align:right;border-right:2px solid rgb(0,255,0);white-space:pre= -wrap;background-color:rgb(232,232,232)"> 3</span>=C2=A0 tc1.on_i= nit()</div><div 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"m_761= 6754002781017616_l00004" 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);whit= e-space:pre-wrap;background-color:rgb(232,232,232)"> 4</span>=C2=A0 = settings =3D TraceCollectorPy.SGprSettings(<wbr>)</div><div style=3D"fon= t-stretch:normal;font-size:13px;line-height:1;font-family:monospace,fixed;m= in-height:13px;white-space:pre-wrap;word-wrap:break-word;padding-left:53px;= padding-bottom:0px;margin:0px"><a name=3D"m_7616754002781017616_l00005" sty= le=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</span>=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-wra= p:break-word;padding-left:53px;padding-bottom:0px;margin:0px"><a name=3D"m_= 7616754002781017616_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 = <span style=3D"color:rgb(128,0,0)"># This may need shifting for diff= erent frequencies</span></div><div style=3D"font-stretch:normal;font-size:1= 3px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:p= re-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0p= x"><a name=3D"m_7616754002781017616_l00007" 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)"> = 7</span>=C2=A0 settings.window_timeshift_ps =3D -42000</div><div 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"m_7616754002781017616_l0= 0008" style=3D"color:rgb(61,87,140)"></a><span style=3D"padding-right:4px;t= ext-align:right;border-right:2px solid rgb(0,255,0);white-space:pre-wrap;ba= ckground-color:rgb(232,232,232)"> 8</span>=C2=A0 settings.multiMo= de =3D 4</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-wra= p:break-word;padding-left:53px;padding-bottom:0px;margin:0px"><a name=3D"m_= 7616754002781017616_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-wrap;background-color:rgb(232,232,232)"> 9</span>=C2=A0 = <span style=3D"color:rgb(128,0,0)"># edit tuples in following call f= or different transducer 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-b= ottom:0px;margin:0px"><a name=3D"m_7616754002781017616_l00010" style=3D"col= or:rgb(61,87,140)"></a><span style=3D"padding-right:4px;text-align:right;bo= rder-right:2px solid rgb(0,255,0);white-space:pre-wrap;background-color:rgb= (232,232,232)"> 10</span>=C2=A0 tc1.prepare_transducers(0, 1, sett= ings, [(1, 1, 1), (2, 2, 1)])</div><div style=3D"font-stretch:normal;font-s= ize:13px;line-height:1;font-family:monospace,fixed;min-height:13px;white-sp= ace:pre-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;marg= in:0px"><a name=3D"m_7616754002781017616_l00011" style=3D"color:rgb(61,87,1= 40)"></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)"= > 11</span>=C2=A0 <span style=3D"color:rgb(128,0,0)"># put RX scop= es in right slots</span></div><div style=3D"font-stretch:normal;font-size:1= 3px;line-height:1;font-family:monospace,fixed;min-height:13px;white-space:p= re-wrap;word-wrap:break-word;padding-left:53px;padding-bottom:0px;margin:0p= x"><a name=3D"m_7616754002781017616_l00012" 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)"> 1= 2</span>=C2=A0 tc1.add_scope(2)</div><div style=3D"font-stretch:norm= al;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_7616754002781017616_l00013" style=3D"color:rg= b(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)"># ad= d our new trace-collector to list</span></div><div 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"m_7616754002781017616_l00014" style=3D"color:= rgb(61,87,140)"></a><span style=3D"padding-right:4px;text-align:right;borde= r-right:2px solid rgb(0,255,0);white-space:pre-wrap;background-color:rgb(23= 2,232,232)"> 14</span>=C2=A0 self._trace_collectors.append(<wbr>tc= 1) </div></div><p style=3D"font-stretch:normal;font-size:14px;line-heigh= t:22px;font-family:roboto,sans-serif;color:rgb(0,0,0)">multiMode must be se= t to 4 to support multiple transducers (0 for legacy 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;fo= nt-size:14px;line-height:22px;font-family:roboto,sans-serif;color:rgb(0,0,0= )">Ideally, the line numbers would be 325..338 (the actual line numbers wit= hin the code).<br></p><p style=3D"font-stretch:normal;font-size:14px;line-h= eight:22px;font-family:roboto,sans-serif;color:rgb(0,0,0)"><br></p></div></= div></div><div class=3D"HOEnZb"><div class=3D"h5"><div class=3D"gmail_extra= "><br><div class=3D"gmail_quote">On 31 August 2016 at 11:56, Albert <span d= ir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">= [email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_= quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1= ex"><div dir=3D"ltr"><div><div>Dominic,<br><br>There are at the moment, as = far as I know, no possibilities to do this, best is to file a bug report fo= r an enhancement at bugzilla (see: <a href=3D"http://www.stack.nl/~dimitri/= doxygen/manual/trouble.html#bug_reports" target=3D"_blank">http://www.stack= .nl/~dimitri/d<wbr>oxygen/manual/trouble.html#bug<wbr>_reports</a>).<br>Whi= ch 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"gma= il_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.aman= [email protected]" target=3D"_blank">[email protected]</a>></span> wrote= :<br></div></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8= ex;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 b= ased) line numbers? I am including the snippet to show other developers whe= re to look in the code to modify certain values, and the "1" base= d 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"gma= il_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><pre style=3D"margin:0= em"><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 have come into the mind of others -=C2=A0<span style=3D"fon= t-size:12.8000001907349px">Blaise Pascal.</span></div><div><br></div>Domini= c Amann<br>M <a href=3D"tel:416-270-4587" value=3D"+14162704587" target=3D"= _blank">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> --94eb2c0491f4d66b3a053b60f87f-- --===============5560967853587502660== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ --===============5560967853587502660== 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 --===============5560967853587502660==--