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 66472 - The component isn't possible to add via Add Button on the toolbar
Summary: The component isn't possible to add via Add Button on the toolbar
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Palette (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2005-10-11 13:24 UTC by Marek Grummich
Modified: 2008-12-23 00:33 UTC (History)
1 user (show)

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 Marek Grummich 2005-10-11 13:24:34 UTC
Build 200510100858
The summary is self-explaining.
Comment 1 Jan Stola 2005-10-12 10:16:35 UTC
It seems to be a problem of core/palette. The menu from Add button
attempts to set a selected item through PaletteUtils.selectedItem()
that calls PaletteController.setSelectedItem().
Unfortunately this invocation is not successful. The problem seems
to be in DefaultModel.findCategory() method. The method is not able
to find a correct category:

catNode.equals(node) is false, because the node is DataFolder$ClonedFilter
and catNode is CategoryNode. Note that catNode.original.equals(node) is true.
Comment 2 Jan Stola 2005-10-12 10:18:22 UTC
For the sake of completeness - the Add button can be displayed using context
menu on the form toolbar.
Comment 3 Stanislav Aubrecht 2005-10-12 11:21:48 UTC
fixed

Checking in src/org/netbeans/modules/form/palette/PaletteUtils.java;
/cvs/form/src/org/netbeans/modules/form/palette/PaletteUtils.java,v  <-- 
PaletteUtils.java
new revision: 1.19; previous revision: 1.18
done

===================================================================
RCS file: /cvs/core/palette/src/org/netbeans/modules/palette/RootNode.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- RootNode.java	23 Aug 2005 14:10:15 -0000	1.6
+++ RootNode.java	12 Oct 2005 10:18:16 -0000	1.7
@@ -64,6 +64,7 @@
         if( null != df ) {
             content.add( new DataFolder.Index( df, this ) );
         }
+        content.add( this );
         setDisplayName(Utils.getBundleString("CTL_Component_palette")); // NOI18N
     }
Comment 4 Marek Grummich 2005-12-20 15:00:48 UTC
Verified 200512192030