com.bbn.swede.editor.formatting
Class OWLContentFormatter

java.lang.Object
  extended byMultiPassContentFormatter
      extended bycom.bbn.swede.editor.formatting.OWLContentFormatter

public class OWLContentFormatter
extends MultiPassContentFormatter

Content formatter for OWL documents. On the first pass, the OWLFormattingStrategy adjusts the whitespace between tags to ensure proper linebreaks and indentation. On the second pass, each individual BEGIN_TAG partition within the formatting region is further modified by AttributeFormattingStrategy to adjust whitespace between attributes to ensure proper line wrapping and indentation.

All modifications made by the content formatter respect the user's formatting preferences, as specified on the OWL editor prefererence page.

Author:
jlerner
See Also:
Serialized Form

Constructor Summary
OWLContentFormatter(OWLSourceViewerConfiguration config, ISourceViewer viewer, IOWLAbstractSyntaxTree oast)
          Creates a content formatter for an OWL document.
 
Method Summary
protected  void formatMaster(IFormattingContext context, IDocument document, int offset, int length)
           
protected  void formatSlave(IFormattingContext context, IDocument document, int offset, int length, String type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OWLContentFormatter

public OWLContentFormatter(OWLSourceViewerConfiguration config,
                           ISourceViewer viewer,
                           IOWLAbstractSyntaxTree oast)
Creates a content formatter for an OWL document.

Parameters:
config - The source viewer configuration of the document's editor
viewer - The source viewer of the document's editor
oast - The document's OWL abstract syntax tree
Method Detail

formatMaster

protected void formatMaster(IFormattingContext context,
                            IDocument document,
                            int offset,
                            int length)

formatSlave

protected void formatSlave(IFormattingContext context,
                           IDocument document,
                           int offset,
                           int length,
                           String type)


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.