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.

Bug 51848 - Allow masking component pallete from other modules
Summary: Allow masking component pallete from other modules
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks: 73701 74101
  Show dependency tree
 
Reported: 2004-11-25 16:02 UTC by Petr Suchomel
Modified: 2006-09-05 17:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Suchomel 2004-11-25 16:02:50 UTC
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.
Comment 1 Tomas Pavek 2006-03-02 11:22:18 UTC
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.
Comment 2 Petr Suchomel 2006-03-17 14:52:26 UTC
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
Comment 3 Tomas Pavek 2006-03-22 18:27:06 UTC
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).
Comment 4 Petr Suchomel 2006-03-22 18:54:31 UTC
You mean project bootclasspath I guess. Yes, this would be enough for me.
Comment 5 Tomas Pavek 2006-06-13 11:15:47 UTC
If you really need this for 5.5 please change this issue to defect and give us 
some deadline ;) Thanks
Comment 6 Martin Ryzl 2006-06-13 11:24:52 UTC
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.
Comment 7 Lukas Hasik 2006-06-13 12:51:09 UTC
if it should be fixed into 5.5 it has to have the 5.5_candidate status whiteboard...
Comment 8 Tomas Pavek 2006-06-22 18:25:40 UTC
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
Comment 9 Petr Suchomel 2006-07-13 13:52:31 UTC
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.
Comment 10 Tomas Pavek 2006-09-05 17:14:18 UTC
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