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 170281 - API for declaring item in Navigator to collapsed/expanded as default
Summary: API for declaring item in Navigator to collapsed/expanded as default
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2009-08-12 15:14 UTC by rmatous
Modified: 2010-08-26 13:39 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rmatous 2009-08-12 15:14:20 UTC
I'm missing method isCollapsedAsDefault in StructureItem - ClassStructureItems should be expanded whereas
MethodStructureItems should be collapsed 

would be nice for 6.8
Comment 1 rmatous 2009-08-12 15:19:11 UTC
Could you please implement it for 6.8 
Comment 2 Vitezslav Stejskal 2009-08-12 20:46:22 UTC
Ideally, Radku, create a patch, have it reviewed by other language module maintainers from your team and if you guys are
happy with it Marek or I will commit it. Thanks
Comment 3 rmatous 2009-08-14 13:32:11 UTC
I won't implement it because its not my domain area and I won't find enough time for systematic approach

Our use case is: let user control what will be presented in structure view: could be also covered also by #170244 (flags
represented by buttons with icons) - then this issue could be closed as WONTFIX from my point of view.

BTW StructureScanner.Configuration has method getExpandDepth(setExpandDepth) which is not taken into account (just
values 0,-1)

API might look like:
add pair of get(is)/set methods in StructureScanner.Configuration, something like isExpandable(ElementKind kind),
setExapndable(ElementKind kind, boolean value) and in impl. compare it with StructureItem.getKind()
Comment 4 rmatous 2009-08-14 13:40:24 UTC
I meant #150084 (not  #170244), sorry
Comment 5 Quality Engineering 2009-08-14 18:03:50 UTC
Integrated into 'main-golden', will be available in build *200908141401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e16217b11424
User: Radek Matous <rmatous@netbeans.org>
Log: show  variables for methods/functions - but not eneabled until #170281 will be implemented
Comment 6 David Kaspar 2010-08-26 13:39:37 UTC
There is a new StructureItem.CollapsedDefault interface which should you StructureItem implement. The interface has the isCollapsedByDefault method. Return "true" to have the structure item collapsed by default in the Navigator.

Committed in jet-main repository:
changeset:   176179:0c58e95bbb81
user:        David Kaspar <dkaspar@netbeans.org>
date:        Thu Aug 26 14:57:36 2010 +0200
summary:     170281: API for declaring item in Navigator to collapsed/expanded as default; csl.api module spec. version increased to 2.7.0