[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sonar-dev
Subject:    Re: [sonar-dev] [help] plugin developement : use an automatic measure as a number / insert pictures
From:       Thomas Sermier <thomas.sermier () gmail ! com>
Date:       2012-05-31 9:51:28
Message-ID: CADb8_j+EXE7CxuC4pFoCpw8wq=Q3+jXBcbHQx6n=___fY+uG7g () mail ! gmail ! com
[Download RAW message or body]

Hi David,

Thank you for your answer but I still fail in embedding a resource ^^'.

To get the key of the plugin, I had to implement org.api.sonar.Plugin to
override the getKey method, but it is a deprecated interface. If I extend
SonarPlugin, which is suggested by the sonar-reference-plugin, I can't
override the getKey method and so I don't know what the key is. What is the
best solution ?

To embed the image, using url_for_static(:plugin => '<plugin key>', :path
=> 'image.png') only generates this part of URL : "/static/<plugin
key>/image.png" and it doesn't work for including the image.

I tried to type on the keyboard the complete URL of the image to be sure it
is well embedded but I don't know what is the <context> in
"http://<server>:<port>/<context>/static/<plugin key>/<resource name>"

Thank you to tell me what's wrong on my steps.

Regards,

Thomas

2012/5/30 Francois, David <david.francois@logica.com>

>  Hi,****
>
> ** **
>
> How can I find the <plugin key> of my plugin ?****
>
> You can find the plugin key in your XXXPlugin class, it matches to the
> return of the method getKey().****
>
> And yes, after, you can integrate your image with the html code : <img
> src="<%= url_for_static(:plugin => '<plugin key>', :path => 'image.png')
> -%>" />****
>
> ** **
>
> Regards,****
>
> David FRANCOIS****
>
> ** **
>
> *De :* Thomas Sermier [mailto:thomas.sermier@gmail.com]
> *Envoyé :* mercredi 30 mai 2012 14:17
>
> *À :* dev@sonar.codehaus.org
> *Objet :* Re: [sonar-dev] [help] plugin developement : use an automatic
> measure as a number / insert pictures****
>
>  ** **
>
> Hi everybody,
> thank you very much David, I resolved all my problems of measure values.
>
> However, I read the instructions to embed images but I failed. How can I
> find the <plugin key> of my plugin ? What does it match ? And then, how to
> integrate the image in a widget ? Is it with an html code like : <img src="<%=
> url_for_static(:plugin => '<plugin key>', :path => 'image.png') %>"> ?
>
> Greetings,
> Thomas.
>
>
> ****
>
> 2012/5/29 Francois, David <david.francois@logica.com>****
>
> Sorry, i will resist at the temptation the next time J****
>
>  ****
>
> *De :* Freddy Mallet [mailto:freddy.mallet@gmail.com]
> *Envoyé :* mardi 29 mai 2012 12:22
> *À :* dev@sonar.codehaus.org
> *Objet :* Re: [sonar-dev] [help] plugin developement : use an automatic
> measure as a number / insert pictures****
>
>  ****
>
> Hi Guys, I'm sorry but don't use anymore the french language on this
> mailing list. ****
>
>
> ****
>
> -----****
>
> twitter.com/FreddyMallet****
>
> Sonar for Continuous Inspection****
>
> ** **
>
> 2012/5/29 Francois, David <david.francois@logica.com>****
>
> Bonjour Thomas,****
>
>  ****
>
> En ce qui concerne ton 1er problème, tu peux utiliser la syntaxe *
> measure.value* pour récupérer ta valeur. De façon plus générale :****
>
> ·         Measure de type Float : *measure.value*****
>
> ·         Measure de type String : *measure.text_value*****
>
> ·         Measure de type Data (String de plus de 96 caractères par
> exemple) : *measure.data*****
>
>  ****
>
> Pour l’affichage, il peut être nécessaire ensuite d’utiliser les méthodes
> *to_s* sur la valeur de la mesure.****
>
>  ****
>
> Pour ton second problème, je pense que tu trouveras ta réponse ici :
> http://docs.codehaus.org/display/SONAR/Coding+a+plugin#Codingaplugin-Howtoembedstaticresource
> ****
>
>  ****
>
> Cordialement,****
>
> David FRANCOIS****
>
>
> _______________________________________________________________________________________
> ****
>
> Hi Thomas,****
>
>  ****
>
> For your first problem, you can use measure.value to get the value. More
> generally :****
>
> ·         Float Measure : measure.value****
>
> ·         String Measure : measure.text_value****
>
> ·         Data Measure (for String > 96 characters for example) :
> measure.data****
>
>  ****
>
> To display this measure, it may be necessary to use to_s method on the
> measure’s value.****
>
>  ****
>
> For your second problem, I think you will find your answer here :
> http://docs.codehaus.org/display/SONAR/Coding+a+plugin#Codingaplugin-Howtoembedstaticresource
> ****
>
>  ****
>
> Regards,****
>
> David****
>
>  ****
>
> *De :* Thomas Sermier [mailto:thomas.sermier@gmail.com]
> *Envoyé :* mardi 29 mai 2012 09:55
> *À :* dev@sonar.codehaus.org
> *Objet :* [sonar-dev] [help] plugin developement : use an automatic
> measure as a number / insert pictures****
>
>  ****
>
> Bonjour à tous,
>
> Je m'appelle Thomas Sermier, je suis ingénieur à l'INRIA et je travaille
> actuellement sur le projet Squash (http://www.squashtest.org). Ma tâche
> consiste à développer dans Sonar le modèle qualimétrique de Squash.
>
> Le premier problème concerne les mesures automatiques sauvegardées dans
> mes nouvelles métriques (de type float) que j'ai créé. J'affiche ces
> mesures (à l'échelle du projet) dans un widget mais j'ai également besoin
> d'afficher la moyenne des valeurs de ces mesures. Or je n'arrive pas à
> trouver la commande qui me permettrait de traiter ces mesures comme des
> nombres et de les additionner par exemple.
> format_measure('measure') me permet d'afficher la mesure mais pas de faire
> des opérations dessus.
> Comment puis-je faire pour utiliser les mesures comme de simples nombres ?
>
> Le second problème est que je n'arrive pas à insérer d'images dans mon
> plugin. Le seul contournement que j'ai trouvé à ce problème est de créer un
> dossier dans les répertoires d'installation de Sonar, d'y placer mes images
> et ensuite de les afficher via la commande ruby <% image_tag 'mon image'
> %>. Existe-t-il une solution pour embarquer des images dans un plug in ?
>
> J'espère avoir réussi à m'exprimer clairement.
>
> Merci d'avance pour l'intérêt apporté à ce mail,
> Cordialement,
> Thomas
>
>
> _______________________________________________________________________________________
>
> Hi everybody,
>
> My name is Thomas Sermier, I'm french and I work on the "SQUASH" project (
> http://www.squashtest.org).
>
> My problem is about the automatic measures saved in my own metrics (typed
> float). I display the values of the measures in a widget but I also need to
> calculate the average of the measures. The problem is that I can't use them
> as numbers. The code format_measure('my_measure') allows me to display but
> not to do operations on it.
> How could I do to use my measures as numbers ?
>
> The second problem is that I can't insert images in my plugin. The only
> solution I found is to  copy and paste the images in the installation
> repertory of Sonar and to catch them with the ruby code <% image_tag
> 'my_image' %>. Exists any solution to integrate images in plugins ?
>
> Thank you very much for the interest in this mail.
> Greetings,
> Thomas.****
>
>
> Think green - keep it on the screen. This e-mail and any attachment is for
> authorised use by the intended recipient(s) only. It may contain
> proprietary material, confidential information and/or be subject to legal
> privilege. It should not be copied, disclosed to, retained or used by, any
> other party. If you are not an intended recipient then please promptly
> delete this e-mail and any attachment and all copies and inform the sender.
> Thank you. ****
>
>  ****
>
>
> Think green - keep it on the screen. This e-mail and any attachment is for
> authorised use by the intended recipient(s) only. It may contain
> proprietary material, confidential information and/or be subject to legal
> privilege. It should not be copied, disclosed to, retained or used by, any
> other party. If you are not an intended recipient then please promptly
> delete this e-mail and any attachment and all copies and inform the sender.
> Thank you. ****
>
> ** **
>
> Think green - keep it on the screen. This e-mail and any attachment is for
> authorised use by the intended recipient(s) only. It may contain
> proprietary material, confidential information and/or be subject to legal
> privilege. It should not be copied, disclosed to, retained or used by, any
> other party. If you are not an intended recipient then please promptly
> delete this e-mail and any attachment and all copies and inform the sender.
> Thank you.
>

[Attachment #3 (text/html)]

Hi David,<br><br>Thank you for your answer but I still fail in embedding a resource \
^^&#39;.<br><br> To get the key of the plugin, I had to implement \
org.api.sonar.Plugin to  override the getKey method, but it is a deprecated \
interface. If I  extend SonarPlugin, which is suggested by the \
sonar-reference-plugin, I  can&#39;t override the getKey method and so I don&#39;t \
know what the key is. What is the best solution ?<br><br>To embed the image, using \
<code><span style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">url_for_static(:plugin \
=&gt; &#39;&lt;plugin key&gt;&#39;, :path =&gt; &#39;image.png&#39;) only generates \
this part of URL</span></code> : &quot;/static/&lt;plugin key&gt;/image.png&quot; and \
it doesn&#39;t work for including the image.<br> <font \
style="font-family:arial,helvetica,sans-serif" size="2"><br>I tried to type on the \
keyboard the complete URL of the image to be sure it is well embedded but I don&#39;t \
know what is the &lt;context&gt; in<br></font><div \
style="font-family:arial,helvetica,sans-serif" class="container" title="Hint: \
double-click to select code"> <div class="line number1 index0 alt2"><font><code \
class="java plain">&quot;http:</code><code class="java \
comments">//&lt;server&gt;:&lt;port&gt;/&lt;context&gt;/static/&lt;plugin \
key&gt;/&lt;resource name&gt;&quot;</code></font></div> </div><font \
style="font-family:arial,helvetica,sans-serif" size="2"><br>Thank you to tell me \
what&#39;s wrong on my steps.</font><br><br>Regards,<br><br>Thomas<br><br><div \
class="gmail_quote">2012/5/30 Francois, David <span dir="ltr">&lt;<a \
href="mailto:david.francois@logica.com" \
target="_blank">david.francois@logica.com</a>&gt;</span><br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="FR">
<div>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi,<u></u><u></u></span></p><div \
class="im"> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> \
<u></u></span></p> <p class="MsoNormal"><span lang="EN-US">How can I find the \
&lt;plugin key&gt; of my plugin ?<u></u><u></u></span></p> </div><p \
class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">You can find the plugin key in your XXXPlugin class, it matches to the \
return of the method getKey().<u></u><u></u></span></p>

<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">And yes, after, you can integrate your image with the html code : \
&lt;img src=&quot;&lt;%= url_for_static(:plugin =&gt; &#39;&lt;plugin key&gt;&#39;, \
                :path =&gt; &#39;image.png&#39;)
 -%&gt;&quot; /&gt;<u></u><u></u></span></p>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US"><u></u> <u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">Regards,<u></u><u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">David FRANCOIS<u></u><u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US"><u></u> <u></u></span></p> <div style="border:none;border-top:solid \
#b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"> <p class="MsoNormal"><b><span \
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">De \
:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> \
Thomas Sermier [mailto:<a href="mailto:thomas.sermier@gmail.com" \
target="_blank">thomas.sermier@gmail.com</a>] <br>
<b>Envoyé :</b> mercredi 30 mai 2012 14:17</span></p><div><div class="h5"><br>
<b>À :</b> <a href="mailto:dev@sonar.codehaus.org" \
target="_blank">dev@sonar.codehaus.org</a><br> <b>Objet :</b> Re: [sonar-dev] [help] \
plugin developement : use an automatic measure as a number / insert \
pictures<u></u><u></u></div></div><p></p> </div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi everybody,<br>
thank you very much David, I resolved all my problems of measure values.<br>
<br>
However, I read the instructions to embed images but I failed. How can I find the \
&lt;plugin key&gt; of my plugin ? What does it match ? And then, how to integrate the \
image in a widget ? Is it with an html code like : &lt;img src=&quot;<code><span \
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;">&lt;%=  \
url_for_static(:plugin =&gt; &#39;&lt;plugin key&gt;&#39;, :path =&gt; \
&#39;image.png&#39;)</span></code> %&gt;&quot;&gt; ?<br> <br>
Greetings,<br>
Thomas.<br>
<br>
<br>
<u></u><u></u></p>
<div>
<p class="MsoNormal">2012/5/29 Francois, David &lt;<a \
href="mailto:david.francois@logica.com" \
target="_blank">david.francois@logica.com</a>&gt;<u></u><u></u></p> <div>
<div>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">Sorry, i will resist at the temptation the next time </span><span \
style="font-size:11.0pt;font-family:Wingdings;color:#1f497d" \
lang="EN-US">J</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US"> </span><u></u><u></u></p> <div style="border:none;border-top:solid \
#b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"> <p class="MsoNormal"><b><span \
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">De \
:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> \
Freddy Mallet [mailto:<a href="mailto:freddy.mallet@gmail.com" \
target="_blank">freddy.mallet@gmail.com</a>] <br>
<b>Envoyé :</b> mardi 29 mai 2012 12:22<br>
<b>À :</b> <a href="mailto:dev@sonar.codehaus.org" \
target="_blank">dev@sonar.codehaus.org</a><br> <b>Objet :</b> Re: [sonar-dev] [help] \
plugin developement : use an automatic measure as a number / insert \
pictures</span><u></u><u></u></p> </div>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Hi Guys, I&#39;m sorry but don&#39;t use anymore the french \
language on this mailing list. <u></u><u></u></p> <div>
<p class="MsoNormal"><br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><span \
style="font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;background:white">-----</span><u></u><u></u></p>
 </div>
<div>
<p class="MsoNormal"><a href="https://twitter.com/FreddyMallet" target="_blank"><span \
style="font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;background:white">twitter.com/FreddyMallet</span></a><u></u><u></u></p>
 </div>
<div>
<p class="MsoNormal"><span style="background:white">Sonar for Continuous \
Inspection</span><u></u><u></u></p> </div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">2012/5/29 Francois, David &lt;<a \
href="mailto:david.francois@logica.com" \
target="_blank">david.francois@logica.com</a>&gt;<u></u><u></u></p> <div>
<div>
<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Bonjour \
Thomas,</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> \
</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">En \
ce qui concerne ton 1<sup>er</sup> problème, tu peux utiliser la syntaxe \
<i>measure.value</i> pour récupérer ta valeur. De façon plus générale \
:</span><u></u><u></u></p> <p><span \
style="font-size:11.0pt;font-family:Symbol;color:#1f497d">·</span><span \
style="font-size:7.0pt;color:#1f497d">         </span><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Measure \
de type Float : <i>measure.value</i></span><u></u><u></u></p>
<p><span style="font-size:11.0pt;font-family:Symbol;color:#1f497d" \
lang="EN-US">·</span><span style="font-size:7.0pt;color:#1f497d" lang="EN-US">        \
 </span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">Measure de type String : \
<i>measure.text_value</i></span><u></u><u></u></p> <p><span \
style="font-size:11.0pt;font-family:Symbol;color:#1f497d">·</span><span \
style="font-size:7.0pt;color:#1f497d">         </span><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Measure \
de type Data (String de plus de 96 caractères par exemple) : \
<i>measure.data</i></span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> \
</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Pour \
l’affichage, il peut être nécessaire ensuite d’utiliser les méthodes <i>to_s</i> sur \
la valeur de la mesure.</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> \
</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Pour \
ton second problème, je pense que tu trouveras ta réponse ici : <a \
href="http://docs.codehaus.org/display/SONAR/Coding+a+plugin#Codingaplugin-Howtoembedstaticresource" \
target="_blank"> http://docs.codehaus.org/display/SONAR/Coding+a+plugin#Codingaplugin-Howtoembedstaticresource</a></span><u></u><u></u></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> \
</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Cordialement,</span><u></u><u></u></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">David \
FRANCOIS</span><u></u><u></u></p> <p class="MsoNormal" \
style="margin-bottom:12.0pt">_______________________________________________________________________________________<u></u><u></u></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">Hi Thomas,</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US"> </span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">For your first problem, you can use measure.value to get the value. More \
generally :</span><u></u><u></u></p>

<p><span style="font-size:11.0pt;font-family:Symbol;color:#1f497d" \
lang="EN-US">·</span><span style="font-size:7.0pt;color:#1f497d" lang="EN-US">        \
 </span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">Float Measure : measure.value</span><u></u><u></u></p> <p><span \
style="font-size:11.0pt;font-family:Symbol;color:#1f497d" lang="EN-US">·</span><span \
style="font-size:7.0pt;color:#1f497d" lang="EN-US">         </span><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">String Measure : measure.text_value</span><u></u><u></u></p> <p><span \
style="font-size:11.0pt;font-family:Symbol;color:#1f497d" lang="EN-US">·</span><span \
style="font-size:7.0pt;color:#1f497d" lang="EN-US">         </span><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">Data Measure (for String &gt; 96 characters for example) : \
measure.data</span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US"> </span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">To display this measure, it may be necessary to use to_s method on the \
measure’s value.</span><u></u><u></u></p>

<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US"> </span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US">For your second problem, I think you will find your answer here : \
</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><a \
href="http://docs.codehaus.org/display/SONAR/Coding+a+plugin#Codingaplugin-Howtoembedstaticresource" \
target="_blank"><span \
lang="EN-US">http://docs.codehaus.org/display/SONAR/Coding+a+plugin#Codingaplugin-Howtoembedstaticresource</span></a></span><u></u><u></u></p>


<p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US"> </span><u></u><u></u></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Regards,</span><u></u><u></u></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">David</span><u></u><u></u></p>
 <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d" \
lang="EN-US"> </span><u></u><u></u></p> <div style="border:none;border-top:solid \
#b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm"> <p class="MsoNormal"><b><span \
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">De \
:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> \
Thomas Sermier [mailto:<a href="mailto:thomas.sermier@gmail.com" \
target="_blank">thomas.sermier@gmail.com</a>] <br>
<b>Envoyé :</b> mardi 29 mai 2012 09:55<br>
<b>À :</b> <a href="mailto:dev@sonar.codehaus.org" \
target="_blank">dev@sonar.codehaus.org</a><br> <b>Objet :</b> [sonar-dev] [help] \
plugin developement : use an automatic measure as a number / insert \
pictures</span><u></u><u></u></p> </div>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Bonjour à tous,<br>
<br>
Je m&#39;appelle Thomas Sermier, je suis ingénieur à l&#39;INRIA et je travaille \
actuellement sur le projet Squash (<a href="http://www.squashtest.org" \
target="_blank">http://www.squashtest.org</a>). Ma tâche consiste à développer dans \
Sonar le modèle qualimétrique  de Squash.<br>
<br>
Le premier problème concerne les mesures automatiques sauvegardées dans mes nouvelles \
métriques (de type float) que j&#39;ai créé. J&#39;affiche ces mesures (à \
l&#39;échelle du projet) dans un widget mais j&#39;ai également besoin d&#39;afficher \
la moyenne des valeurs de ces mesures.  Or je n&#39;arrive pas à trouver la commande \
qui me permettrait de traiter ces mesures comme des nombres et de les additionner par \
exemple. <br>
format_measure(&#39;measure&#39;) me permet d&#39;afficher la mesure mais pas de \
faire des opérations dessus.<br> Comment puis-je faire pour utiliser les mesures \
comme de simples nombres ?<br> <br>
Le second problème est que je n&#39;arrive pas à insérer d&#39;images dans mon \
plugin. Le seul contournement que j&#39;ai trouvé à ce problème est de créer un \
dossier dans les répertoires d&#39;installation de Sonar, d&#39;y placer mes images \
et ensuite de les afficher via la  commande ruby &lt;% image_tag &#39;mon image&#39; \
%&gt;. Existe-t-il une solution pour embarquer des images dans un plug in ?<br> <br>
J&#39;espère avoir réussi à m&#39;exprimer clairement.<br>
<br>
Merci d&#39;avance pour l&#39;intérêt apporté à ce mail,<br>
Cordialement,<br>
Thomas<br>
<br>
_______________________________________________________________________________________<br>
 <br>
Hi everybody,<br>
<br>
My name is Thomas Sermier, I&#39;m french and I work on the &quot;SQUASH&quot; \
project (<a href="http://www.squashtest.org" \
target="_blank">http://www.squashtest.org</a>).<br> <br>
My problem is about the automatic measures saved in my own metrics (typed float). I \
display the values of the measures in a widget but I also need to calculate the \
average of the measures. The problem is that I can&#39;t use them as numbers. The \
code format_measure(&#39;my_measure&#39;)  allows me to display but not to do \
operations on it.<br> How could I do to use my measures as numbers ?<br>
<br>
The second problem is that I can&#39;t insert images in my plugin. The only solution \
I found is to  copy and paste the images in the installation repertory of Sonar and \
to catch them with the ruby code &lt;% image_tag &#39;my_image&#39; %&gt;. Exists any \
solution to integrate  images in plugins ?<br>
<br>
Thank you very much for the interest in this mail.<br>
Greetings,<br>
Thomas.<u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><br clear="all">
Think green - keep it on the screen. This e-mail and any attachment is for authorised \
use by the intended recipient(s) only. It may contain proprietary material, \
confidential information and/or be subject to legal privilege. It should not be \
copied, disclosed  to, retained or used by, any other party. If you are not an \
intended recipient then please promptly delete this e-mail and any attachment and all \
copies and inform the sender. Thank you. <u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><br clear="all">
Think green - keep it on the screen. This e-mail and any attachment is for authorised \
use by the intended recipient(s) only. It may contain proprietary material, \
confidential information and/or be subject to legal privilege. It should not be \
copied, disclosed  to, retained or used by, any other party. If you are not an \
intended recipient then please promptly delete this e-mail and any attachment and all \
copies and inform the sender. Thank you. <u></u><u></u></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div></div></div><div><div class="h5">
<br clear="all"> Think green - keep it on the screen.



This e-mail and any attachment is for authorised use by the intended recipient(s) \
only. It may contain proprietary material, confidential information and/or be subject \
to legal privilege. It should not be copied, disclosed to, retained or used by, any \
other party. If you are not an intended recipient then please promptly delete this \
e-mail and any attachment and all copies and inform the sender. Thank you.


</div></div></div>


</blockquote></div><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic