Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » wbp-meta folder not in classpath?
wbp-meta folder not in classpath? [message #722287] Mon, 05 September 2011 09:04 Go to next message
andiqo  is currently offline andiqo Friend
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 19:30 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
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 #722603 is a reply to message #722441] Tue, 06 September 2011 09:58 Go to previous messageGo to next message
andiqo  is currently offline andiqo Friend
Messages: 32
Registered: July 2009
Member
Thanks a lot for your answer. But I still need help I'm afraid..

Thus I added the lines you suggested in the plugin.xml of my bundle: com.sneda.wb.issue1. Then I regenerate the plugin archive and reference it from another project in order to add MyComponent1 to the WB palette again. But then, I get this error message in the Eclipse Problems view:

Archive for required library: '/home/SNEDA-N-DOM/nio/dev/eclipse/ws-temp/.metadata/.plugins/org.eclipse.pde.core/.external_libraries/com.sneda.wb.issue1_1.0.0.201109061145/wbp-meta' in project 'com.sneda.test.wb' cannot be read or is not a valid ZIP file


Indeed:

nio@lxnio:~/dev/eclipse/ws-temp/.metadata/.plugins/org.eclipse.pde.core/.external_libraries/com.sneda.wb.issue1_1.0.0.201109061145$ ll
total 8
drwxr-xr-x 2 nio utilisa.^du^domaine 4096 2011-09-06 11:45 ./
drwxr-xr-x 3 nio utilisa.^du^domaine 4096 2011-09-06 11:45 ../
-rw-r--r-- 1 nio utilisa.^du^domaine    0 2011-09-06 11:45 wbp-meta


You could find attached my very simple components library: com.sneda.wb.issue1, with only one component: MyComponent1

Thanks again.
--andiqo
Re: wbp-meta folder not in classpath? [message #722669 is a reply to message #722603] Tue, 06 September 2011 13:08 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
I don't know.
You archive looks good.

http://code.google.com/javadevtools/wbpro/NewComponentsTutorial.pdf
See item 1.3, you need library element, if you want not just describe component, but also allow dropping it from palette.


Konstantin Scheglov,
Google, Inc.
Re: wbp-meta folder not in classpath? [message #724845 is a reply to message #722669] Tue, 13 September 2011 10:42 Go to previous messageGo to next message
andiqo  is currently offline andiqo Friend
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 10:42]

Report message to a moderator

Re: wbp-meta folder not in classpath? [message #724853 is a reply to message #722287] Tue, 13 September 2011 11:00 Go to previous messageGo to next message
andiqo  is currently offline andiqo Friend
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
Re: wbp-meta folder not in classpath? [message #724919 is a reply to message #724853] Tue, 13 September 2011 13:44 Go to previous message
andiqo  is currently offline andiqo Friend
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
Previous Topic:NPE in org.eclipse.wb.internal.swt.support.AbstractSupport$1 after adding a getter
Next Topic:ResourceManager class
Goto Forum:
  


Current Time: Tue Nov 25 23:39:51 GMT 2014

Powered by FUDForum. Page generated in 0.11266 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software