PY-61639 Move extendWordSelectionHandlers to python.syntax

GitOrigin-RevId: d5957878544a0026f249109ca1df0a18e20a8a55
This commit is contained in:
Petr
2024-02-10 16:20:02 +01:00
committed by intellij-monorepo-bot
parent e96055cb6d
commit 3b9b10b296
12 changed files with 86 additions and 70 deletions

View File

@@ -51,14 +51,15 @@ import java.util.List;
* @see PyFormattedStringElement
*/
public interface PyStringLiteralExpression extends PyAstStringLiteralExpression, PyLiteralExpression, StringLiteralExpression, PsiLanguageInjectionHost {
@NotNull
List<ASTNode> getStringNodes();
/**
* Returns a list of implicitly concatenated string elements composing this literal expression.
* Returns a list of implicitly concatenated string elements composing this literal expression.
*/
@NotNull
List<PyStringElement> getStringElements();
@Override
default List<PyStringElement> getStringElements() {
//noinspection unchecked
return (List<PyStringElement>)PyAstStringLiteralExpression.super.getStringElements();
}
int valueOffsetToTextOffset(int valueOffset);
@@ -91,28 +92,6 @@ public interface PyStringLiteralExpression extends PyAstStringLiteralExpression,
@NotNull
List<Pair<TextRange, String>> getDecodedFragments();
/**
* Returns value ranges for all nodes that form this string literal expression <i>relative to its start offset</i>.
* Such range doesn't include neither node's prefix like "ur", nor its quotes.
* <p>
* For example, for the next "glued" string literal:
* <pre>{@code
* u"\u0066\x6F\157" ur'' '''\t'''
* }</pre>
* <p>
* this method returns:
* <p>
* <code><pre>
* [
* [2,16),
* [21,21),
* [26,28),
* ]
* </code></pre>
*/
@NotNull
List<TextRange> getStringValueTextRanges();
/**
* @return true if this element has single string node and its type is {@link com.jetbrains.python.PyTokenTypes#DOCSTRING}
*/