public class JavaLineWrapPositionStrategy extends PsiAwareDefaultLineWrapPositionStrategy
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
A_LINK_END |
static java.lang.String |
A_LINK_START |
static java.lang.String |
PRE_TAG_END |
static java.lang.String |
PRE_TAG_START |
NO_ELEMENT_WRAP, NO_LINE_WRAP| Constructor and Description |
|---|
JavaLineWrapPositionStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
doCalculateWrapPosition(Document document,
Project project,
PsiElement element,
int startOffset,
int endOffset,
int maxPreferredOffset,
boolean isSoftWrap)
Serves for the same purposes as
PsiAwareLineWrapPositionStrategy.calculateWrapPosition(Document, Project, int, int, int, boolean, boolean) but ensures
that given offsets target enabled token/element types. |
calculateWrapPositionpublic static final java.lang.String A_LINK_START
public static final java.lang.String A_LINK_END
public static final java.lang.String PRE_TAG_START
public static final java.lang.String PRE_TAG_END
protected int doCalculateWrapPosition(Document document, Project project, PsiElement element, int startOffset, int endOffset, int maxPreferredOffset, boolean isSoftWrap)
PsiAwareLineWrapPositionStrategyPsiAwareLineWrapPositionStrategy.calculateWrapPosition(Document, Project, int, int, int, boolean, boolean) but ensures
that given offsets target enabled token/element types.doCalculateWrapPosition in class PsiAwareDefaultLineWrapPositionStrategydocument - target document which text is being processedproject - target projectstartOffset - start offset to use with the given text holder (inclusive)endOffset - end offset to use with the given text holder (exclusive)maxPreferredOffset - this method is expected to do its best to return offset that belongs to
(startOffset; maxPreferredOffset] interval. However, it's allowed
to return value from (maxPreferredOffset; endOffset] interval
unless 'allowToBeyondMaxPreferredOffset' if 'false'isSoftWrap - identifies if current request is for virtual wrap (soft wrap) position(startOffset; endOffset] interval where
target line should be wrapped, PsiAwareLineWrapPositionStrategy.NO_ELEMENT_WRAP if no wrapping
should be performed within the element OR PsiAwareLineWrapPositionStrategy.NO_LINE_WRAP if the
entire line wrapping is not allowed.