Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 112586

Summary: [api] add support for toggling folding for IJavaElement's
Product: [Eclipse Project] JDT Reporter: Mik Kersten <mik.kersten>
Component: TextAssignee: Tom Hofmann <eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert
Version: 3.2   
Target Milestone: 3.2 M3   
Hardware: Other   
OS: other   
Whiteboard:

Description Mik Kersten CLA 2005-10-13 22:26:35 EDT
For tools that want to use the IJavaFoldingStructureProviderExtension, but want finer-grained
control of what to collapse, it would be useful to have the following methods:
- collapseElements(List<IJavaElement>
elements)
- expandElements(List<IJavaElement> elements)

My use case is Mylar, which
currently needs to set it's own folding structure provider, but with this could simply
use the default one and drive the folding based on selections.  Note that for selections
this would only be getting called with a single element, but when a file is opened it
would need to be called with a list, hance the suggest to take lists (or arrays if JDT
is not moving to Java 5).
Comment 1 Tom Hofmann CLA 2005-10-14 06:04:19 EDT
fixed > 20051014

added the array version of the proposed API
Comment 2 Mik Kersten CLA 2005-10-14 12:12:55 EDT
Excellent, thanks!
Comment 3 Tobias Widmer CLA 2005-11-01 11:33:45 EST
Verified using I20051031-2000