org.eclipse.xtext.ui.editor.formatting
Class ContentFormatterFactory.ContentFormatter

java.lang.Object
  extended by org.eclipse.xtext.ui.editor.formatting.ContentFormatterFactory.ContentFormatter
All Implemented Interfaces:
org.eclipse.jface.text.formatter.IContentFormatter
Enclosing class:
ContentFormatterFactory

public class ContentFormatterFactory.ContentFormatter
extends java.lang.Object
implements org.eclipse.jface.text.formatter.IContentFormatter


Constructor Summary
ContentFormatterFactory.ContentFormatter()
           
 
Method Summary
 void format(org.eclipse.jface.text.IDocument document, org.eclipse.jface.text.IRegion region)
          Formats the given region of the specified document.The formatter may safely assume that it is the only subject that modifies the document at this point in time.
 org.eclipse.jface.text.formatter.IFormattingStrategy getFormattingStrategy(java.lang.String contentType)
          Returns the formatting strategy registered for the given content type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentFormatterFactory.ContentFormatter

public ContentFormatterFactory.ContentFormatter()
Method Detail

format

public void format(org.eclipse.jface.text.IDocument document,
                   org.eclipse.jface.text.IRegion region)
Description copied from interface: org.eclipse.jface.text.formatter.IContentFormatter
Formats the given region of the specified document.The formatter may safely assume that it is the only subject that modifies the document at this point in time.

Specified by:
format in interface org.eclipse.jface.text.formatter.IContentFormatter
Parameters:
document - the document to be formatted
region - the region within the document to be formatted

getFormattingStrategy

public org.eclipse.jface.text.formatter.IFormattingStrategy getFormattingStrategy(java.lang.String contentType)
Description copied from interface: org.eclipse.jface.text.formatter.IContentFormatter
Returns the formatting strategy registered for the given content type.

Specified by:
getFormattingStrategy in interface org.eclipse.jface.text.formatter.IContentFormatter
Parameters:
contentType - the content type for which to look up the formatting strategy
Returns:
the formatting strategy for the given content type, or null if there is no such strategy