| wbp-meta folder not in classpath? [message #722287] |
Mon, 05 September 2011 05:04  |
andiqo Messages: 32 Registered: July 2009 |
Member |
|
|
I have an issue with my library of components: the wbp-meta folder is ignored if my library project is not imported in the Eclipse workspace.
Here is my test case:
* change your target platform to reference the attached bundle com.sneda.wb.issue1_1.0.0.201109051047.jar
* create a new Plug-in Project
* Add com.sneda.wb.issue1 as a plugin dependency
* Add the component com.sneda.wb.issue1.api.MyComponent1 to the palette
Here you should see a purple square icon as the image of MyComponent1 in the palette. You should also have a property "myProperty" with true as default, in the Properties part of the WB editor (defined in MyComponent1.wbp-component.xml).
Thanks a lot for your help.
--andiqo
|
|
|
| Re: wbp-meta folder not in classpath? [message #722441 is a reply to message #722287] |
Mon, 05 September 2011 15:30   |
Konstantin Scheglov Messages: 547 Registered: July 2009 |
Senior Member |
|
|
1. No need to put wbp-meta into plugin classpath, none of WB standard plugins does this.
2. It is enough just to have wbp-meta folder in jar which is in project classpath, because you explicitly stated that you want to use this jar. However in case of plugin you have to tell WB that this plugins wants to contribute to some toolkit. WB can not look up hundreds of plugins for wbp-meta folder.
So, you need at least.
<extension point="org.eclipse.wb.core.toolkits">
<toolkit id="org.eclipse.wb.swing">
</toolkit>
</extension>
Konstantin Scheglov,
Google, Inc.
|
|
|
|
|
| Re: wbp-meta folder not in classpath? [message #724845 is a reply to message #722669] |
Tue, 13 September 2011 06:42   |
andiqo Messages: 32 Registered: July 2009 |
Member |
|
|
Hummhh, my archive must also be copied in the dropins folder...
Thus, if I have com.sneda.wb.issue1_1.0.0.201109061145.jar in the dropins folder of my running instance of Eclipse and in the target definition file for my projects (I use a file named myproduct.target which is the TP used to develop our plugins) all is fine. Unfortunately, this is not a viable solution as my "real" bundle (the one which defines all the components to be visible in the palette) has lots of other dependencies. And I don't want to copy everything in the dropins folder.
So for me, a solution would be to have a plugin in the dropins folder which would tell WindowBuilder that another bundle have a wbp-meta folder to be scanned... I tried using a ToolkitDescription for that but without success.
Or perhaps a better solution would be that WindowBuilder does not need the plugin from the dropins folder anymore?
Any idea appreciated.
Thanls a lot.
++andiqo
[Updated on: Tue, 13 September 2011 06:42] Report message to a moderator
|
|
|
|
| Re: wbp-meta folder not in classpath? [message #724919 is a reply to message #724853] |
Tue, 13 September 2011 09:44  |
andiqo Messages: 32 Registered: July 2009 |
Member |
|
|
I found a solution which looks OK. Have 2 plug-ins:
(1) com.sneda.wb.issue1.jar which contains the components classes
(2) com.sneda.wb.issue1.wbp.jar which uses the extension point org.eclipse.wb.core.toolkits and contains the wbp-meta folder.
1 goes in the target platform definition
2 in the dropins folder of my Eclipse instance
Thanks again for you help.
++andiqo
|
|
|
Powered by
FUDForum. Page generated in 0.01667 seconds