Class DefaultJavaFoldingStructureProvider.FoldingStructureComputationContext

java.lang.Object
org.eclipse.jdt.ui.text.folding.DefaultJavaFoldingStructureProvider.FoldingStructureComputationContext
Enclosing class:
DefaultJavaFoldingStructureProvider

protected final class DefaultJavaFoldingStructureProvider.FoldingStructureComputationContext extends Object
A context that contains the information needed to compute the folding structure of an ICompilationUnit or an IClassFile. Computed folding regions are collected via addProjectionRange.
  • Method Details

    • 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, org.eclipse.jface.text.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
    • 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