Fully-qualified names of Java elements supported

This commit is contained in:
Andrey Breslav
2011-03-05 16:12:45 +03:00
parent da7f44b8f2
commit c40d0fce24
16 changed files with 150 additions and 79 deletions
@@ -6,9 +6,8 @@ import com.intellij.psi.PsiElement;
import org.jetbrains.jet.lang.ErrorHandler;
import org.jetbrains.jet.lang.JetSemanticServices;
import org.jetbrains.jet.lang.psi.*;
import org.jetbrains.jet.lang.resolve.AnalyzingUtils;
import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.BindingTraceContext;
import org.jetbrains.jet.lang.resolve.TopDownAnalyzer;
import org.jetbrains.jet.lang.types.*;
import java.util.Collection;
@@ -77,10 +76,7 @@ public class ExpectedResolveData {
Map<String, DeclarationDescriptor> nameToDescriptor = new HashMap<String, DeclarationDescriptor>();
nameToDescriptor.put("std::Int.plus(Int)", standardFunction(lib.getInt(), "plus", lib.getIntType()));
BindingTraceContext bindingTraceContext = new BindingTraceContext();
TopDownAnalyzer topDownAnalyzer = new TopDownAnalyzer(semanticServices, bindingTraceContext);
topDownAnalyzer.process(lib.getLibraryScope(), file.getRootNamespace().getDeclarations());
BindingContext bindingContext = bindingTraceContext;
BindingContext bindingContext = AnalyzingUtils.analyzeFile(file, ErrorHandler.THROW_EXCEPTION);
Map<String, JetDeclaration> nameToDeclaration = new HashMap<String, JetDeclaration>();
@@ -32,7 +32,7 @@ public class JetTypeCheckerTest extends LightDaemonAnalyzerTestCase {
@Override
public void setUp() throws Exception {
super.setUp();
library = new JetStandardLibrary(getProject());
library = JetStandardLibrary.getJetStandardLibrary(getProject());
semanticServices = JetSemanticServices.createSemanticServices(library, ErrorHandler.DO_NOTHING);
classDefinitions = new ClassDefinitions();
classDescriptorResolver = semanticServices.getClassDescriptorResolver(BindingTrace.DUMMY);