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 239489 - No API to show or hide the quick search in tree views
Summary: No API to show or hide the quick search in tree views
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Quick Search (show other bugs)
Version: 7.3.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-13 23:52 UTC by tdanard
Modified: 2013-12-16 08:34 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 tdanard 2013-12-13 23:52:37 UTC
Most users don't know that there are quick search capabilities in tree views.

To make it more obvious that there are quick search capabilities, I added a contextual menu item with the title "Show Quick Search".

I didn't find a clean way to hide or show the quick search. I had to use reflection to get to the QuickSearch object:

    
    private static QuickSearch getQuickSearch(TreeView view) {
        try {
            Field field = TreeView.class.getDeclaredField("qs");
            field.setAccessible(true);
            return (QuickSearch) field.get(view);
        } catch (NoSuchFieldException ex) {
            return null;
        } catch (IllegalArgumentException ex) {
            return null;
        } catch (IllegalAccessException ex) {
            return null;
        }
    }

Can you please provide a "public api" way to show and hide the quick search ?
Comment 1 Jaroslav Havlin 2013-12-16 08:34:50 UTC
Reassigning to Martin. Please evaluate this issue, thank you.