|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.text.formatter.ContextBasedFormattingStrategy
public abstract class ContextBasedFormattingStrategy
Formatting strategy for context based content formatting. Retrieves the preferences
set on the formatting context's FormattingContextProperties.CONTEXT_PREFERENCES
property and makes them available to subclasses.
| Constructor Summary | |
|---|---|
ContextBasedFormattingStrategy()
|
|
| Method Summary | |
|---|---|
void |
format()
Formats the region with the properties indicated in the formatting context previously supplied by formatterStarts(IFormattingContext). |
String |
format(String content,
boolean start,
String indentation,
int[] positions)
Formats the given string. |
void |
formatterStarts(IFormattingContext context)
Informs the strategy about the start of a formatting process in which it will participate. |
void |
formatterStarts(String indentation)
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. |
Map |
getPreferences()
Returns the preferences used for the current formatting step. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContextBasedFormattingStrategy()
| Method Detail |
|---|
public void format()
IFormattingStrategyExtensionformatterStarts(IFormattingContext).
format in interface IFormattingStrategyExtension
public String format(String content,
boolean start,
String indentation,
int[] positions)
IFormattingStrategy
format in interface IFormattingStrategycontent - the initial string to be formattedstart - indicates whether the beginning of content is a line start in its documentindentation - the indentation string to be usedpositions - the character positions to be updated
public void formatterStarts(IFormattingContext context)
IFormattingStrategyExtension
formatterStarts in interface IFormattingStrategyExtensioncontext - the formatting context used in the corresponding formatting process.public void formatterStarts(String indentation)
IFormattingStrategy
formatterStarts in interface IFormattingStrategyindentation - the indent string of the first line at which the
overall formatting process starts.public void formatterStops()
IFormattingStrategy
formatterStops in interface IFormattingStrategyformatterStops in interface IFormattingStrategyExtensionpublic final Map getPreferences()
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.