PsiFileFactory psiFileFactory = PsiFileFactory.getInstance(executionProcessor.getProject());
PsiFile previewFile = psiFileFactory.createFileFromText("preview", connectionHandler.getLanguageDialect(SQLLanguage.INSTANCE), originalStatement);
PsiElement firstChild = previewFile.getFirstChild();
if (firstChild instanceof ExecutableBundlePsiElement) {
ExecutableBundlePsiElement rootPsiElement = (ExecutableBundlePsiElement) firstChild;
originalPsiElement = rootPsiElement.getExecutablePsiElements().get(0);
}
}
return originalPsiElement;
}