[java] deprecating raw literal API used in plugins

GitOrigin-RevId: 2c78c4e4bb93fe64dca4902f9065fe517d2a62d8
This commit is contained in:
Roman Shevchenko
2019-07-30 23:03:28 +03:00
committed by intellij-monorepo-bot
parent 4709ff93b4
commit f39d83cb3c
2 changed files with 8 additions and 0 deletions
@@ -4,6 +4,7 @@ package com.intellij.psi;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.java.IJavaElementType;
import com.intellij.psi.tree.java.IKeywordElementType;
import org.jetbrains.annotations.ApiStatus;
@SuppressWarnings("SpellCheckingInspection")
public interface JavaTokenType extends TokenType {
@@ -18,6 +19,9 @@ public interface JavaTokenType extends TokenType {
IElementType CHARACTER_LITERAL = new IJavaElementType("CHARACTER_LITERAL");
IElementType STRING_LITERAL = new IJavaElementType("STRING_LITERAL");
IElementType TEXT_BLOCK_LITERAL = new IJavaElementType("TEXT_BLOCK_LITERAL");
/** @deprecated to be removed in IDEA 2019.3 */
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2019.3")
IElementType RAW_STRING_LITERAL = new IJavaElementType("RAW_STRING_LITERAL");
IElementType TRUE_KEYWORD = new IKeywordElementType("TRUE_KEYWORD");
@@ -18,6 +18,7 @@ import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.TokenSet;
import com.intellij.psi.util.PsiLiteralUtil;
import com.intellij.util.text.LiteralFormatUtil;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -206,6 +207,9 @@ public class PsiLiteralExpressionImpl
return rawText.substring(start, rawText.length() - 3).split("\n", -1);
}
/** @deprecated to be removed in IDEA 2019.3 */
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2019.3")
public String getRawString() {
return StringUtil.nullize(StringUtil.trimLeading(StringUtil.trimTrailing(getCanonicalText(), '`'), '`'));
}