org.eclipse.jface.text
Class DefaultAutoIndentStrategy
java.lang.Object
|
+--org.eclipse.jface.text.DefaultAutoIndentStrategy
- All Implemented Interfaces:
- IAutoEditStrategy, IAutoIndentStrategy
- public class DefaultAutoIndentStrategy
- extends Object
- implements IAutoIndentStrategy
Default implementation of IAutoIndentStrategy
.
This strategy always copies the indentation of the previous line.
Constructor Summary |
DefaultAutoIndentStrategy()
Creates a new default auto indent strategy which can be installed on
text viewers. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultAutoIndentStrategy
public DefaultAutoIndentStrategy()
- Creates a new default auto indent strategy which can be installed on
text viewers.
findEndOfWhiteSpace
protected int findEndOfWhiteSpace(IDocument document,
int offset,
int end)
throws BadLocationException
- Returns the first offset greater than
offset
and smaller than
end
whose character is not a space or tab character. If no such
offset is found, end
is returned.
- Parameters:
document
- the document to search inoffset
- the offset at which searching startend
- the offset at which searching stops- Returns:
- the offset in the specifed range whose character is not a space or tab
- Throws:
BadLocationException
- if position is an invalid range in the given document
customizeDocumentCommand
public void customizeDocumentCommand(IDocument d,
DocumentCommand c)
- Description copied from interface:
IAutoEditStrategy
- Allows the strategy to manipulate the document command.
- Specified by:
customizeDocumentCommand
in interface IAutoEditStrategy
- Following copied from interface:
org.eclipse.jface.text.IAutoEditStrategy
- Parameters:
document
- the document that will be changedcommand
- the document command describing the change
Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.