org.eclipse.cdt.internal.ui.text.folding
Class DefaultCFoldingStructureProvider

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.text.folding.DefaultCFoldingStructureProvider
All Implemented Interfaces:
ICFoldingStructureProvider

public class DefaultCFoldingStructureProvider
extends java.lang.Object
implements ICFoldingStructureProvider

Default implementation of a ICFoldingStructureProvider.

Derived from JDT counterpart.


Constructor Summary
DefaultCFoldingStructureProvider()
          Creates a new folding provider.
 
Method Summary
 void initialize()
          (Re-)initializes the structure provided by the receiver.
 void install(org.eclipse.ui.texteditor.ITextEditor editor, org.eclipse.jface.text.source.projection.ProjectionViewer viewer)
          Installs this structure provider on the given editor and viewer.
 void uninstall()
          Uninstalls this structure provider.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCFoldingStructureProvider

public DefaultCFoldingStructureProvider()
Creates a new folding provider. It must be installed on an editor/viewer pair before it can be used, and uninstalled when not used any longer.

The projection state may be reset by calling initialize().

Method Detail

install

public void install(org.eclipse.ui.texteditor.ITextEditor editor,
                    org.eclipse.jface.text.source.projection.ProjectionViewer viewer)
Description copied from interface: ICFoldingStructureProvider
Installs this structure provider on the given editor and viewer. Implementations should listen to the projection events generated by viewer and enable / disable generation of projection structure accordingly.

Specified by:
install in interface ICFoldingStructureProvider
Parameters:
editor - the editor that this provider works on
viewer - the projection viewer that displays the annotations created by this structure provider

uninstall

public void uninstall()
Description copied from interface: ICFoldingStructureProvider
Uninstalls this structure provider. Any references to editors or viewers should be cleared.

Specified by:
uninstall in interface ICFoldingStructureProvider

initialize

public final void initialize()
Description copied from interface: ICFoldingStructureProvider
(Re-)initializes the structure provided by the receiver.

Specified by:
initialize in interface ICFoldingStructureProvider