[groovy] remove unused methods from GrStringUtil

GitOrigin-RevId: fb85917fecd296a2f567474dfb79ec6240942758
This commit is contained in:
Daniil Ovchinnikov
2019-11-15 07:34:12 +00:00
committed by intellij-monorepo-bot
parent 170dc73bbb
commit 6153642c31
@@ -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
*/