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(
a bug report just the way i like it!
Author: Tomas Stupka <firstname.lastname@example.org>
Date: 2011-05-19 15:32
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)
User: Tomas Stupka <email@example.com>
Log: Issue #198705 - Duplicated nodes in NavigatorTC's lookup