com.bbn.swede.editor.formatting
Class OWLFormattingStrategy

java.lang.Object
  extended bycom.bbn.swede.editor.formatting.OWLFormattingStrategy

public class OWLFormattingStrategy
extends Object

A master strategy for formatting OWL documents. This strategy is responsible for ensuring that begin and end tags are wrapped to new lines where appropriate and that literals are wrapped across multiple lines as specified by editor preferences. This strategy also takes care of proper indentation for wrapped tags and literals.

Tags must be formatted in their entirety, so a tag partially selected at the beginning or end of the test range to be formatted may be modified. In order to ensure proper indentation of nested tags and end tags, whitespace before the first selected tag and after the last selected tag may also be modified.

Author:
jlerner

Constructor Summary
OWLFormattingStrategy()
           
 
Method Summary
 void format()
           
 String format(String content, boolean isLineStart, String indentation, int[] positions)
           
 void formatterStarts(String initialIndentation)
           
 void formatterStops()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OWLFormattingStrategy

public OWLFormattingStrategy()
Method Detail

formatterStarts

public void formatterStarts(String initialIndentation)

format

public String format(String content,
                     boolean isLineStart,
                     String indentation,
                     int[] positions)

formatterStops

public void formatterStops()

format

public void format()


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