|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.intellij.formatting.Spacing
public abstract class Spacing
The spacing setting for a formatting model block. Indicates the number of spaces and/or line breaks that should be inserted between the specified children of the specified block.
Block.getSpacing(Block, Block)| Constructor Summary | |
|---|---|
Spacing()
|
|
| Method Summary | |
|---|---|
static Spacing |
createDependentLFSpacing(int minSpaces,
int maxSpaces,
TextRange dependance,
boolean keepLineBreaks,
int keepBlankLines)
Creates a spacing setting instance which inserts a line break if the specified text range also contains a line break. |
static Spacing |
createKeepingFirstColumnSpacing(int minSpaces,
int maxSpaces,
boolean keepLineBreaks,
int keepBlankLines)
Creates a spacing setting instance that keeps the second child on the first column if it was there before the formatting, but may indent the second child if it was not in the first column. |
static Spacing |
createSafeSpacing(boolean keepLineBreaks,
int keepBlankLines)
Creates a spacing setting instance which preserves the presence of spaces between the blocks but, if spaces are present, may insert or delete the spaces. |
static Spacing |
createSpacing(int minSpaces,
int maxSpaces,
int minLineFeeds,
boolean keepLineBreaks,
int keepBlankLines)
Creates a regular spacing setting instance. |
static Spacing |
getReadOnlySpacing()
Returns a spacing setting instance indicating that no line breaks or spaces can be inserted or removed by the formatter between the specified two blocks. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Spacing()
| Method Detail |
|---|
public static Spacing createSpacing(int minSpaces,
int maxSpaces,
int minLineFeeds,
boolean keepLineBreaks,
int keepBlankLines)
minSpaces - The minimum number of spaces that should be present between the blocks
to which the spacing setting instance is related. Spaces are inserted
if there are less than this amount of spaces in the document.maxSpaces - The maximum number of spaces that should be present between the blocks
to which the spacing setting instance is related, or Integer.MAX_VALUE
if the number of spaces is not limited. Spaces are deleted if there are
more than this amount of spaces in the document.minLineFeeds - The minimum number of line breaks that should be present between the blocks
to which the spacing setting instance is related.keepLineBreaks - Whether the existing line breaks between the blocks should be preserved.keepBlankLines - Whether the existing blank lines between the blocks should be preserved.
public static Spacing getReadOnlySpacing()
public static Spacing createDependentLFSpacing(int minSpaces,
int maxSpaces,
TextRange dependance,
boolean keepLineBreaks,
int keepBlankLines)
minSpaces - The minimum number of spaces that should be present between the blocks
to which the spacing setting instance is related. Spaces are inserted
if there are less than this amount of spaces in the document.maxSpaces - The maximum number of spaces that should be present between the blocks
to which the spacing setting instance is related, or Integer.MAX_VALUE
if the number of spaces is not limited. Spaces are deleted if there are
more than this amount of spaces in the document.dependance - The text range checked for the presense of line breaks.keepLineBreaks - Whether the existing line breaks between the blocks should be preserved.keepBlankLines - Whether the existing blank lines between the blocks should be preserved.
public static Spacing createSafeSpacing(boolean keepLineBreaks,
int keepBlankLines)
keepLineBreaks - Whether the existing line breaks between the blocks should be preserved.keepBlankLines - Whether the existing blank lines between the blocks should be preserved.
public static Spacing createKeepingFirstColumnSpacing(int minSpaces,
int maxSpaces,
boolean keepLineBreaks,
int keepBlankLines)
minSpaces - The minimum number of spaces that should be present between the blocks
to which the spacing setting instance is related. Spaces are inserted
if there are less than this amount of spaces in the document.maxSpaces - The maximum number of spaces that should be present between the blocks
to which the spacing setting instance is related, or Integer.MAX_VALUE
if the number of spaces is not limited. Spaces are deleted if there are
more than this amount of spaces in the document.keepLineBreaks - Whether the existing line breaks between the blocks should be preserved.keepBlankLines - Whether the existing blank lines between the blocks should be preserved.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||