Project Level Form Editor Palette Items

initiator Wade Chandler

It is currently hard to use Palette items from a library or even sub-projects within the Form Editor/Matisse when the library or sub-project is not yet a complete shippable version. It would be very handy to be able to have Palette items with descriptors stored in the nbproject directory and kept for everyone to use (meaning not stored in private). This would make it much easier to create forms which use sub-projects and keep the Palette a little cleaner. It is expected this feature can translate to the Netbeans Mobility and Visual Web Pack projects.

Instead of always having a bunch of domain unrelated JavaBeans in the palette only the desired Palette items would be available. Obviously, the current mechanism would stay in place for "system wide" palette items added from "system wide" libraries. However, items added from Project Level Libraries or Project Sub-projects would only be visible when the project or a project depending on it is open, and "only" when a file within one of these projects is opened unless inside the Palette Manager. In the manager all opened projects items should be visible. They need to be organized into categories and their respective projects.

Project level items are added by

  1. Selecting a JavaBean, right clicking, then the context menu "Tools->Add to Palette". This will change to always create a project level palette item.
  2. Going into the Palette Manager, choosing to add from a library, and that library being one which is a project level library.
  3. Going into the Palette Manager, choosing to add from a Jar, and that jar being one which is under the current projects main directory or sub-directory or a jar file which is directly referenced by the project as a dependency.

1 Above is pretty straight forward.

2 Is straight forward once you see how the project level libraries work.

3 Has an issue where a check will be needed to make sure no current project level items exist within this jar already by the same class name. More than one project may be depending on a JAR or sub-project. So, these need not be added more than once within any given context, and this is pretty straight forward if it is the same physical JAR file. But, what happens when there is a jar file which is depended on by a sub-project with existing palette items and this project becomes depended on by another project with its own copy of the same or different version of the JAR? It is assumed the Palette items will be kept in each respective project, and will be dynamically created when the item or form is used (the correct JAR will be used for the correct project), thus only one instance of the JAR will be used within each form. It is assumed each project has it's own class loader. A different issue arises however when these classes need to be shared with other classes and across classloaders, so this needs to be worked out. A new project level issue sort of like the resolve references alert icon will be used to let the user know what has happened without a silent possible issue. The user really needs to reorganize and only have one version of the JAR. The mentioned work around is meant to keep the form from not being able to load.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo