All Implemented Interfaces:
ICodeDocument, ITextDocumentPart

public class COutputSink extends CppLikeDocumentPart
This output sink is the recipient for the generation of a C-like Abstract Syntax Tree (AST). The sink also contains configuration elements that will guide and determine how certain AST elements are to be generated. A sink receives the output for a class, a field, or a method element.

Generating an AST yields a special type of elements, called items, that a UI client may want to track to achieve higher level functions such as syntax coloration.

  • Constructor Details

    • COutputSink

      public COutputSink(long baseAnchorId)
    • COutputSink

      public COutputSink(long baseAnchorId, CDocument doc, INativeDecompilerUnit<?> decomp)
  • Method Details

    • getDocument

      public CDocument getDocument()
      May be null
    • getDecompilerUnit

      public INativeDecompilerUnit<?> getDecompilerUnit()
      May be null
    • setSpaceOutCompounds

      public void setSpaceOutCompounds(Boolean override)
    • getSpaceOutCompounds

      public boolean getSpaceOutCompounds()
    • setMergeAdjacentDefinitions

      public void setMergeAdjacentDefinitions(Boolean override)
    • getMergeAdjacentDefinitions

      public boolean getMergeAdjacentDefinitions()
    • setHideCasts

      public void setHideCasts(Boolean override)
    • getHideCasts

      public boolean getHideCasts()
    • setHideTLNS

      public void setHideTLNS(Boolean override)
    • getHideTLNS

      public boolean getHideTLNS()
    • omitTypeForNextDefinitionPrinting

      public boolean omitTypeForNextDefinitionPrinting()
    • setOmitTypeForNextDefinitionPrinting

      public void setOmitTypeForNextDefinitionPrinting(boolean omitTypeForNextDefinitionPrinting)
      One shot deactivation of types printing in definition (i.e. when set to true, it only works for the next printing)
    • pushContainingClass

      public void pushContainingClass(ICClass c)
    • popContainingClass

      public ICClass popContainingClass()
    • getCurrentContainingClass

      public ICClass getCurrentContainingClass()
    • getTopLevelClass

      public ICClass getTopLevelClass()
    • pushContainingMethod

      public void pushContainingMethod(ICMethod m)
    • popContainingMethod

      public ICMethod popContainingMethod()
    • getCurrentContainingMethod

      public ICMethod getCurrentContainingMethod()
    • setDynamicContentManager

      public void setDynamicContentManager(IDynamicContentManager dcm)
    • getDynamicContentManager

      public IDynamicContentManager getDynamicContentManager()
    • setSourceCustomizer

      public void setSourceCustomizer(ISourceCustomizer sourceCustomizer)
    • getSourceCustomizer

      public ISourceCustomizer getSourceCustomizer()
    • setCurrentMethodIndex

      public int setCurrentMethodIndex(int index)
      Set the method index of the method being generated
      Parameters:
      index - the current method index
      Returns:
      the previous index
    • getCurrentMethodIndex

      public int getCurrentMethodIndex()
      Get the method index of the method being generated
      Returns:
      <0 if cannot be determined or invalid
    • appendKeyword

      public void appendKeyword(CKeyword keyword)
    • astPush

      public void astPush(ICElement elt)
    • astPop

      public ICElement astPop()
    • astPeekSafe

      public ICElement astPeekSafe(int n)
    • astDepth

      public int astDepth()
    • renderPreComment

      public void renderPreComment(ICodeCoordinates coord)
      note: EOL always appended
    • renderInlineComment

      public void renderInlineComment(ICodeCoordinates coord, boolean appendEOL)
    • renderComment

      public void renderComment(ICodeCoordinates coord, int what, boolean appendEOL)
    • validate

      public void validate()
      Overrides:
      validate in class CppLikeDocumentPart