[213] Switch to 213 platform

KTI-1114
This commit is contained in:
Roman Golyshev
2022-07-19 17:15:29 +02:00
committed by Space Team
parent 7f07b2a82c
commit d4cffb8a5a
94 changed files with 173 additions and 212 deletions
@@ -29,6 +29,7 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Method;
import java.nio.charset.StandardCharsets;
import java.util.HashSet;
import java.util.Set;
import java.util.regex.Pattern;
@@ -72,7 +73,7 @@ public class KtTestUtil {
shortName = shortName.substring(shortName.lastIndexOf('\\') + 1);
LightVirtualFile virtualFile = new LightVirtualFile(shortName, KotlinLanguage.INSTANCE, StringUtilRt.convertLineSeparators(text));
virtualFile.setCharset(CharsetToolkit.UTF8_CHARSET);
virtualFile.setCharset(StandardCharsets.UTF_8);
PsiFileFactoryImpl factory = (PsiFileFactoryImpl) PsiFileFactory.getInstance(project);
//noinspection ConstantConditions
return (KtFile) factory.trySetupPsiForFile(virtualFile, KotlinLanguage.INSTANCE, true, false);