Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.html.tidy
Class TidyConfiguration  view TidyConfiguration download TidyConfiguration.java

java.lang.Object
  extended bycom.port80.html.tidy.Configuration
      extended bycom.port80.html.tidy.TidyConfiguration
All Implemented Interfaces:
java.io.Serializable

public class TidyConfiguration
extends Configuration


Field Summary
private  com.port80.eclipse.editors.IEditorConfiguration fConfig
           
private  org.eclipse.ui.editors.text.TextEditor fEditor
           
private  java.io.PrintWriter fErrWriter
           
private  java.lang.String fTab
           
private  org.eclipse.jface.text.source.ISourceViewer fViewer
           
 
Fields inherited from class com.port80.html.tidy.Configuration
ASCII, BreakBeforeBR, BurstSlides, CharEncoding, CompactFormat, DOCTYPE_AUTO, DOCTYPE_LOOSE, DOCTYPE_OMIT, DOCTYPE_STRICT, DOCTYPE_USER, docTypeMode, docTypeStr, doReformat, DropEmptyParas, DropFontTags, Emacs, EncloseBlockText, EncloseBodyText, errfile, FixAlt, FixBackslash, FixComments, HideEndTags, indent, IndentAttributes, IndentContent, ISO2022, KeepFileTimes, LATIN1, LiteralAttribs, LogicalEmphasis, MACROMAN, MakeClean, NumEntities, OnlyErrors, Quiet, QuoteAmpersand, QuoteMarks, QuoteNbsp, RAW, RawOut, ShowInfo, ShowWarnings, slidestyle, SmartIndent, tabsize, TidyMark, UpperCaseAttrs, UpperCaseTags, UTF8, Word2000, WrapAsp, WrapAttVals, WrapJste, wraplen, WrapPhp, WrapScriptlets, WrapSection, writeback, xHTML, XmlOut, XmlPi, XmlPIs, XmlSpace, XmlTags
 
Constructor Summary
TidyConfiguration(com.port80.eclipse.editors.IEditorConfiguration cf, org.eclipse.ui.editors.text.TextEditor editor, org.eclipse.jface.text.source.ISourceViewer viewer)
          Constructor for TidyConfiguration.
 
