Remove interface for JetExpressionCodeFragment
This commit is contained in:
@@ -33,7 +33,7 @@ import org.jetbrains.jet.lang.psi.JetThisExpression
|
||||
import org.jetbrains.jet.lang.psi.JetSimpleNameExpression
|
||||
import org.jetbrains.jet.lang.psi.JetOperationExpression
|
||||
import org.jetbrains.jet.lang.psi.JetExpression
|
||||
import org.jetbrains.jet.lang.psi.JetExpressionCodeFragmentImpl
|
||||
import org.jetbrains.jet.lang.psi.JetExpressionCodeFragment
|
||||
import org.jetbrains.jet.lang.psi.JetSuperExpression
|
||||
|
||||
class KotlinEditorTextProvider : EditorTextProvider {
|
||||
@@ -55,7 +55,7 @@ class KotlinEditorTextProvider : EditorTextProvider {
|
||||
|
||||
return containingFile.getImportList()?.getImports()
|
||||
?.map { it.getText() }
|
||||
?.makeString(JetExpressionCodeFragmentImpl.IMPORT_SEPARATOR) ?: ""
|
||||
?.makeString(JetExpressionCodeFragment.IMPORT_SEPARATOR) ?: ""
|
||||
}
|
||||
|
||||
fun findExpressionInner(element: PsiElement): JetExpression? {
|
||||
|
||||
@@ -22,7 +22,7 @@ import com.intellij.psi.PsiElement
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.JavaCodeFragment
|
||||
import org.jetbrains.jet.plugin.JetFileType
|
||||
import org.jetbrains.jet.lang.psi.JetExpressionCodeFragmentImpl
|
||||
import org.jetbrains.jet.lang.psi.JetExpressionCodeFragment
|
||||
import com.intellij.psi.PsiCodeBlock
|
||||
import com.intellij.debugger.engine.evaluation.CodeFragmentKind
|
||||
import com.intellij.psi.JavaCodeFragmentFactory
|
||||
@@ -33,7 +33,7 @@ import org.jetbrains.jet.lang.psi.JetExpression
|
||||
class KotlinCodeFragmentFactory: CodeFragmentFactory() {
|
||||
override fun createCodeFragment(item: TextWithImports, context: PsiElement?, project: Project): JavaCodeFragment {
|
||||
if (item.getKind() == CodeFragmentKind.EXPRESSION) {
|
||||
val codeFragment = JetExpressionCodeFragmentImpl(project, "fragment.kt", item.getText(), getContextElement(context))
|
||||
val codeFragment = JetExpressionCodeFragment(project, "fragment.kt", item.getText(), getContextElement(context))
|
||||
if (item.getImports().isNotEmpty()) {
|
||||
codeFragment.addImportsFromString(item.getImports())
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ import org.jetbrains.jet.codegen.ClassFileFactory
|
||||
import org.jetbrains.jet.plugin.codeInsight.CodeInsightUtils
|
||||
import org.jetbrains.jet.OutputFileCollection
|
||||
import org.jetbrains.jet.lang.psi.JetExpressionCodeFragment
|
||||
import org.jetbrains.jet.lang.psi.JetExpressionCodeFragmentImpl
|
||||
import org.jetbrains.jet.lang.psi.JetExpressionCodeFragment
|
||||
import org.jetbrains.jet.plugin.caches.resolve.getAnalysisResults
|
||||
|
||||
object KotlinEvaluationBuilder: EvaluatorBuilder {
|
||||
@@ -222,7 +222,7 @@ private fun createFileForDebugger(codeFragment: JetExpressionCodeFragment,
|
||||
): JetFile {
|
||||
var fileText = template.replace("!IMPORT_LIST!",
|
||||
codeFragment.importsToString()
|
||||
.split(JetExpressionCodeFragmentImpl.IMPORT_SEPARATOR)
|
||||
.split(JetExpressionCodeFragment.IMPORT_SEPARATOR)
|
||||
.makeString("\n"))
|
||||
|
||||
fileText = fileText.replace("!FUNCTION!", extractedFunction.getText())
|
||||
|
||||
Reference in New Issue
Block a user