Package org.eclipse.jface.text
Class DefaultIndentLineAutoEditStrategy
java.lang.Object
org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy
- All Implemented Interfaces:
- IAutoEditStrategy
- Direct Known Subclasses:
- DefaultAutoIndentStrategy
This strategy always copies the indentation of the previous line.
 
This class is not intended to be subclassed.
- Since:
- 3.1
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new indent line auto edit strategy which can be installed on text viewers.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAllows the strategy to manipulate the document command.protected intfindEndOfWhiteSpace(IDocument document, int offset, int end) Returns the first offset greater thanoffsetand smaller thanendwhose character is not a space or tab character.
- 
Constructor Details- 
DefaultIndentLineAutoEditStrategypublic DefaultIndentLineAutoEditStrategy()Creates a new indent line auto edit strategy which can be installed on text viewers.
 
- 
- 
Method Details- 
findEndOfWhiteSpaceprotected int findEndOfWhiteSpace(IDocument document, int offset, int end) throws BadLocationException Returns the first offset greater thanoffsetand smaller thanendwhose character is not a space or tab character. If no such offset is found,endis returned.- Parameters:
- document- the document to search in
- offset- the offset at which searching start
- end- the offset at which searching stops
- Returns:
- the offset in the specified range whose character is not a space or tab
- Throws:
- BadLocationException- if position is an invalid range in the given document
 
- 
customizeDocumentCommandDescription copied from interface:IAutoEditStrategyAllows the strategy to manipulate the document command.- Specified by:
- customizeDocumentCommandin interface- IAutoEditStrategy
- Parameters:
- d- the document that will be changed
- c- the document command describing the change
 
 
-