Customize palette with plugin.xml

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Customize palette with plugin.xml

Postby domfe » Wed Oct 27, 2010 7:33 am

Hi.
I'm getting this error when launching an Eclipse debug session:
Can not find description for toolkit

I've write my plugin.xml like the one in the document to extend WindowBuilder.


Thanks.
domfe
 
Posts: 46
Joined: Mon Oct 04, 2010 6:42 am

Re: Customize palette with plugin.xml

Postby Eric Clayberg » Wed Oct 27, 2010 7:38 am

We need to see an example/test case so that we can see exactly what you are doing.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Customize palette with plugin.xml

Postby domfe » Thu Oct 28, 2010 1:20 am

Here is my plugin.xml.

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>

   <extension
         point="org.eclipse.ui.actionSets">
      <actionSet
            label="Sample Action Set"
            visible="true"
            id="com.test.plugin.actionSet">
         <menu
               label="Sample &amp;Menu"
               id="sampleMenu">
            <separator
                  name="sampleGroup">
            </separator>
         </menu>
         <action
               label="&amp;Sample Action ZWT"
               icon="icons/sample.gif"
               class="com.test.plugin.actions.SampleAction"
               tooltip="Hello, Eclipse world"
               menubarPath="sampleMenu/sampleGroup"
               toolbarPath="sampleGroup"
               id="com.test.plugin.actions.SampleAction">
         </action>
      </actionSet>
   </extension>
   <extension
         point="com.instantiations.designer.core.toolkits">
      <toolkit
            id="com.test.plugin.toolkit">
         <palette>
            <category
                  description="Test palette"
                  id="com.test.plugin.category"
                  name="Test"
                  open="true"
                  optional="false"
                  visible="true">
            </category>
         </palette>
      </toolkit>
   </extension>
</plugin>


I'm using the "Hello world" template of Eclipse. The "Sample menu" is showing correctly.
The console report this:

Code: Select all
!ENTRY com.instantiations.designer.core 4 4 2010-10-28 11:01:30.031
!MESSAGE Designer [8.0.0.r36x201009160631]: null argument: Can not find description for toolkit: com.test.plugin.toolkit
!STACK 0
com.instantiations.designer.core.utils.check.AssertionFailedException: null argument: Can not find description for toolkit: com.test.plugin.toolkit


Thank you for your help.
domfe
 
Posts: 46
Joined: Mon Oct 04, 2010 6:42 am

Re: Customize palette with plugin.xml

Postby Konstantin.Scheglov » Thu Oct 28, 2010 5:11 am

domfe wrote:Here is my plugin.xml.


Thank you for example.
So, now we can see where is the problem.
You try to use toolkit which is not defined.
You should use one of the existing toolkits like com.instantiations.designer.rcp or com.instantiations.designer.swing, etc.

I don't think that you are really need to use plugin.xml at all, I recommend you to use just project specific palette contribution.
See item 1.1 in http://code.google.com/webtoolkit/tools ... torial.pdf
It is much easier and this contribution can be shared using VCS with rest of project.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: Customize palette with plugin.xml

Postby domfe » Thu Oct 28, 2010 8:05 am

Thank Konstantin.
I was supposing that id was a unique identifier so I was changing it :-(
I'm using plugin.xml because I want to use the "next" attribute to place my category.
Now if I test choosing "Launch an Eclipse application" my category and widgets
are showing in the palette but I have a lot of errors.

Code: Select all
28-ott-2010 17.58.12 org.eclipse.e4.xwt.internal.utils.LoggerManager log
GRAVE: null
java.lang.NullPointerException
   at org.eclipse.e4.xwt.javabean.ResourceLoader.loadShellCLR(ResourceLoader.java:1342)


Also, the errors are generated when I do something with my widget (move, resize, ...).

If I test my plugin with a new Eclipse instance, it seems that it isn't loaded: I don't see
the Sample menu too.

Thank for your time.
domfe
 
Posts: 46
Joined: Mon Oct 04, 2010 6:42 am

Re: Customize palette with plugin.xml

Postby Konstantin.Scheglov » Thu Oct 28, 2010 9:12 am

I will check if we have support for "next" attribute in project palette contributions later.

Your exception looks as classpath problem or may be bug in XWT rendering engine.
Can you provide your project for analysis?
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk


Return to SWT Designer

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest

cron