Overview

 
Class  Use  Tree  Deprecated  Index  Help 
Eclipse Platform
Release 3.0
 PREV PACKAGE   NEXT PACKAGE FRAMES    NO FRAMES  


 

Package org.eclipse.jface.text.formatter

Provides a content formatter add-on for an ITextViewer.

See:
          Description

Interface Summary
IContentFormatter The interface of a document content formatter.
IContentFormatterExtension Extension interface for IContentFormatter.
IFormattingContext Formatting context used in formatting strategies implementing interface IFormattingStrategyExtension.
IFormattingStrategy A formatting strategy is assumed to be specialized on formatting text of a particular content type.
IFormattingStrategyExtension Extension interface for IFormattingStrategy.
 

Class Summary
ContentFormatter Standard implementation of IContentFormatter.
ContextBasedFormattingStrategy Formatting strategy for context based content formatting.
FormattingContext Default implementation of IFormattingContext.
FormattingContextProperties Keys used by IFormattingContext objects to register specific properties needed during the formatting process of a content formatter implementing IContentFormatterExtension.
MultiPassContentFormatter Content formatter for edit-based formatting strategies.
 

 

Package org.eclipse.jface.text.formatter Description

Provides a content formatter add-on for an ITextViewer. A content formatter changes the formatting of a document region while preserving and correctly updating the positions of the document.

 

Package Specification

IContentFormatter defines the concept of a text formatter. It collaborates with content type specific formatting stratgies (IFormattingStrategy) which for a given document region format the subregion with the matching content type. The package contains a default implementation of IContentFormatter (ContentFormatter).
Additionally, an implementation of IContentFormatterExtension is provided for text edit based formatting strategies. This implementation only accepts formatting strategies implementing the extension interface IFormattingStrategyExtension. These formatting strategies are required to handle the position updating of the document. To facilitate the work with these text edit based formatting strategies, a default implementation called ContextBasedFormattingStrategy is provided. Formatting strategies inheriting from this class are text edit based and behave context dependent. Depending on the formatting context that is passed to the content formatter, different preferences and modes can be used to format different parts of a document.

To set up a proper working text edit based content formatter, the following steps are needed:


 

Overview

 
Class  Use  Tree  Deprecated  Index  Help 
Eclipse Platform
Release 3.0
 PREV PACKAGE   NEXT PACKAGE FRAMES    NO FRAMES  


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.