Move descriptorToDeclaration utilities family to a separate util class DescriptorToSourceUtils
This commit is contained in:
@@ -32,7 +32,7 @@ import org.jetbrains.jet.lang.diagnostics.DiagnosticUtils;
|
||||
import org.jetbrains.jet.lang.diagnostics.Errors;
|
||||
import org.jetbrains.jet.lang.psi.*;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContextUtils;
|
||||
import org.jetbrains.jet.lang.resolve.DescriptorToSourceUtils;
|
||||
import org.jetbrains.jet.lang.resolve.lazy.JvmResolveUtil;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
@@ -279,7 +279,7 @@ public abstract class ExpectedResolveData {
|
||||
|
||||
PsiElement actual = referenceTarget == null
|
||||
? bindingContext.get(BindingContext.LABEL_TARGET, referenceExpression)
|
||||
: BindingContextUtils.descriptorToDeclaration(referenceTarget);
|
||||
: DescriptorToSourceUtils.descriptorToDeclaration(referenceTarget);
|
||||
if (actual instanceof JetSimpleNameExpression) {
|
||||
actual = ((JetSimpleNameExpression)actual).getIdentifier();
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class MyDeclarations(
|
||||
{
|
||||
val functions = context.getSliceContents(BindingContext.FUNCTION)
|
||||
functionFoo = findFunctionByName(functions.values(), "foo")
|
||||
val function = BindingContextUtils.descriptorToDeclaration(functionFoo) as JetFunction
|
||||
val function = DescriptorToSourceUtils.descriptorToDeclaration(functionFoo) as JetFunction
|
||||
val fooBody = function.getBodyExpression()
|
||||
scopeToResolveTypeParameters = context.get(BindingContext.RESOLUTION_SCOPE, fooBody)!!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user