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

Summary: No API to show or hide the quick search in tree views
Product: platform Reporter: tdanard
Component: Quick SearchAssignee: Martin Entlicher <mentlicher>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.3.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

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.