Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text.formatter
Interface IContentFormatter

All Known Implementing Classes:
ContentFormatter, MultiPassContentFormatter

public interface IContentFormatter

The interface of a document content formatter. The formatter formats ranges within documents. The documents are modified by the formatter.

The content formatter is assumed to determine the partitioning of the document range to be formatted. For each partition, the formatter determines based on the partition's content type the formatting strategy to be used. Before the first strategy is activated all strategies are informed about the start of the formatting process. After that, the formatting strategies are activated in the sequence defined by the partitioning of the document range to be formatted. It is assumed that a strategy must be finished before the next strategy can be activated. After the last strategy has been finished, all strategies are informed about the termination of the formatting process.

The interface can be implemented by clients. By default, clients use ContentFormatter or MultiPassContentFormatter as the standard implementers of this interface.

See Also:
IDocument, IFormattingStrategy

Method Summary
 void format ( IDocument document, IRegion region)
          Formats the given region of the specified document.The formatter may safely assume that it is the only subject that modifies the document at this point in time.
  IFormattingStrategy getFormattingStrategy ( String contentType)
          Returns the formatting strategy registered for the given content type.
 

Method Detail

format

void format(
IDocument document,
            
IRegion region)
Formats the given region of the specified document.The formatter may safely assume that it is the only subject that modifies the document at this point in time.

Parameters:
document - the document to be formatted
region - the region within the document to be formatted

getFormattingStrategy

IFormattingStrategy getFormattingStrategy(
String contentType)
Returns the formatting strategy registered for the given content type.

Parameters:
contentType - the content type for which to look up the formatting strategy
Returns:
the formatting strategy for the given content type, or null if there is no such strategy

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire