org.eclipse.m2m.atl.adt.ui.text.atl
Class AtlAutoIndentStrategy

java.lang.Object
  extended by org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy
      extended by org.eclipse.m2m.atl.adt.ui.text.atl.AtlAutoIndentStrategy
All Implemented Interfaces:
org.eclipse.jface.text.IAutoEditStrategy

public class AtlAutoIndentStrategy
extends org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy


Field Summary
protected static java.util.logging.Logger logger
           
 
Constructor Summary
AtlAutoIndentStrategy(java.lang.String partitioning)
          Creates a new ATL auto indent strategy for the given document fPartitioning.
 
Method Summary
protected  java.lang.String createIndent()
           
protected  java.lang.String createIndent(int indents)
          Creates an indented string buffer.
 void customizeDocumentCommand(org.eclipse.jface.text.IDocument document, org.eclipse.jface.text.DocumentCommand command)
           
protected  java.lang.String getIndentOfLine(org.eclipse.jface.text.IDocument document, int line)
           
 
Methods inherited from class org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy
findEndOfWhiteSpace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static java.util.logging.Logger logger
Constructor Detail

AtlAutoIndentStrategy

public AtlAutoIndentStrategy(java.lang.String partitioning)
Creates a new ATL auto indent strategy for the given document fPartitioning.

Parameters:
partitioning - the document fPartitioning
Method Detail

createIndent

protected java.lang.String createIndent()
Returns:
a string buffer containing one indent

createIndent

protected java.lang.String createIndent(int indents)
Creates an indented string buffer.

Parameters:
indents - the requested indentation level
Returns:
the indented string buffer

customizeDocumentCommand

public void customizeDocumentCommand(org.eclipse.jface.text.IDocument document,
                                     org.eclipse.jface.text.DocumentCommand command)
Specified by:
customizeDocumentCommand in interface org.eclipse.jface.text.IAutoEditStrategy
Overrides:
customizeDocumentCommand in class org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy

getIndentOfLine

protected java.lang.String getIndentOfLine(org.eclipse.jface.text.IDocument document,
                                           int line)
                                    throws org.eclipse.jface.text.BadLocationException
Parameters:
document - the document being parsed
line - the line being searched
Returns:
the String at line with the leading whitespace removed
Throws:
org.eclipse.jface.text.BadLocationException

Copyright 2007 IBM Corporation and others.
All Rights Reserved.