Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » How use wbp-palette-commands.xml inside plug-in project
How use wbp-palette-commands.xml inside plug-in project [message #902289] Thu, 16 August 2012 19:31 Go to next message
Arthur Fücher is currently offline Arthur FücherFriend
Messages: 59
Registered: August 2012
Member
Hi,

I want to restrict the components and categories in the toolkit. I want to know if can I use the wbp-palette-commands.xml inside my plugin.

I see that if I put this XML in a folder called wbp-meta inside the project where my plug-in is running it works. But I want that the plug-in do this restriction...

Are there anyway to do that? Put this XML inside the plug-in? Or exists a extension point to do that?

[]'s
Re: How use wbp-palette-commands.xml inside plug-in project [message #902290 is a reply to message #902289] Thu, 16 August 2012 19:37 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
What do you mean under "restrict"?

Palette command can be read from jars, from project and from WindowBuilder internal location.
See org.eclipse.wb.internal.core.editor.palette.PaletteManager.commandsRead()

There is also org.eclipse.wb.core.editor.palette.PaletteEventListener which you can register and manipulate palette categories and entries before they are shown.


Konstantin Scheglov,
Google, Inc.
Re: How use wbp-palette-commands.xml inside plug-in project [message #902291 is a reply to message #902290] Thu, 16 August 2012 19:41 Go to previous messageGo to next message
Arthur Fücher is currently offline Arthur FücherFriend
Messages: 59
Registered: August 2012
Member
I want to hide some categories or components...

But how I make the palette read this command? I've see org.eclipse.wb.internal.core.editor.palette.PaletteManager.commandsRead(), and I just found it searching in the current workspace, not in my plugin...

I'll see a little more...
Re: How use wbp-palette-commands.xml inside plug-in project [message #902293 is a reply to message #902291] Thu, 16 August 2012 20:10 Go to previous messageGo to next message
Arthur Fücher is currently offline Arthur FücherFriend
Messages: 59
Registered: August 2012
Member
So,

I add the listener in my HorizontalBoxInfo, and it works! It's the best way to do that?

Thks for your support!
Re: How use wbp-palette-commands.xml inside plug-in project [message #902297 is a reply to message #902293] Thu, 16 August 2012 20:41 Go to previous message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
If listener is in model, it will be added only if form has your component, so model created.
If you want to have it active always, you need org.eclipse.wb.core.model.IRootProcessor register in "org.eclipse.wb.core.rootProcessors" extension point.


Konstantin Scheglov,
Google, Inc.
Previous Topic:Re: How use wbp-palette-commands.xml inside plug-in project
Next Topic:window builder dont vies like it should
Goto Forum:
  


Current Time: Fri Mar 29 10:30:05 GMT 2024

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

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

Back to the top