KT-1755 Duplicates in completion
#KT-1755 fixed
This commit is contained in:
@@ -49,11 +49,7 @@ import org.jetbrains.jet.codegen.GenerationState;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
import org.jetbrains.jet.lang.psi.JetPsiUtil;
|
||||
import org.jetbrains.jet.lang.resolve.FqName;
|
||||
import org.jetbrains.jet.lang.resolve.java.AnalyzerFacadeForJVM;
|
||||
import org.jetbrains.jet.lang.resolve.java.CompilerDependencies;
|
||||
import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode;
|
||||
import org.jetbrains.jet.lang.resolve.java.JetFilesProvider;
|
||||
import org.jetbrains.jet.lang.resolve.java.JetJavaMirrorMarker;
|
||||
import org.jetbrains.jet.lang.resolve.java.*;
|
||||
import org.jetbrains.jet.plugin.JetLanguage;
|
||||
import org.jetbrains.jet.util.QualifiedNamesUtil;
|
||||
|
||||
@@ -119,6 +115,10 @@ public class JetLightClass extends AbstractLightClass implements JetJavaMirrorMa
|
||||
return qualifiedName.getFqName();
|
||||
}
|
||||
|
||||
public FqName getFqName() {
|
||||
return qualifiedName;
|
||||
}
|
||||
|
||||
private PsiJavaFileStub getStub() {
|
||||
CachedValue<PsiJavaFileStub> answer = file.getUserData(JAVA_API_STUB);
|
||||
if (answer == null) {
|
||||
|
||||
@@ -130,7 +130,7 @@ public class JetShortNamesCache extends PsiShortNamesCache {
|
||||
|
||||
@NotNull
|
||||
public Collection<FqName> getFQNamesByName(@NotNull final String name, @NotNull GlobalSearchScope scope) {
|
||||
BindingContext context = getResolutionContext(scope);
|
||||
BindingContext context = WholeProjectAnalyzerFacade.analyzeProjectWithCache(project, scope).getBindingContext();
|
||||
return Collections2.filter(context.getKeys(BindingContext.FQNAME_TO_CLASS_DESCRIPTOR), new Predicate<FqName>() {
|
||||
@Override
|
||||
public boolean apply(@Nullable FqName fqName) {
|
||||
@@ -195,11 +195,6 @@ public class JetShortNamesCache extends PsiShortNamesCache {
|
||||
return result;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public BindingContext getResolutionContext(@NotNull GlobalSearchScope scope) {
|
||||
return WholeProjectAnalyzerFacade.analyzeProjectWithCache(project, scope).getBindingContext();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get jet extensions top-level function names. Method is allowed to give invalid names - all result should be
|
||||
* checked with getAllJetExtensionFunctionsByName().
|
||||
@@ -279,14 +274,6 @@ public class JetShortNamesCache extends PsiShortNamesCache {
|
||||
return resultDescriptors;
|
||||
}
|
||||
|
||||
public Collection<JetNamedFunction> getJetFunctionsByName(@NonNls @NotNull String name, @NotNull GlobalSearchScope scope) {
|
||||
return JetShortFunctionNameIndex.getInstance().get(name, project, scope);
|
||||
}
|
||||
|
||||
public Collection<String> getAllJetOnlyTopFunctionsNames() {
|
||||
return JetShortFunctionNameIndex.getInstance().getAllKeys(project);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiMethod[] getMethodsByName(@NonNls @NotNull String name, @NotNull GlobalSearchScope scope) {
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.jetbrains.jet.lang.descriptors.*;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.plugin.completion.handlers.JetClassInsertHandler;
|
||||
import org.jetbrains.jet.plugin.completion.handlers.JetFunctionInsertHandler;
|
||||
import org.jetbrains.jet.resolve.DescriptorRenderer;
|
||||
|
||||
@@ -48,9 +49,10 @@ public final class DescriptorLookupConverter {
|
||||
private DescriptorLookupConverter() {}
|
||||
|
||||
@NotNull
|
||||
public static LookupElement createLookupElement(@NotNull DeclarationDescriptor descriptor, @Nullable PsiElement declaration) {
|
||||
public static LookupElement createLookupElement(@NotNull BindingContext bindingContext, @NotNull DeclarationDescriptor descriptor, @Nullable PsiElement declaration) {
|
||||
|
||||
LookupElementBuilder element = LookupElementBuilder.create(new JetLookupObject(descriptor, declaration), descriptor.getName());
|
||||
LookupElementBuilder element = LookupElementBuilder.create(
|
||||
new JetLookupObject(descriptor, bindingContext, declaration), descriptor.getName());
|
||||
String typeText = "";
|
||||
String tailText = "";
|
||||
boolean tailTextGrayed = false;
|
||||
@@ -88,8 +90,11 @@ public final class DescriptorLookupConverter {
|
||||
typeText = DescriptorRenderer.TEXT.renderType(outType);
|
||||
}
|
||||
else if (descriptor instanceof ClassDescriptor) {
|
||||
tailText = " (" + DescriptorUtils.getFQName(descriptor.getContainingDeclaration()) + ")";
|
||||
DeclarationDescriptor declaredIn = descriptor.getContainingDeclaration();
|
||||
assert declaredIn != null;
|
||||
tailText = " (" + DescriptorUtils.getFQName(declaredIn) + ")";
|
||||
tailTextGrayed = true;
|
||||
element = element.setInsertHandler(JetClassInsertHandler.INSTANCE);
|
||||
}
|
||||
else {
|
||||
typeText = DescriptorRenderer.TEXT.render(descriptor);
|
||||
@@ -114,7 +119,7 @@ public final class DescriptorLookupConverter {
|
||||
}
|
||||
descriptor = callableMemberDescriptor;
|
||||
}
|
||||
return createLookupElement(descriptor, bindingContext.get(BindingContext.DESCRIPTOR_TO_DECLARATION, descriptor));
|
||||
return createLookupElement(bindingContext, descriptor, bindingContext.get(BindingContext.DESCRIPTOR_TO_DECLARATION, descriptor));
|
||||
}
|
||||
|
||||
public static LookupElement[] collectLookupElements(BindingContext bindingContext, Iterable<DeclarationDescriptor> descriptors) {
|
||||
|
||||
@@ -18,20 +18,21 @@ package org.jetbrains.jet.plugin.completion;
|
||||
|
||||
import com.intellij.codeInsight.completion.*;
|
||||
import com.intellij.codeInsight.lookup.LookupElement;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.patterns.PlatformPatterns;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiReference;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.ProcessingContext;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.asJava.JetLightClass;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
import org.jetbrains.jet.plugin.caches.JetCacheManager;
|
||||
import org.jetbrains.jet.plugin.caches.JetShortNamesCache;
|
||||
import org.jetbrains.jet.plugin.completion.handlers.JetJavaClassInsertHandler;
|
||||
import org.jetbrains.jet.plugin.project.WholeProjectAnalyzerFacade;
|
||||
import org.jetbrains.jet.plugin.references.JetSimpleNameReference;
|
||||
|
||||
import java.util.Collection;
|
||||
@@ -74,17 +75,14 @@ public class JetClassCompletionContributor extends CompletionContributor {
|
||||
static void addClasses(
|
||||
@NotNull final CompletionParameters parameters,
|
||||
@NotNull final CompletionResultSet result,
|
||||
@NotNull final Consumer<LookupElement> consumer) {
|
||||
|
||||
@NotNull final Consumer<LookupElement> consumer
|
||||
) {
|
||||
CompletionResultSet tempResult = result.withPrefixMatcher(CompletionUtil.findReferenceOrAlphanumericPrefix(parameters));
|
||||
|
||||
Project project = parameters.getPosition().getProject();
|
||||
|
||||
JetShortNamesCache namesCache = JetCacheManager.getInstance(project).getNamesCache();
|
||||
|
||||
// TODO: Make icon for standard types
|
||||
Collection<DeclarationDescriptor> jetOnlyClasses = JetShortNamesCache.getJetOnlyTypes();
|
||||
BindingContext bindingContext = namesCache.getResolutionContext(GlobalSearchScope.allScope(project));
|
||||
final Collection<DeclarationDescriptor> jetOnlyClasses = JetShortNamesCache.getJetOnlyTypes();
|
||||
final BindingContext bindingContext = WholeProjectAnalyzerFacade.analyzeProjectWithCacheOnAFile(
|
||||
(JetFile)parameters.getPosition().getContainingFile()).getBindingContext();
|
||||
|
||||
for (DeclarationDescriptor jetOnlyClass : jetOnlyClasses) {
|
||||
consumer.consume(DescriptorLookupConverter.createLookupElement(bindingContext, jetOnlyClass));
|
||||
@@ -97,13 +95,25 @@ public class JetClassCompletionContributor extends CompletionContributor {
|
||||
new Consumer<LookupElement>() {
|
||||
@Override
|
||||
public void consume(LookupElement lookupElement) {
|
||||
// Redefine standard java insert handler which is going to insert fqn
|
||||
if (lookupElement instanceof JavaPsiClassReferenceElement) {
|
||||
JavaPsiClassReferenceElement javaPsiReferenceElement = (JavaPsiClassReferenceElement) lookupElement;
|
||||
javaPsiReferenceElement.setInsertHandler(JetJavaClassInsertHandler.JAVA_CLASS_INSERT_HANDLER);
|
||||
}
|
||||
|
||||
consumer.consume(lookupElement);
|
||||
PsiClass object = javaPsiReferenceElement.getObject();
|
||||
if (object instanceof JetLightClass) {
|
||||
ClassDescriptor descriptor =
|
||||
bindingContext.get(BindingContext.FQNAME_TO_CLASS_DESCRIPTOR, ((JetLightClass)object).getFqName());
|
||||
|
||||
if (descriptor != null) {
|
||||
LookupElement element = DescriptorLookupConverter.createLookupElement(bindingContext, descriptor);
|
||||
consumer.consume(element);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Redefine standard java insert handler which is going to insert fqn
|
||||
javaPsiReferenceElement.setInsertHandler(JetJavaClassInsertHandler.JAVA_CLASS_INSERT_HANDLER);
|
||||
consumer.consume(lookupElement);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public class JetCompletionContributor extends CompletionContributor {
|
||||
|
||||
if (shouldRunTypeCompletionOnly(position, jetReference)) {
|
||||
if (session.customInvocationCount > 0) {
|
||||
addClasses(parameters, result);
|
||||
addClasses(parameters, result, session);
|
||||
}
|
||||
else {
|
||||
for (Object variant : jetReference.getVariants()) {
|
||||
@@ -128,7 +128,7 @@ public class JetCompletionContributor extends CompletionContributor {
|
||||
}
|
||||
|
||||
if (shouldRunTopLevelCompletion(parameters, session)) {
|
||||
addClasses(parameters, result);
|
||||
addClasses(parameters, result, session);
|
||||
addJetTopLevelFunctions(jetReference.getExpression(), result, position, session);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ public class JetCompletionContributor extends CompletionContributor {
|
||||
GlobalSearchScope scope = GlobalSearchScope.allScope(project);
|
||||
Collection<String> functionNames = namesCache.getAllTopLevelFunctionNames();
|
||||
|
||||
BindingContext resolutionContext = namesCache.getResolutionContext(scope);
|
||||
BindingContext resolutionContext = WholeProjectAnalyzerFacade.analyzeProjectWithCacheOnAFile((JetFile)position.getContainingFile()).getBindingContext();
|
||||
|
||||
for (String name : functionNames) {
|
||||
if (name.contains(actualPrefix)) {
|
||||
@@ -216,12 +216,13 @@ public class JetCompletionContributor extends CompletionContributor {
|
||||
*/
|
||||
private static void addClasses(
|
||||
@NotNull CompletionParameters parameters,
|
||||
@NotNull final CompletionResultSet result
|
||||
@NotNull final CompletionResultSet result,
|
||||
@NotNull final CompletionSession session
|
||||
) {
|
||||
JetClassCompletionContributor.addClasses(parameters, result, new Consumer<LookupElement>() {
|
||||
@Override
|
||||
public void consume(@NotNull LookupElement element) {
|
||||
result.addElement(element);
|
||||
addCompletionToResult(result, element, session);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -295,21 +296,6 @@ public class JetCompletionContributor extends CompletionContributor {
|
||||
}
|
||||
}
|
||||
|
||||
//private static LookupPositionObject getLookupPosition(LookupElement element) {
|
||||
// Object lookupObject = element.getObject();
|
||||
// if (lookupObject instanceof PsiElement) {
|
||||
// return new LookupPositionObject((PsiElement) lookupObject);
|
||||
// }
|
||||
// else if (lookupObject instanceof JetLookupObject) {
|
||||
// PsiElement psiElement = ((JetLookupObject) lookupObject).getPsiElement();
|
||||
// if (psiElement != null) {
|
||||
// return new LookupPositionObject(psiElement);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return null;
|
||||
//}
|
||||
|
||||
@Override
|
||||
public void beforeCompletion(@NotNull CompletionInitializationContext context) {
|
||||
super.beforeCompletion(context); //To change body of overridden methods use File | Settings | File Templates.
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.intellij.psi.PsiElement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
|
||||
/**
|
||||
* Stores information about resolved descriptor and position of that descriptor.
|
||||
@@ -27,19 +28,23 @@ import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
*
|
||||
* @author Nikolay Krasko
|
||||
*/
|
||||
public class JetLookupObject {
|
||||
@NotNull
|
||||
public final class JetLookupObject {
|
||||
@Nullable
|
||||
private final DeclarationDescriptor descriptor;
|
||||
|
||||
@Nullable
|
||||
private BindingContext context;
|
||||
|
||||
@Nullable
|
||||
private final PsiElement psiElement;
|
||||
|
||||
public JetLookupObject(@NotNull DeclarationDescriptor descriptor, @Nullable PsiElement psiElement) {
|
||||
public JetLookupObject(@Nullable DeclarationDescriptor descriptor, @NotNull BindingContext context, @Nullable PsiElement psiElement) {
|
||||
this.descriptor = descriptor;
|
||||
this.context = context;
|
||||
this.psiElement = psiElement;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nullable
|
||||
public DeclarationDescriptor getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
@@ -48,4 +53,43 @@ public class JetLookupObject {
|
||||
public PsiElement getPsiElement() {
|
||||
return psiElement;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + " " +
|
||||
descriptor + " " +
|
||||
psiElement;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
// Always check with equals
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null || obj.getClass() != getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
JetLookupObject other = (JetLookupObject)obj;
|
||||
|
||||
// Same descriptor - same lookup element
|
||||
if (descriptor != null && other.descriptor != null) {
|
||||
assert context == other.context : "Can't compare descriptors from different binding context";
|
||||
|
||||
if (descriptor.equals(other.descriptor)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (psiElement != null && psiElement.equals(other.psiElement)) {
|
||||
// Warning here - why descriptors are not same???
|
||||
return true;
|
||||
}
|
||||
|
||||
return (descriptor == null && other.descriptor == null &&
|
||||
psiElement == null && other.psiElement == null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.plugin.completion;
|
||||
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* A hack decision to avoid double completion from different sources.
|
||||
*
|
||||
* @author Nikolay Krasko
|
||||
*/
|
||||
public class LookupPositionObject {
|
||||
private final Pair<String, Integer> position;
|
||||
|
||||
public LookupPositionObject(@NotNull PsiElement psiElement) {
|
||||
|
||||
PsiFile file = psiElement.getContainingFile();
|
||||
String fileName = file != null ? file.getName() : null;
|
||||
|
||||
position = new Pair<String, Integer>(fileName, psiElement.getTextOffset());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj.getClass() != getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return Comparing.equal(position, ((LookupPositionObject) obj).position);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return position.hashCode();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright 2010-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.plugin.completion.handlers;
|
||||
|
||||
import com.intellij.codeInsight.completion.InsertHandler;
|
||||
import com.intellij.codeInsight.completion.InsertionContext;
|
||||
import com.intellij.codeInsight.lookup.LookupElement;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
||||
import org.jetbrains.jet.lang.resolve.FqName;
|
||||
import org.jetbrains.jet.plugin.completion.JetLookupObject;
|
||||
import org.jetbrains.jet.plugin.quickfix.ImportInsertHelper;
|
||||
|
||||
/**
|
||||
* @author Nikolay Krasko
|
||||
*/
|
||||
public class JetClassInsertHandler implements InsertHandler<LookupElement> {
|
||||
|
||||
public static final InsertHandler<LookupElement> INSTANCE = new JetClassInsertHandler();
|
||||
|
||||
@Override
|
||||
public void handleInsert(final InsertionContext context, final LookupElement item) {
|
||||
if (context.getFile() instanceof JetFile) {
|
||||
final JetFile jetFile = (JetFile) context.getFile();
|
||||
ApplicationManager.getApplication().runReadAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
int startOffset = context.getStartOffset();
|
||||
PsiElement element = context.getFile().findElementAt(startOffset);
|
||||
if (element == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (context.getFile() instanceof JetFile && item.getObject() instanceof JetLookupObject) {
|
||||
final DeclarationDescriptor descriptor = ((JetLookupObject) item.getObject()).getDescriptor();
|
||||
if (descriptor != null) {
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final FqName fqn = DescriptorUtils.getFQName(descriptor).toSafe();
|
||||
ImportInsertHelper.addImportDirective(fqn, jetFile);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ import org.jetbrains.jet.plugin.quickfix.ImportInsertHelper;
|
||||
public class JetJavaClassInsertHandler implements InsertHandler<JavaPsiClassReferenceElement> {
|
||||
public static final InsertHandler<JavaPsiClassReferenceElement> JAVA_CLASS_INSERT_HANDLER = new JetJavaClassInsertHandler();
|
||||
|
||||
@Override
|
||||
public void handleInsert(final InsertionContext context, final JavaPsiClassReferenceElement item) {
|
||||
if (context.getFile() instanceof JetFile) {
|
||||
final JetFile jetFile = (JetFile) context.getFile();
|
||||
|
||||
@@ -9,5 +9,6 @@ fun firstFun() {
|
||||
|
||||
// RUNTIME: 1
|
||||
// TIME: 1
|
||||
// EXIST: toLinkedList
|
||||
// NUMBER: 3
|
||||
// EXIST: toLinkedList~() defined in kotlin
|
||||
// EXIST: toLinkedList~() defined in kotlin.nullable
|
||||
// NUMBER: 2
|
||||
@@ -0,0 +1,12 @@
|
||||
package testing
|
||||
|
||||
class Testing {
|
||||
}
|
||||
|
||||
fun firstFun() {
|
||||
Testin<caret>
|
||||
}
|
||||
|
||||
// TIME: 1
|
||||
// EXIST: Testing
|
||||
// NUMBER: 1
|
||||
@@ -0,0 +1,5 @@
|
||||
package classimporttest
|
||||
|
||||
fun test() {
|
||||
TTTes<caret>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package forimport
|
||||
|
||||
class TTTest {}
|
||||
@@ -0,0 +1,7 @@
|
||||
package classimporttest
|
||||
|
||||
import forimport.TTTest
|
||||
|
||||
fun test() {
|
||||
TTTest
|
||||
}
|
||||
@@ -101,6 +101,10 @@ public class JetBasicCompletionTest extends JetCompletionTestBase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNoCLassNameDuplication() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNoEmptyNamespace() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@ public class CompletionMultifileHandlerTest extends CompletionTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testJetClassCompletionImport() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testTopLevelFunctionImport() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user