mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] remove unused methods from GrStringUtil
GitOrigin-RevId: fb85917fecd296a2f567474dfb79ec6240942758
This commit is contained in:
committed by
intellij-monorepo-bot
parent
170dc73bbb
commit
6153642c31
-18
@@ -910,21 +910,11 @@ public class GrStringUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isPlainStringLiteral(ASTNode node) {
|
||||
String text = node.getText();
|
||||
return text.length() < 3 && text.equals("''") || text.length() >= 3 && !text.startsWith("'''");
|
||||
}
|
||||
|
||||
public static boolean isMultilineStringLiteral(GrLiteral literal) {
|
||||
String quote = getStartQuote(literal.getText());
|
||||
return TRIPLE_QUOTES.equals(quote) || TRIPLE_DOUBLE_QUOTES.equals(quote) || SLASH.equals(quote) || DOLLAR_SLASH.equals(quote);
|
||||
}
|
||||
|
||||
public static boolean isSinglelineStringLiteral(GrLiteral literal) {
|
||||
String quote = getStartQuote(literal.getText());
|
||||
return QUOTE.equals(quote) || DOUBLE_QUOTES.equals(quote);
|
||||
}
|
||||
|
||||
public static StringBuilder getLiteralTextByValue(String value) {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
if (value.indexOf('\n') >= 0) {
|
||||
@@ -940,14 +930,6 @@ public class GrStringUtil {
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public static PsiElement findContainingLiteral(PsiElement token) {
|
||||
|
||||
PsiElement parent = token.getParent();
|
||||
if (parent instanceof GrStringContent) parent = parent.getParent();
|
||||
|
||||
return parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether a literal is a string literal of any kind
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user