Bug 112586 [api] add support for toggling folding for IJavaElement's
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).
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/folding/IJavaFoldingStructureProvider.java
*			</ul>
 * </li>
 * </ul>
 * </p>
 * 
 * @since 3.0
 */
public interface IJavaFoldingStructureProvider {
	/**
	 * Installs this structure provider on the given editor and viewer.
	 * Implementations should listen to the projection events generated by
	 * <code>viewer</code> and enable / disable generation of projection
	 * structure accordingly.
	 *
	 * @param editor the editor that this provider works on
	 * @param viewer the projection viewer that displays the annotations created
	 *        by this structure provider
	 */
	public abstract void install(ITextEditor editor, ProjectionViewer viewer);
	/**
	 * Uninstalls this structure provider. Any references to editors or viewers
	 * should be cleared.
	 */
	public abstract void uninstall();
	/**
	 * (Re-)initializes the structure provided by the receiver.
	 */
	public abstract void initialize();
}