Method Summary
 void closeErrWriter()
           
 boolean getBreakBeforeBR()
           
 boolean getBurstSlides()
           
 int getCharEncoding()
           
 java.lang.String getDocType()
           
 boolean getDoReformat()
           
 boolean getDropEmptyParas()
           
 boolean getDropFontTags()
           
 org.eclipse.ui.editors.text.TextEditor getEditor()
           
 boolean getEmacs()
           
 boolean getEncloseBlockText()
           
 boolean getEncloseText()
           
 java.lang.String getErrfile()
           
 java.io.PrintWriter getErrWriter()
           
 boolean getFixAlt()
           
 boolean getFixBackslash()
           
 boolean getFixComments()
           
 boolean getHideEndTags()
           
 boolean getIndentAttributes()
           
 boolean getIndentContent()
           
 boolean getKeepFileTimes()
           
 boolean getLiteralAttribs()
           
 boolean getLogicalEmphasis()
           
 boolean getMakeClean()
           
 boolean getNumEntities()
           
 boolean getOnlyErrors()
           
 boolean getQuiet()
           
 boolean getQuoteAmpersand()
           
 boolean getQuoteMarks()
           
 boolean getQuoteNbsp()
           
 boolean getRawOut()
           
 boolean getShowWarnings()
           
 java.lang.String getSlidestyle()
           
 boolean getSmartIndent()
           
 int getSpaces()
           
 int getTabsize()
           
 java.lang.String getTabString()
           
 boolean getTidyMark()
           
 boolean getUpperCaseAttrs()
           
 boolean getUpperCaseTags()
           
 org.eclipse.jface.text.source.ISourceViewer getViewer()
           
 boolean getWord2000()
           
 boolean getWrapAsp()
           
 boolean getWrapAttVals()
           
 boolean getWrapJste()
           
 int getWraplen()
           
 boolean getWrapPhp()
           
 boolean getWrapScriptlets()
           
 boolean getWrapSection()
           
 boolean getWriteback()
           
 boolean getWriteBack()
           
 boolean getXHTML()
           
 boolean getXmlOut()
           
 boolean getXmlPi()
           
 boolean getXmlPIs()
           
 boolean getXmlSpace()
           
 boolean getXmlTags()
           
 void initPreference()
           
 boolean isCompactFormat()
           
 void setBreakBeforeBR(boolean BreakBeforeBR)
          BreakBeforeBR - o/p newline before <br> or not?
 void setBurstSlides(boolean BurstSlides)
          BurstSlides - create slides on each h2 element
 void setCharEncoding(int charencoding)
          CharEncoding
 void setConfigurationFromFile(java.lang.String filename)
          Sets the this from a this file.
 void setConfigurationFromProps(java.util.Properties props)
          Sets the this from a properties object.
 void setDocType(java.lang.String doctype)
          DocType - user specified doctype omit | auto | strict | loose | fpi where the fpi is a string similar to "-//ACME//DTD HTML 3.14159//EN" Note: for fpi include the double-quotes in the string.
 void setDoReformat(boolean b)
           
 void setDropEmptyParas(boolean DropEmptyParas)
          DropEmptyParas - discard empty p elements
 void setDropFontTags(boolean DropFontTags)
          DropFontTags - discard presentation tags
 void setEmacs(boolean Emacs)
          Emacs - if true format error output for GNU Emacs
 void setEncloseBlockText(boolean EncloseBlockText)
          EncloseBlockText - if true text in blocks is wrapped in <p>'s
 void setEncloseText(boolean EncloseText)
          EncloseText - if true text at body is wrapped in <p>'s
 void setErrfile(java.lang.String errfile)
          Errfile - file name to write errors to
 void setFixAlt(boolean b)
          AltText - default text for alt attribute
 void setFixBackslash(boolean FixBackslash)
          FixBackslash - fix URLs by replacing \ with /
 void setFixComments(boolean FixComments)
          FixComments - fix comments with adjacent hyphens
 void setHideEndTags(boolean HideEndTags)
          HideEndTags - suppress optional end tags
 void setIndentAttributes(boolean IndentAttributes)
          IndentAttributes - newline+indent before each attribute
 void setIndentContent(boolean IndentContent)
          IndentContent - indent content of appropriate tags
 void setKeepFileTimes(boolean KeepFileTimes)
          KeepFileTimes - if true last modified time is preserved
