Module aya.ij.parsing.core
Class SemanticEditorPosition
java.lang.Object
com.intellij.psi.impl.source.codeStyle.SemanticEditorPosition
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptionafter()afterOptional(@NotNull SemanticEditorPosition.SyntaxElement syntaxElement) afterOptionalMix(SemanticEditorPosition.SyntaxElement @NotNull ... elements) before()beforeOptional(@NotNull SemanticEditorPosition.SyntaxElement syntaxElement) beforeOptionalMix(SemanticEditorPosition.SyntaxElement @NotNull ... elements) beforeParentheses(@NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis) copy()copyAnd(@NotNull Consumer<? super SemanticEditorPosition> modifier) static @NotNull SemanticEditorPositioncreateEditorPosition(int offset, CharSequence chars, @NotNull Function<Integer, ? extends LexemeIterator> createLexemeIteratorAtOffset, @NotNull Function<? super IElementType, ? extends SemanticEditorPosition.SyntaxElement> typeMapper) @Nullable SemanticEditorPosition.SyntaxElementelementAfterOnSameLine(SemanticEditorPosition.SyntaxElement @NotNull ... syntaxElements) findLeftParenthesisBackwardsSkippingNested(@NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis) findLeftParenthesisBackwardsSkippingNestedWithPredicate(@NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis, @NotNull Predicate<? super SemanticEditorPosition> terminationCondition) intfindStartOf(@NotNull SemanticEditorPosition.SyntaxElement element) getChars()@Nullable SemanticEditorPosition.SyntaxElementintbooleanhasEmptyLineAfter(int offset) booleanhasLineBreaksAfter(int offset) Checks if there are line breaks strictly after the given offset till the end of the current element.booleanisAfterOnSameLine(SemanticEditorPosition.SyntaxElement @NotNull ... syntaxElements) booleanisAt(@NotNull SemanticEditorPosition.SyntaxElement syntaxElement) booleanisAt(@NotNull IElementType elementType) booleanisAtAnyOf(SemanticEditorPosition.SyntaxElement @NotNull ... syntaxElements) booleanisAtEnd()booleanisAtLanguage(@Nullable Language language) booleanbooleanisAtMultiline(SemanticEditorPosition.SyntaxElement... elements) map(@NotNull IElementType elementType) booleanmatchesRule(@NotNull SemanticEditorPosition.Rule rule) voidvoidmoveAfterOptional(@NotNull SemanticEditorPosition.SyntaxElement syntaxElement) voidmoveAfterOptionalMix(SemanticEditorPosition.SyntaxElement @NotNull ... elements) voidmoveAfterParentheses(@NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis) voidvoidmoveBeforeOptional(@NotNull SemanticEditorPosition.SyntaxElement syntaxElement) voidmoveBeforeOptionalMix(SemanticEditorPosition.SyntaxElement @NotNull ... elements) voidmoveBeforeParentheses(@NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis) voidmoveToLeftParenthesisBackwardsSkippingNested(@NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis) voidmoveToLeftParenthesisBackwardsSkippingNestedWithPredicate(@NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis, @NotNull Predicate<? super SemanticEditorPosition> terminationCondition) protected voidskipParentheses(boolean forward, @NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis) toString()
-
Method Details
-
moveBeforeOptional
public void moveBeforeOptional(@NotNull @NotNull SemanticEditorPosition.SyntaxElement syntaxElement) -
beforeOptional
public SemanticEditorPosition beforeOptional(@NotNull @NotNull SemanticEditorPosition.SyntaxElement syntaxElement) -
moveBeforeOptionalMix
-
beforeOptionalMix
public SemanticEditorPosition beforeOptionalMix(SemanticEditorPosition.SyntaxElement @NotNull ... elements) -
moveAfterOptionalMix
-
afterOptionalMix
public SemanticEditorPosition afterOptionalMix(SemanticEditorPosition.SyntaxElement @NotNull ... elements) -
isAtMultiline
public boolean isAtMultiline() -
hasLineBreaksAfter
public boolean hasLineBreaksAfter(int offset) Checks if there are line breaks strictly after the given offset till the end of the current element.- Parameters:
offset- The offset to search line breaks after.- Returns:
- True if there are line breaks after the given offset.
-
isAtMultiline
-
moveBefore
public void moveBefore() -
before
-
moveAfterOptional
-
afterOptional
public SemanticEditorPosition afterOptional(@NotNull @NotNull SemanticEditorPosition.SyntaxElement syntaxElement) -
moveAfter
public void moveAfter() -
after
-
moveBeforeParentheses
public void moveBeforeParentheses(@NotNull @NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis) -
moveAfterParentheses
public void moveAfterParentheses(@NotNull @NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis) -
skipParentheses
protected void skipParentheses(boolean forward, @NotNull @NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis) -
beforeParentheses
public SemanticEditorPosition beforeParentheses(@NotNull @NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis) -
moveToLeftParenthesisBackwardsSkippingNested
public void moveToLeftParenthesisBackwardsSkippingNested(@NotNull @NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis) -
findLeftParenthesisBackwardsSkippingNested
public SemanticEditorPosition findLeftParenthesisBackwardsSkippingNested(@NotNull @NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis) -
moveToLeftParenthesisBackwardsSkippingNestedWithPredicate
public void moveToLeftParenthesisBackwardsSkippingNestedWithPredicate(@NotNull @NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis, @NotNull @NotNull Predicate<? super SemanticEditorPosition> terminationCondition) -
findLeftParenthesisBackwardsSkippingNestedWithPredicate
public SemanticEditorPosition findLeftParenthesisBackwardsSkippingNestedWithPredicate(@NotNull @NotNull SemanticEditorPosition.SyntaxElement leftParenthesis, @NotNull @NotNull SemanticEditorPosition.SyntaxElement rightParenthesis, @NotNull @NotNull Predicate<? super SemanticEditorPosition> terminationCondition) -
isAfterOnSameLine
-
elementAfterOnSameLine
@Nullable public @Nullable SemanticEditorPosition.SyntaxElement elementAfterOnSameLine(SemanticEditorPosition.SyntaxElement @NotNull ... syntaxElements) -
isAt
-
isAt
-
isAtEnd
public boolean isAtEnd() -
getStartOffset
public int getStartOffset() -
isAtAnyOf
-
getChars
-
findStartOf
-
hasEmptyLineAfter
public boolean hasEmptyLineAfter(int offset) -
getCurrElement
-
matchesRule
-
map
-
toString
-
copy
-
copyAnd
public SemanticEditorPosition copyAnd(@NotNull @NotNull Consumer<? super SemanticEditorPosition> modifier) -
getLanguage
-
isAtLanguage
-
createEditorPosition
@NotNull public static @NotNull SemanticEditorPosition createEditorPosition(int offset, CharSequence chars, @NotNull @NotNull Function<Integer, ? extends LexemeIterator> createLexemeIteratorAtOffset, @NotNull @NotNull Function<? super IElementType, ? extends SemanticEditorPosition.SyntaxElement> typeMapper)
-