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.
For possible support of JSR 209, we need to be able mask current swing components and they properties by defined mask to be able simulating limites set of available swings & awt components. Need to have some king of private API allowing this.
a) Form module might try to obtain an additional filter for palette content from project lookup. Then special project types could filter out some items that can't be used on their platform. But there are two problems with this approach: 1) The palette has no project context. We'd have to change the palette creation to reflect the project of the actual form. Should be possible, though it means some work. 2) The palette content is managed by form module - the external filter would not understand it. Some ugly trick would be needed to expose e.g. the class in the palette item's lookup. Or the external filter would work just based on categories (e.g. filter out complete Swing category). Would this be enough? b) An alternative solution would be that form module itself filters out the items that can't be found on the actual project's platform classpath. I'm not sure if we can get the platform classpath reliably. This could also cause performance problems. So perhaps we could only do this check when adding a component to form, not to filter the palette content.
Or the external filter would work just based on categories (e.g. filter out complete Swing category). Would this be enough? Unfortunatelly not enough as far as JSR 209 is arriving. JSR 209 remove some Swing components from standard swing set
And would it be enough if form module filtered the palette based on the project's platform classpath? Then you would need to plug in a special filter. The assumption is that the project boot classpath really reflects the platform (so if we did not find a particular class in it we would filter the corresponding palette item out).
You mean project bootclasspath I guess. Yes, this would be enough for me.
If you really need this for 5.5 please change this issue to defect and give us some deadline ;) Thanks
based on feedback we've got during Java One I'm changing this to defect and P2. Developers use Matisse to develop following types of applications: - AWT - Swing - AGUI (JSR-209, subset of Swing) and they often get into a usability problem - applications they've developed can't be compiled and run. They same problem may appear even when developing for older version of JDK.
if it should be fixed into 5.5 it has to have the 5.5_candidate status whiteboard...
Fixed in trunk. Implemented the filtering based on project boot classpath. Please verify if it works for you. Then I'll prepare patch for 5.5. /cvs/form/src/org/netbeans/modules/form/FormEditor.java new revision: 1.90; previous revision: 1.89 /cvs/form/src/org/netbeans/modules/form/FormDesigner.java new revision: 1.189; previous revision: 1.188 /cvs/form/src/org/netbeans/modules/form/ComponentInspector.java new revision: 1.63; previous revision: 1.62 /cvs/form/src/org/netbeans/modules/form/actions/InstallBeanAction.java new revision: 1.23; previous revision: 1.22 /cvs/form/src/org/netbeans/modules/form/palette/PaletteUtils.java new revision: 1.24; previous revision: 1.23
This works well. The only remaining issue I see (but only low priority) is if you change the platform and thus bootclasspath, the palette is not refreshed immediately but after you highlight the form or palette itself.
Integrated into release55 branch. /cvs/form/src/org/netbeans/modules/form/ComponentInspector.java new revision: 1.56.10.1.2.2; previous revision: 1.56.10.1.2.1 /cvs/form/src/org/netbeans/modules/form/FormDesigner.java new revision: 1.128.2.3.2.4; previous revision: 1.128.2.3.2.3 /cvs/form/src/org/netbeans/modules/form/FormEditor.java new revision: 1.76.2.2.2.4; previous revision: 1.76.2.2.2.3 /cvs/form/src/org/netbeans/modules/form/actions/InstallBeanAction.java new revision: 1.22.26.2; previous revision: 1.22.26.1 /cvs/form/src/org/netbeans/modules/form/palette/PaletteUtils.java new revision: 1.14.6.2.2.2; previous revision: 1.14.6.2.2.1