com.intellij.formatting
Class Wrap
java.lang.Object
com.intellij.formatting.Wrap
public abstract class Wrap
- extends java.lang.Object
The wrap setting for a formatting model block. Indicates the conditions under which a line break
is inserted before the block when formatting, if the block extends beyond the
right margin.
- See Also:
Block.getWrap()
|
Constructor Summary |
Wrap()
|
|
Method Summary |
static Wrap |
createChildWrap(Wrap parentWrap,
WrapType wrapType,
boolean wrapFirstElement)
Creates a low priority wrap setting of the specified type. |
static Wrap |
createWrap(WrapType type,
boolean wrapFirstElement)
Creates a block wrap setting of the specified type. |
abstract void |
ignoreParentWraps()
Converts a low-priority wrap setting to a regular wrap setting. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALWAYS
public static WrapType ALWAYS
NORMAL
public static WrapType NORMAL
NONE
public static WrapType NONE
CHOP_DOWN_IF_LONG
public static WrapType CHOP_DOWN_IF_LONG
Wrap
public Wrap()
ignoreParentWraps
public abstract void ignoreParentWraps()
- Converts a low-priority wrap setting to a regular wrap setting.
- See Also:
createChildWrap(Wrap, WrapType, boolean)
createWrap
public static Wrap createWrap(WrapType type,
boolean wrapFirstElement)
- Creates a block wrap setting of the specified type.
- Parameters:
type - the type of the wrap setting.wrapFirstElement - if true, the first element in a sequence of elements of the same type
is also wrapped.
- Returns:
- the wrap setting instance.
createChildWrap
public static Wrap createChildWrap(Wrap parentWrap,
WrapType wrapType,
boolean wrapFirstElement)
- Creates a low priority wrap setting of the specified type. If the formatter detects that
the line should be wrapped at a location of the child wrap, the line is wrapped at the
position of its parent wrap instead.
- Parameters:
parentWrap - the parent for this wrap setting.wrapType - the type of the wrap setting.wrapFirstElement - if true, the first element in a sequence of elements of the same type
is also wrapped.
- Returns:
- the wrap setting instance.
- See Also:
ignoreParentWraps()