org.eclipse.xtend.typesystem.xsd
Class XMLBeautifier

java.lang.Object
  extended by org.eclipse.xtend.typesystem.xsd.XMLBeautifier
All Implemented Interfaces:
PostProcessor

public class XMLBeautifier
extends java.lang.Object
implements PostProcessor


Nested Class Summary
static class XMLBeautifier.LineSeparatorType
           
 
Field Summary
protected  java.lang.String[] fileExtensions
           
protected  XMLMixedContentFormatter formatter
           
protected  java.lang.String lineSep
           
protected  java.util.Map<java.lang.String,java.lang.Object> loadOptions
           
protected  org.apache.commons.logging.Log log
           
protected  java.util.Map<java.lang.String,java.lang.Object> saveOptions
           
protected  org.eclipse.emf.ecore.resource.URIConverter uriConverter
           
 
Constructor Summary
XMLBeautifier()
           
 
Method Summary
 void addLoadOption(OptionsEntry entry)
           
 void addSaveOption(OptionsEntry entry)
           
 void afterClose(FileHandle impl)
          Called after the file has been written.
 void beforeWriteAndClose(FileHandle impl)
          Called before the file will be written.
protected  XMLMixedContentFormatter createFormatter()
           
protected  java.util.Map<java.lang.String,java.lang.Object> getDefaultLoadOptions()
           
protected  java.util.Map<java.lang.String,java.lang.Object> getDefaultSaveOptions()
           
 boolean isXmlFile(java.lang.String absolutePath)
           
 void setFileExtensions(java.lang.String[] fileExtensions)
           
 void setFormatComments(boolean formatComments)
           
 void setLineSeparator(java.lang.String typeName)
          Specicy the line seperator to use for serialization.
 void setMaxLineWidth(int maxLineWidth)
           
 void setUriConverter(org.eclipse.emf.ecore.resource.URIConverter converter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

formatter

protected XMLMixedContentFormatter formatter

fileExtensions

protected java.lang.String[] fileExtensions

log

protected org.apache.commons.logging.Log log

loadOptions

protected java.util.Map<java.lang.String,java.lang.Object> loadOptions

saveOptions

protected java.util.Map<java.lang.String,java.lang.Object> saveOptions

uriConverter

protected org.eclipse.emf.ecore.resource.URIConverter uriConverter

lineSep

protected java.lang.String lineSep
Constructor Detail

XMLBeautifier

public XMLBeautifier()
Method Detail

addLoadOption

public void addLoadOption(OptionsEntry entry)

addSaveOption

public void addSaveOption(OptionsEntry entry)

afterClose

public void afterClose(FileHandle impl)
Description copied from interface: PostProcessor
Called after the file has been written.

Specified by:
afterClose in interface PostProcessor
Parameters:
impl - A handle to the file that has been written

beforeWriteAndClose

public void beforeWriteAndClose(FileHandle impl)
Description copied from interface: PostProcessor
Called before the file will be written.

Specified by:
beforeWriteAndClose in interface PostProcessor
Parameters:
impl - A handle to the file that will be written

createFormatter

protected XMLMixedContentFormatter createFormatter()

getDefaultLoadOptions

protected java.util.Map<java.lang.String,java.lang.Object> getDefaultLoadOptions()

getDefaultSaveOptions

protected java.util.Map<java.lang.String,java.lang.Object> getDefaultSaveOptions()

isXmlFile

public boolean isXmlFile(java.lang.String absolutePath)

setFileExtensions

public void setFileExtensions(java.lang.String[] fileExtensions)

setFormatComments

public void setFormatComments(boolean formatComments)

setMaxLineWidth

public void setMaxLineWidth(int maxLineWidth)

setUriConverter

public void setUriConverter(org.eclipse.emf.ecore.resource.URIConverter converter)

setLineSeparator

public void setLineSeparator(java.lang.String typeName)
Specicy the line seperator to use for serialization.

Parameters:
typeName - UNIX, WINDOWS or SYSTEM
Since:
1.3.0