org.eclipse.wst.jsdt.ui.text.folding

## Class DefaultJavaFoldingStructureProvider.FoldingStructureComputationContext

- java.lang.Object
- - org.eclipse.wst.jsdt.ui.text.folding.DefaultJavaFoldingStructureProvider.FoldingStructureComputationContext

Enclosing class:
  DefaultJavaFoldingStructureProvider

    protected final class DefaultJavaFoldingStructureProvider.FoldingStructureComputationContext
    extends java.lang.Object

A context that contains the information needed to compute the folding structure of an `IJavaScriptUnit` or an `IClassFile`. Computed folding regions are collected via addProjectionRange.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addProjectionRange(DefaultJavaFoldingStructureProvider.JavaProjectionAnnotation annotation, Position position)` Adds a projection (folding) region to this context.
`boolean` `allowCollapsing()` Returns `true` if newly created folding regions may be collapsed, `false` if not.
`boolean` `collapseExportContainer()` Returns `true` if export containers should be collapsed.
`boolean` `collapseHeaderComments()` Returns `true` if header comments should be collapsed.
`boolean` `collapseImportContainer()` Returns `true` if import containers should be collapsed.
`boolean` `collapseInnerTypes()` Returns `true` if inner types should be collapsed.
`boolean` `collapseJavadoc()` Returns `true` if javadoc comments should be collapsed.
`boolean` `collapseMembers()` Returns `true` if methods should be collapsed.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### allowCollapsing

    public boolean allowCollapsing()

Returns `true` if newly created folding regions may be collapsed, `false` if not. This is usually `false` when updating the folding structure while typing; it may be `true` when computing or restoring the initial folding structure.

Returns:
  `true` if newly created folding regions may be collapsed, `false` if not

#### addProjectionRange

    public void addProjectionRange(DefaultJavaFoldingStructureProvider.JavaProjectionAnnotation annotation,
                                   Position position)

Adds a projection (folding) region to this context. The created annotation / position pair will be added to the `ProjectionAnnotationModel` of the `ProjectionViewer` of the editor.

Parameters:
  `annotation` - the annotation to add
  `position` - the corresponding position

#### collapseHeaderComments

    public boolean collapseHeaderComments()

Returns `true` if header comments should be collapsed.

Returns:
  `true` if header comments should be collapsed

#### collapseImportContainer

    public boolean collapseImportContainer()

Returns `true` if import containers should be collapsed.

Returns:
  `true` if import containers should be collapsed

#### collapseExportContainer

    public boolean collapseExportContainer()

Returns `true` if export containers should be collapsed.

Returns:
  `true` if export containers should be collapsed

#### collapseInnerTypes

    public boolean collapseInnerTypes()

Returns `true` if inner types should be collapsed.

Returns:
  `true` if inner types should be collapsed

#### collapseJavadoc

    public boolean collapseJavadoc()

Returns `true` if javadoc comments should be collapsed.

Returns:
  `true` if javadoc comments should be collapsed

#### collapseMembers

    public boolean collapseMembers()

Returns `true` if methods should be collapsed.

Returns:
  `true` if methods should be collapsed