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
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

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




Eclipse Platform
Release 3.5

Interface IContentFormatterExtension

All Known Implementing Classes:

public interface IContentFormatterExtension

Extension interface for IContentFormatter.

Updates the content formatter to be able to pass IFormattingContext context objects to IFormattingStrategyExtension objects operating in context based mode.

Clients using context based formatting call the method format(IDocument, IFormattingContext) with a properly initialized formatting context.
The formatting context must be set up according to the desired formatting mode:

Depending on the registered formatting strategies, more context information must be passed in the formatting context, like e.g. FormattingContextProperties.CONTEXT_PREFERENCES.

Note that in context based mode the content formatter is fully reentrant, but not thread-safe.

See Also:
IFormattingContext, FormattingContextProperties

Method Summary
 void format ( IDocument document, IFormattingContext context)
          Formats the given region of the specified document.

Method Detail


void format(
IDocument document,
IFormattingContext context)
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. This method is fully reentrant, but not thread-safe.

The formatting process performed by format(IDocument, IFormattingContext) happens as follows:

  • In a first pass the content formatter formats the range of the document to be formatted by using the master formatting strategy. This happens regardless of the content type of the underlying partition.
  • In the second pass, the range is formatted again, this time using the registered slave formatting strategies. For each partition contained in the range to be formatted, the content formatter determines its content type and formats the partition with the correct formatting strategy.
  • Parameters:
    document - the document to be formatted
    context - the formatting context to pass to the formatting strategies. This argument must not be null.

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