java.lang.Object
org.eclipse.jface.text.DefaultAutoIndentStrategy
com.port80.eclipse.editors.util.AbstractXMLAutoIndentStrategy
com.port80.eclipse.xml.editors.XMLAutoIndentStrategy
- All Implemented Interfaces:
- org.eclipse.jface.text.IAutoEditStrategy, org.eclipse.jface.text.IAutoIndentStrategy
- public class XMLAutoIndentStrategy
- extends com.port80.eclipse.editors.util.AbstractXMLAutoIndentStrategy
Perform XML auto-indent.
| Methods inherited from class com.port80.eclipse.editors.util.AbstractXMLAutoIndentStrategy |
customizeDocumentCommand, endsWithDelimiter, findOpenBracketBefore, getIndentOfLine, getIndentString, getNonBlankLineAbove, getStringEnd, getStringStart, indent, initPreferences, isBlankLine, isEndTag, isStartOfLine, sameIndentAs, smartIndentAfterNewLine, smartIndentOnBackspace, smartIndentOnQuote, smartIndentOnTab, smartIndentOnTagClose, startsWithDelimiter, unIndent, unIndentOnTagEnd |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
private static final java.lang.String NAME
- See Also:
- Constant Field Values
PREFORMATTED_PARTITIONS
public static final java.lang.String[] PREFORMATTED_PARTITIONS
- Preformatted partitions. No tag counting, simple indent strategy.
ESCAPED_PARTITIONS
public static final java.lang.String[] ESCAPED_PARTITIONS
- Escaped partitions. No tag counting.
CDATA_PARTITIONS
public static final java.lang.String[] CDATA_PARTITIONS
XMLAutoIndentStrategy
public XMLAutoIndentStrategy(XMLEditorConfiguration cf,
org.eclipse.jface.text.source.ISourceViewer viewer)
- Constructor for XMLAutoIndentStrategy.
getEscapedPartitions
protected java.lang.String[] getEscapedPartitions()
getPreformattedPartitions
protected java.lang.String[] getPreformattedPartitions()
isInsideEscapedPartitions
protected boolean isInsideEscapedPartitions(int offset,
org.eclipse.jface.text.IDocument doc)
- Description copied from class:
com.port80.eclipse.editors.util.AbstractXMLAutoIndentStrategy
- Escaped partitions, eg. inside comment, where tags should not be counted.
isInsidePreformattedPartitions
protected boolean isInsidePreformattedPartitions(int offset,
org.eclipse.jface.text.IDocument doc)
- Description copied from class:
com.port80.eclipse.editors.util.AbstractXMLAutoIndentStrategy
- Preformatted partitions, eg. inside quoted string, may not have correct indent
and should not be auto-indented.
findMatchingOpenTagBefore
protected int findMatchingOpenTagBefore(int end,
org.eclipse.jface.text.IDocument doc)
getTagCount
protected int getTagCount(org.eclipse.jface.text.IDocument document,
int start,
int end,
boolean skip)
throws org.eclipse.jface.text.BadLocationException
- Count number of open tags-close tags in the given range.
NOTE: No white space in char. sequences '</' and '/>' allowed here.