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 IFormattingStrategy

All Known Implementing Classes:
ContextBasedFormattingStrategy

public interface IFormattingStrategy

A formatting strategy is assumed to be specialized on formatting text of a particular content type. Each formatting process calls the strategy's methods in the following sequence:

  • formatterStarts
  • format
  • formatterStops

This interface must be implemented by clients. Implementers should be registered with a content formatter in order get involved in the formatting process.


Method Summary
  String format ( String content, boolean isLineStart, String indentation, int[] positions)
          Formats the given string.
 void formatterStarts ( String initialIndentation)
          Informs the strategy about the start of a formatting process in which it will participate.
 void formatterStops ()
          Informs the strategy that the formatting process in which it has participated has been finished.
 

Method Detail

formatterStarts

void formatterStarts(
String initialIndentation)
Informs the strategy about the start of a formatting process in which it will participate.

Parameters:
initialIndentation - the indent string of the first line at which the overall formatting process starts.

format

String format(
String content,
              boolean isLineStart,
              
String indentation,
              int[] positions)
Formats the given string. During the formatting process this strategy must update the given character positions according to the changes applied to the given string.

Parameters:
content - the initial string to be formatted
isLineStart - indicates whether the beginning of content is a line start in its document
indentation - the indentation string to be used
positions - the character positions to be updated
Returns:
the formatted string

formatterStops

void formatterStops()
Informs the strategy that the formatting process in which it has participated has been finished.


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