<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
<br>
Contributions to this Palette are added with extension point
"org.jboss.tools.common.model.preferences".<br>
As an example, see
jbosstools-javaee/jsf/plugins/org.jboss.tools.jsf/resources/meta/jsf-palette.xml<br>
<br>
If you are ok with a default "Insert Tag" drop wizard, then no
Java programming is needed.<br>
<br>
In xml, you should wrap your contribution as in the example<br>
<br>
<XStudio model-entity="SharableXStudio" NAME="XStudio"
SCOPE="project"><br>
<Palette NAME="Palette" SCOPE="project"
model-entity="SharablePalette"><br>
...<br>
</Palette><br>
</XStudio><br>
<br>
and put inside your <PageTabHTML>, <GroupHTML>,
<MacroHTML> nodes.<br>
<br>
You may use Palette Editor instead of writing all xml manually.<br>
Open an .xhtml file and push toolbar button 'Palette Editor' in
Palette View. In Palette Editor, on node 'Palette' create your new
group, fill it with sub-groups, and fill sub-groups with macro
items.<br>
<br>
When you save and close Eclipse, modified Palette will be saved as
%workspace%/.metadata/.plugins/org.jboss.tools.common.model/Palette.xml.
You will have to find your group <PageTabHTML> in the
complete list of groups and copy it to contribution file to be
registered with extension point
"org.jboss.tools.common.model.preferences".<br>
<br>
Best regards,<br>
Viacheslav Kabanovich<br>
<br>
On 02/24/2015 12:01 PM, Gayard, Leonel wrote:<br>
</div>
<blockquote
cite="mid:2BEF509A87DA68498E083D488190373F35FFC1FB@mstc2.gft.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I am investigating the
internal code in JBoss Tools, in particular, the pieces that
fill up the Palette view.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I have checked out the
source code of the plugins, but I am having a hard time
finding out how the Palette view is filled with the
different options. For instance, when running an Eclipse
instance with JBoss Tools, I can see the palette view is
filled with the same options expected from the manual page
at [1]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">But I’m having a hard
time to find in the source code how the data to fill this
tree of categories is found.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I have traced the code,
and I see that the categories are fetched as an XModel /
Preference Model [2]. So, if the palette view shows the
categories HTML, JBoss, JSF, Oracle ADF and others, I would
expect to find an XML or Properties file that described
those.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Can someone give me any
pointers on how the current code finds those categories ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Another question is, I’m
currently checking if we can extend the plugin to add new
categories and items in the Palette; can you give me some
hint on how to approach this task ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> [1]:
<a class="moz-txt-link-freetext" href="https://docs.jboss.org/tools/4.0.1.Final/en/jsf/html/palette.html">https://docs.jboss.org/tools/4.0.1.Final/en/jsf/html/palette.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> [2]:
<a class="moz-txt-link-freetext" href="https://github.com/jbosstools/jbosstools-base/blob/jbosstools-4.0.0.Final/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/PreferenceModelUtilities.java#L64">https://github.com/jbosstools/jbosstools-base/blob/jbosstools-4.0.0.Final/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/PreferenceModelUtilities.java#L64</a><o:p></o:p></span></p>
</div>
<p><font face="Arial"><strong><font style="FONT-SIZE: 11pt">Leonel
Gayard</font></strong><em><br>
</em><font style="FONT-SIZE: 11pt"><font style="FONT-SIZE:
9pt">_______________________________________</font><br>
</font><font style="FONT-SIZE: 9pt"><br>
<font style="FONT-SIZE: 9pt"><font color="#213e7f"><strong>GFT Brasil
Consultoria Informática Ltda.</strong></font></font><font
style="FONT-SIZE: 9pt"><font style="FONT-SIZE: 9pt"><font
style="COLOR: black; FONT-SIZE: 9pt; TEXT-DECORATION:
none" color="black"><font style="FONT-SIZE: 9pt"><font
style="COLOR: black; FONT-SIZE: 9pt;
TEXT-DECORATION: none" color="#000000"><br>
Av. Sao Francisco, 98<br>
18.095-450 Sorocaba, Brasil<br>
<br>
T +55 15 3332 9731</font><br>
<font style="COLOR: black; FONT-SIZE: 9pt;
TEXT-DECORATION: none">F </font><br>
<a class="moz-txt-link-abbreviated" href="mailto:Leonel.Gayard@gft.com">Leonel.Gayard@gft.com</a><br>
</font><font style="FONT-SIZE: 9pt; TEXT-DECORATION:
none"><font color="#000000"><a
moz-do-not-send="true" style="COLOR: black;
TEXT-DECORATION: none"
href="http://www.gft.com/br">www.gft.com</a></font></font><a
moz-do-not-send="true" style="COLOR: black;
TEXT-DECORATION: none" href="http://www.gft.com/br"><font
color="#000000">/br</font></a><br>
<font style="FONT-SIZE: 9pt" color="#000000"><a
moz-do-not-send="true" style="COLOR: black;
TEXT-DECORATION: none"
href="http://www.gft-blog.com.br">www.gft-blog.com.br</a></font><br>
<font style="COLOR: black; FONT-SIZE: 9pt;
TEXT-DECORATION: none" color="#000000"><a
moz-do-not-send="true" style="COLOR: black;
TEXT-DECORATION: none"
href="http://www.twitter.com/gft_br">www.twitter.com/gft_br</a></font><br>
</font></font></font></font></font><font face="Arial"><font
style="FONT-SIZE: 14pt" color="#213e7f"><font
style="FONT-SIZE: 14pt"><font style="FONT-SIZE: 12pt"><font
style="FONT-SIZE: 12pt"><font style="COLOR: black;
TEXT-DECORATION: none" color="#000000"><font
style="FONT-SIZE: 11pt"><font style="FONT-SIZE:
9pt">______________________________________</font></font></font></font></font></font></font></font></p>
<font face="Arial"><font style="FONT-SIZE: 14pt" color="#213e7f"><font
style="FONT-SIZE: 14pt"><font style="FONT-SIZE: 12pt"><font
style="FONT-SIZE: 12pt"><font style="COLOR: black;
TEXT-DECORATION: none" color="#000000">
</font></font></font></font></font></font><br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
jbosstools-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jbosstools-dev@lists.jboss.org">jbosstools-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jbosstools-dev">https://lists.jboss.org/mailman/listinfo/jbosstools-dev</a></pre>
</blockquote>
<br>
</body>
</html>