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 37099

Summary: [TTV] Popup item for collumns selection at last but one position
Product: platform Reporter: David Strupl <dstrupl>
Component: Outline&TreeTableAssignee: David Strupl <dstrupl>
Status: VERIFIED FIXED    
Severity: blocker CC: jrechtacek, jtulach, tboudreau
Priority: P3    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: proposed patch against trunk 2004/02/17

Description David Strupl 2003-11-08 17:02:21 UTC
When the collumn chooser is visible a very strange
item is added to every popup on every node in the
TreeTableView. This item lets you configure the
visible collumns BUT:
1. How comes that there is no way to enable/disable it
2. The item is not at last or first position but a
separator line is added above the originally last
item and this one is added above the separator!

I suspect the author of the code "knew" that the
last item should be "Properties" but the code in
the TreeTableView is really surprising ;-))

Anyway I will supply a patch for release35 branch
(hopefully during next week). I guess that Tim (or
whoever is responsible for the TTV) could add a
proper fix to the trunk (or at least tell me what
the expected behaviour should be).
Comment 1 David Strupl 2003-11-08 17:14:22 UTC
Sorry - not Tim but probably Jirka ...
Comment 2 Jiri Rechtacek 2003-11-18 12:42:16 UTC
The method TTV.getListMenu(final int col) constructs a JMenu (with the
column chooser) which is placed by TreeView.createExtendedPopup() in
popup menu. The responsible with item placement is
TreeView.createExtendedPopup, a matter of switch on/off is same as
issue 37100. Your patch is welcome, at least as hint how to procced a fix.
Comment 3 David Strupl 2003-11-20 13:22:45 UTC
I am sorry I did not supply the fix yet. I propose either 

1. to put the menu item at the last position
or
2. not to put it there at all (and provide some action that can be put
to the node's popup if the node author wishes to have it there)

Please tell me what you think about the solution. The 2. is (much)
more complicated but sounds like a cleaner solution to me. It is
complicated because the code inside the action would have to somehow
get the reference to the (tree)view which is not obvious how to get it
there.
Comment 4 David Strupl 2004-02-17 14:19:07 UTC
Created attachment 13472 [details]
proposed patch against trunk 2004/02/17
Comment 5 David Strupl 2004-02-17 14:20:43 UTC
If there are no objections I would apply the patch ASAP. Thanks for a
review.
Comment 6 _ tboudreau 2004-02-17 15:25:40 UTC
Fine by me.
Comment 7 David Strupl 2004-02-18 22:44:10 UTC
Ok - it is in the trunk now:

Checking in TreeView.java;
/cvs/openide/src/org/openide/explorer/view/TreeView.java,v  <-- 
TreeView.java
new revision: 1.154; previous revision: 1.153
done
Comment 8 Marian Mirilovic 2005-07-13 13:25:34 UTC
closed