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.
Component Inspector of GUI Builder was removed/rewritten to use Navigator. Unfortunately, several actions don't work correctly now because of duplicated nodes in NavigatorTC's lookup. Consider, for example, the following test-case: 1. Create new JFrame form. 2. Insert JButton into the form. 3. Right-click on jButton1 in Navigator. Context menu is displayed. => some actions (Edit Text, Change Variable Name ...) are disabled, but should be enabled => some actions (Align, Same Size) are enabled, but should be disabled Try to right-click on jButton1 in the designer area to see actions enabled/disabled correctly. The root of the problem seems to be in lookup of NavigatorTC. It overrides getLookup() incorrectly. When you try to lookup Node.class in this lookup then you obtain the activated nodes two times (once from the default lookup and once from the navigator's panel lookup). This corrupts the logic of GUI Builder's actions that are enabled for single (or multiple) node selection only. Suggested fix: Do not override getLookup() in NavigatorTC. Use TopComponent.associateLookup() instead, i.e., put something like the following code into the constructor of NavigatorTC: ProxyLookup lookup = new ProxyLookup( getController().getPanelLookup(), Lookups.singleton(getActionMap())); associateLookup(lookup);
a bug report just the way i like it!
Changeset: 41a61a4cf736 Author: Tomas Stupka <tstupka@netbeans.org> Date: 2011-05-19 15:32 Message: Issue #198705 - Duplicated nodes in NavigatorTC's lookup
Integrated into 'main-golden', will be available in build *201105200400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/41a61a4cf736 User: Tomas Stupka <tstupka@netbeans.org> Log: Issue #198705 - Duplicated nodes in NavigatorTC's lookup