this is NOT supported at this time.
 void setLiteralAttribs(boolean LiteralAttribs)
          LiteralAttribs - if true attributes may use newlines
 void setLogicalEmphasis(boolean LogicalEmphasis)
          LogicalEmphasis - replace i by em and b by strong
 void setMakeClean(boolean MakeClean)
          MakeClean - remove presentational clutter
 void setNumEntities(boolean NumEntities)
          NumEntities - use numeric entities
 void setOnlyErrors(boolean OnlyErrors)
          OnlyErrors - if true normal output is suppressed
 void setQuiet(boolean Quiet)
          Quiet - no 'Parsing X', guessed DTD or summary
 void setQuoteAmpersand(boolean QuoteAmpersand)
          QuoteAmpersand - output naked ampersand as &
 void setQuoteMarks(boolean QuoteMarks)
          QuoteMarks - output " marks as &quot;
 void setQuoteNbsp(boolean QuoteNbsp)
          QuoteNbsp - output non-breaking space as entity
 void setRawOut(boolean RawOut)
          RawOut - avoid mapping values > 127 to entities
 void setShowWarnings(boolean ShowWarnings)
          ShowWarnings - however errors are always shown
 void setSlidestyle(java.lang.String slidestyle)
          Slidestyle - style sheet for slides
 void setSmartIndent(boolean SmartIndent)
          SmartIndent - does text/block level content effect indentation
 void setSpaces(int spaces)
          Spaces - default indentation
 void setTabsize(int tabsize)
          Tabsize
 void setTabString(java.lang.String tab)
           
 void setTidyMark(boolean TidyMark)
          TidyMark - add meta element indicating tidied doc
 void setUpperCaseAttrs(boolean UpperCaseAttrs)
          UpperCaseAttrs - output attributes in upper not lower case
 void setUpperCaseTags(boolean UpperCaseTags)
          UpperCaseTags - output tags in upper not lower case
 void setWord2000(boolean Word2000)
          Word2000 - draconian cleaning for Word2000
 void setWrapAsp(boolean WrapAsp)
          WrapAsp - wrap within ASP pseudo elements
 void setWrapAttVals(boolean WrapAttVals)
          WrapAttVals - wrap within attribute values
 void setWrapJste(boolean WrapJste)
          WrapJste - wrap within JSTE pseudo elements
 void setWraplen(int wraplen)
          Wraplen - default wrap margin
 void setWrapPhp(boolean WrapPhp)
          WrapPhp - wrap within PHP pseudo elements
 void setWrapScriptlets(boolean WrapScriptlets)
          WrapScriptlets - wrap within JavaScript string literals
 void setWrapSection(boolean WrapSection)
          WrapSection - wrap within <![ ...
 void setWriteback(boolean writeback)
          Writeback - if true then output tidied markup NOTE: this property is ignored when parsing from an InputStream.
 void setWriteBack(boolean wb)
           
 void setXHTML(boolean xHTML)
          XHTML - output extensible HTML
 void setXmlOut(boolean XmlOut)
          XmlOut - create output as XML
 void setXmlPi(boolean XmlPi)
          XmlPi - add <?xml?> for XML docs
 void setXmlPIs(boolean XmlPIs)
          XmlPIs - if set to true PIs must end with ?>
 void setXmlSpace(boolean XmlSpace)
          XmlSpace - if set to yes adds xml:space attr as needed
 void setXmlTags(boolean XmlTags)
          XmlTags - treat input as XML
 
Methods inherited from class com.port80.html.tidy.Configuration
addProps, adjust, getAttributeTable, getTagTable, parseDocType, parseFile, setAttributeTable, setTagTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fConfig

private com.port80.eclipse.editors.IEditorConfiguration fConfig

fEditor

private org.eclipse.ui.editors.text.TextEditor fEditor

fViewer

private org.eclipse.jface.text.source.ISourceViewer fViewer

fTab

private java.lang.String fTab

fErrWriter

private java.io.PrintWriter fErrWriter
Constructor Detail

TidyConfiguration

public TidyConfiguration(com.port80.eclipse.editors.IEditorConfiguration cf,
                         org.eclipse.ui.editors.text.TextEditor editor,
                         org.eclipse.jface.text.source.ISourceViewer viewer)
Constructor for TidyConfiguration.

Method Detail

initPreference

public void initPreference()

getEditor

public org.eclipse.ui.editors.text.TextEditor getEditor()

getViewer

public org.eclipse.jface.text.source.ISourceViewer getViewer()

getTabString

public java.lang.String getTabString()

setTabString

public void setTabString(java.lang.String tab)

setSpaces

public void setSpaces(int spaces)
Spaces - default indentation


getSpaces

public int getSpaces()

setWraplen

public void setWraplen(int wraplen)
Wraplen - default wrap margin


getWraplen

public int getWraplen()

setCharEncoding

public void setCharEncoding(int charencoding)
CharEncoding


getCharEncoding

public int getCharEncoding()

setTabsize

public void setTabsize(int tabsize)
Tabsize


getTabsize

public int getTabsize()

setErrfile

public void setErrfile(java.lang.String errfile)
Errfile - file name to write errors to


getErrfile

public java.lang.String getErrfile()

setWriteback

public void setWriteback(boolean writeback)
Writeback - if true then output tidied markup NOTE: this property is ignored when parsing from an InputStream.


getWriteback

public boolean getWriteback()

setOnlyErrors

public void setOnlyErrors(boolean OnlyErrors)
OnlyErrors - if true normal output is suppressed


getOnlyErrors

public boolean getOnlyErrors()

setShowWarnings

public void setShowWarnings(boolean ShowWarnings)
ShowWarnings - however errors are always shown


getShowWarnings

public boolean getShowWarnings()

setQuiet

public void setQuiet(boolean Quiet)
Quiet - no 'Parsing X', guessed DTD or summary


getQuiet

public boolean getQuiet()

setIndentContent

public void setIndentContent(boolean IndentContent)
IndentContent - indent content of appropriate tags


getIndentContent

public boolean getIndentContent()

setSmartIndent

public void setSmartIndent(boolean SmartIndent)
SmartIndent - does text/block level content effect indentation


getSmartIndent

public boolean getSmartIndent()

setHideEndTags

public void setHideEndTags(boolean HideEndTags)
HideEndTags - suppress optional end tags


getHideEndTags

public boolean getHideEndTags()

setXmlTags

public void setXmlTags(boolean XmlTags)
XmlTags - treat input as XML


getXmlTags

public boolean getXmlTags()

setXmlOut

public void setXmlOut(boolean XmlOut)
XmlOut - create output as XML


getXmlOut

public boolean getXmlOut()

setXHTML

public void setXHTML(boolean xHTML)
XHTML - output extensible HTML


getXHTML

public boolean getXHTML()

setRawOut

public void setRawOut(boolean RawOut)
RawOut - avoid mapping values > 127 to entities


getRawOut

public boolean getRawOut()

setUpperCaseTags

public void setUpperCaseTags(boolean UpperCaseTags)
UpperCaseTags - output tags in upper not lower case


getUpperCaseTags

public boolean getUpperCaseTags()

setUpperCaseAttrs

public void setUpperCaseAttrs(boolean UpperCaseAttrs)
UpperCaseAttrs - output attributes in upper not lower case


getUpperCaseAttrs

public boolean getUpperCaseAttrs()

setMakeClean

public void setMakeClean(boolean MakeClean)
MakeClean - remove presentational clutter


getMakeClean

public boolean getMakeClean()

setBreakBeforeBR

public void setBreakBeforeBR(boolean BreakBeforeBR)
BreakBeforeBR - o/p newline before <br> or not?


getBreakBeforeBR

public boolean getBreakBeforeBR()

setBurstSlides

public void setBurstSlides(boolean BurstSlides)
BurstSlides - create slides on each h2 element


getBurstSlides

public boolean getBurstSlides()

setNumEntities

public void setNumEntities(boolean NumEntities)
NumEntities - use numeric entities


getNumEntities

public boolean getNumEntities()

setQuoteMarks

public void setQuoteMarks(boolean QuoteMarks)
QuoteMarks - output " marks as &quot;


getQuoteMarks

public boolean getQuoteMarks()

setQuoteNbsp

public void setQuoteNbsp(boolean QuoteNbsp)
QuoteNbsp - output non-breaking space as entity


getQuoteNbsp

public boolean getQuoteNbsp()

setQuoteAmpersand

public void setQuoteAmpersand(boolean QuoteAmpersand)
QuoteAmpersand - output naked ampersand as &


getQuoteAmpersand

public boolean getQuoteAmpersand()

setWrapAttVals

public void setWrapAttVals(boolean WrapAttVals)
WrapAttVals - wrap within attribute values


getWrapAttVals

public boolean getWrapAttVals()

setWrapScriptlets

public void setWrapScriptlets(boolean WrapScriptlets)
WrapScriptlets - wrap within JavaScript string literals


getWrapScriptlets

public boolean getWrapScriptlets()

setWrapSection

public void setWrapSection(boolean WrapSection)
WrapSection - wrap within <![ ... ]> section tags


getWrapSection

public boolean getWrapSection()

setFixAlt

public void setFixAlt(boolean b)
AltText - default text for alt attribute


getFixAlt

public boolean getFixAlt()

setSlidestyle

public void setSlidestyle(java.lang.String slidestyle)
Slidestyle - style sheet for slides


getSlidestyle

public java.lang.String getSlidestyle()

setXmlPi

public void setXmlPi(boolean XmlPi)
XmlPi - add <?xml?> for XML docs


getXmlPi

public boolean getXmlPi()

setDropFontTags

public void setDropFontTags(boolean DropFontTags)
DropFontTags - discard presentation tags


getDropFontTags

public boolean getDropFontTags()

setDropEmptyParas

public void setDropEmptyParas(boolean DropEmptyParas)
DropEmptyParas - discard empty p elements


getDropEmptyParas

public boolean getDropEmptyParas()

setFixComments

public void setFixComments(boolean FixComments)
FixComments - fix comments with adjacent hyphens


getFixComments

public boolean getFixComments()

setWrapAsp

public void setWrapAsp(boolean WrapAsp)
WrapAsp - wrap within ASP pseudo elements


getWrapAsp

public boolean getWrapAsp()

setWrapJste

public void setWrapJste(boolean WrapJste)
WrapJste - wrap within JSTE pseudo elements


getWrapJste

public boolean getWrapJste()

setWrapPhp

public void setWrapPhp(boolean WrapPhp)
WrapPhp - wrap within PHP pseudo elements


getWrapPhp

public boolean getWrapPhp()

setFixBackslash

public void setFixBackslash(boolean FixBackslash)
FixBackslash - fix URLs by replacing \ with /


getFixBackslash

public boolean getFixBackslash()

setIndentAttributes

public void setIndentAttributes(boolean IndentAttributes)
IndentAttributes - newline+indent before each attribute


getIndentAttributes

public boolean getIndentAttributes()

setDocType

public void setDocType(java.lang.String doctype)
DocType - user specified doctype omit | auto | strict | loose | fpi where the fpi is a string similar to "-//ACME//DTD HTML 3.14159//EN" Note: for fpi include the double-quotes in the string.


getDocType

public java.lang.String getDocType()

setLogicalEmphasis

public void setLogicalEmphasis(boolean LogicalEmphasis)
LogicalEmphasis - replace i by em and b by strong


getLogicalEmphasis

public boolean getLogicalEmphasis()

setXmlPIs

public void setXmlPIs(boolean XmlPIs)
XmlPIs - if set to true PIs must end with ?>


getXmlPIs

public boolean getXmlPIs()

setEncloseText

public void setEncloseText(boolean EncloseText)
EncloseText - if true text at body is wrapped in <p>'s


getEncloseText

public boolean getEncloseText()

setEncloseBlockText

public void setEncloseBlockText(boolean EncloseBlockText)
EncloseBlockText - if true text in blocks is wrapped in <p>'s


getEncloseBlockText

public boolean getEncloseBlockText()

setKeepFileTimes

public void setKeepFileTimes(boolean KeepFileTimes)
KeepFileTimes - if true last modified time is preserved
this is NOT supported at this time.


getKeepFileTimes

public boolean getKeepFileTimes()

setWord2000

public void setWord2000(boolean Word2000)
Word2000 - draconian cleaning for Word2000


getWord2000

public boolean getWord2000()

setTidyMark

public void setTidyMark(boolean TidyMark)
TidyMark - add meta element indicating tidied doc


getTidyMark

public boolean getTidyMark()

setXmlSpace

public void setXmlSpace(boolean XmlSpace)
XmlSpace - if set to yes adds xml:space attr as needed


getXmlSpace

public boolean getXmlSpace()

setEmacs

public void setEmacs(boolean Emacs)
Emacs - if true format error output for GNU Emacs


getEmacs

public boolean getEmacs()

setLiteralAttribs

public void setLiteralAttribs(boolean LiteralAttribs)
LiteralAttribs - if true attributes may use newlines


getLiteralAttribs

public boolean getLiteralAttribs()

setWriteBack

public void setWriteBack(boolean wb)

getWriteBack

public boolean getWriteBack()

setConfigurationFromFile

public void setConfigurationFromFile(java.lang.String filename)
Sets the this from a this file.


setConfigurationFromProps

public void setConfigurationFromProps(java.util.Properties props)
Sets the this from a properties object.


getErrWriter

public java.io.PrintWriter getErrWriter()

closeErrWriter

public void closeErrWriter()

isCompactFormat

public boolean isCompactFormat()

getDoReformat

public boolean getDoReformat()

setDoReformat

public void setDoReformat(boolean b)