This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Add wizard for creating Palette items | ||
---|---|---|---|
Product: | apisupport | Reporter: | jfurmankiewicz <jfurmankiewicz> |
Component: | Templates | Assignee: | Martin Kozeny <mkozeny> |
Status: | NEW --- | ||
Severity: | blocker | CC: | tboudreau, wadechandler |
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: | example of palette item |
Description
jfurmankiewicz
2006-09-14 21:41:24 UTC
It's not so difficult to add palette item manually: 1) Create pallette item xml. I will attach example 2) Put it to layer.xml of your module: <folder name="FormDesignerPalette"> <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.form.resources.Bundle"/> <folder name="SwingContainers"> <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.form.resources.Bundle"/> <attr name="isExpanded" boolvalue="true" /> <file name="JPanel.palette_item" url="palette/JPanel.palette_item" /> ...... It curious that the palette_item xml doesn't contain link to eiter DTD or XML schema. Created attachment 33982 [details]
example of palette item
I fully agree that it is not complicated once you find how to do it, but when you're trying to do NB module development for the first time it's pretty daunting to find that little piece of info. I thought it would be a nice easy enhancement to further promote development on top of the NB RCP, the more little things like this are available, the easier it is for people to explore module development. IIRC Wade Chandler was talking about something similar, may be duplicate. Could be integrated into J2SE Library Descriptor wizard. Tim Boudreau also wrote a standalone program to make a NB module (NBM) from some beans. Thank you. An idea for some advanced options would be enhancing the wizard to implement a PaletteFilter (something I've been trying to look into) to selectively enable/disable palette items depending on a condition. Are sure that someone is able find it in J2SE wrapper wizard? I am for to create new wizard for this purpose. I would vote for that as well. Logically, I don't quite see the connection between J2SE library wrapper and palette item (even if there is one), most newbies (i.e. me) would know guess there is one. >Logically, I don't quite see the connection
>between J2SE library wrapper and palette item (even if there is one), most
>newbies (i.e. me) would know guess there is one.
Isn't that one of the first things a newby sees when they add palette items ...
Add from a library? The point of putting something like this into the library
wrapper makes it easier to add things from your module to the palette and
associate a library with it. So, not only do you have an install (module), but
you also have palette items added from your module along with a library descriptor.
What I was working on allows one to create a module directly from a library they
have defined in NB (Tools->Library Manager). The idea that it would make
sharing libraries easier once it has been defined and completed for 3rd party
distribution. I also planned on adding the capability to allow them to select
things which would be added to the palette when the module would be installed.
It would allow them to select or create a new category and select the beans they
want on the palette. I was going to initially support the Form Editor, but in
the future it could support other palettes as well.
It would be good to add the ability for a standard project as well. There is
another issue I would have to look up I know is in IZ dealing with project level
libraries. I think that would be best for standard projects mainly because of
the change, compile, build scenario. You want to be able to use a library when
you are developing it and have it's items added to a palette. That way when you
are creating an application you can separate ideas and have libraries you can
share come out of it.
So, I think there are 3 general ideas or areas each with their own way of
defining how a Library hooks into the project and where items can come from. 1)
A module 2) A Library as it's currently defined 3) A project level library or
palette item.
I see...I was actually planning on adding Palette items that programmatically do code generation (e.g. like the 'JSF Form' palette item that pops up a wizard for a bean and creates a JSF form from it)...so I was not really relying on a particular library at all. Either way, it would be good to simplify the creation of "library" palette items and "code generator" palette items. More ease and power for RCP development. |