Moved FuzzyType and changed package for extensionUtils
This commit is contained in:
@@ -36,8 +36,7 @@ import org.jetbrains.jet.lang.types.JetType
|
|||||||
import org.jetbrains.jet.lang.types.TypeUtils
|
import org.jetbrains.jet.lang.types.TypeUtils
|
||||||
import org.jetbrains.jet.lang.types.checker.JetTypeChecker
|
import org.jetbrains.jet.lang.types.checker.JetTypeChecker
|
||||||
import org.jetbrains.jet.lexer.JetTokens
|
import org.jetbrains.jet.lexer.JetTokens
|
||||||
import org.jetbrains.jet.utils.addIfNotNull
|
import org.jetbrains.jet.plugin.util.substituteExtensionIfCallable
|
||||||
import org.jetbrains.jet.plugin.util.extensionsUtils.substituteExtensionIfCallable
|
|
||||||
|
|
||||||
public class ReferenceVariantsHelper(
|
public class ReferenceVariantsHelper(
|
||||||
private val context: BindingContext,
|
private val context: BindingContext,
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.jet.plugin.completion.smart
|
package org.jetbrains.jet.plugin.util
|
||||||
|
|
||||||
import org.jetbrains.jet.lang.types.JetType
|
import org.jetbrains.jet.lang.types.JetType
|
||||||
import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor
|
import org.jetbrains.jet.lang.descriptors.TypeParameterDescriptor
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jetbrains.jet.plugin.util.extensionsUtils
|
package org.jetbrains.jet.plugin.util
|
||||||
|
|
||||||
import org.jetbrains.jet.lang.descriptors.CallableDescriptor
|
import org.jetbrains.jet.lang.descriptors.CallableDescriptor
|
||||||
import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue
|
import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue
|
|||||||
import org.jetbrains.jet.lang.resolve.calls.smartcasts.DataFlowInfo
|
import org.jetbrains.jet.lang.resolve.calls.smartcasts.DataFlowInfo
|
||||||
import com.intellij.psi.stubs.StringStubIndexExtension
|
import com.intellij.psi.stubs.StringStubIndexExtension
|
||||||
import org.jetbrains.jet.plugin.caches.resolve.ResolutionFacade
|
import org.jetbrains.jet.plugin.caches.resolve.ResolutionFacade
|
||||||
import org.jetbrains.jet.plugin.util.extensionsUtils.substituteExtensionIfCallable
|
import org.jetbrains.jet.plugin.util.substituteExtensionIfCallable
|
||||||
|
|
||||||
public class KotlinIndicesHelper(
|
public class KotlinIndicesHelper(
|
||||||
private val project: Project,
|
private val project: Project,
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ import org.jetbrains.jet.plugin.caches.resolve.ResolutionFacade
|
|||||||
import org.jetbrains.jet.plugin.caches.resolve.resolveToDescriptor
|
import org.jetbrains.jet.plugin.caches.resolve.resolveToDescriptor
|
||||||
import com.intellij.psi.search.GlobalSearchScope
|
import com.intellij.psi.search.GlobalSearchScope
|
||||||
import org.jetbrains.jet.lang.types.typeUtil.isSubtypeOf
|
import org.jetbrains.jet.lang.types.typeUtil.isSubtypeOf
|
||||||
|
import org.jetbrains.jet.plugin.util.FuzzyType
|
||||||
|
import org.jetbrains.jet.plugin.util.fuzzyReturnType
|
||||||
|
|
||||||
trait InheritanceItemsSearcher {
|
trait InheritanceItemsSearcher {
|
||||||
fun search(nameFilter: (String) -> Boolean, consumer: (LookupElement) -> Unit)
|
fun search(nameFilter: (String) -> Boolean, consumer: (LookupElement) -> Unit)
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import org.jetbrains.jet.plugin.util.IdeDescriptorRenderers
|
|||||||
import org.jetbrains.jet.plugin.caches.resolve.ResolutionFacade
|
import org.jetbrains.jet.plugin.caches.resolve.ResolutionFacade
|
||||||
import org.jetbrains.jet.plugin.completion.LookupElementFactory
|
import org.jetbrains.jet.plugin.completion.LookupElementFactory
|
||||||
import org.jetbrains.jet.lang.types.TypeSubstitutor
|
import org.jetbrains.jet.lang.types.TypeSubstitutor
|
||||||
|
import org.jetbrains.jet.plugin.util.fuzzyReturnType
|
||||||
|
|
||||||
// adds java static members, enum members and members from class object
|
// adds java static members, enum members and members from class object
|
||||||
class StaticMembers(
|
class StaticMembers(
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import org.jetbrains.jet.lang.resolve.BindingContext
|
|||||||
import org.jetbrains.jet.plugin.completion.ExpectedInfo
|
import org.jetbrains.jet.plugin.completion.ExpectedInfo
|
||||||
import org.jetbrains.jet.lang.resolve.DescriptorToSourceUtils
|
import org.jetbrains.jet.lang.resolve.DescriptorToSourceUtils
|
||||||
import org.jetbrains.jet.lang.psi.JetFunctionLiteralExpression
|
import org.jetbrains.jet.lang.psi.JetFunctionLiteralExpression
|
||||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor
|
import org.jetbrains.jet.plugin.util.FuzzyType
|
||||||
|
|
||||||
class ThisItems(val bindingContext: BindingContext) {
|
class ThisItems(val bindingContext: BindingContext) {
|
||||||
public fun addToCollection(collection: MutableCollection<LookupElement>, context: JetExpression, expectedInfos: Collection<ExpectedInfo>) {
|
public fun addToCollection(collection: MutableCollection<LookupElement>, context: JetExpression, expectedInfos: Collection<ExpectedInfo>) {
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ import org.jetbrains.jet.plugin.caches.resolve.ResolutionFacade
|
|||||||
import org.jetbrains.jet.lang.types.TypeSubstitutor
|
import org.jetbrains.jet.lang.types.TypeSubstitutor
|
||||||
import java.util.ArrayList
|
import java.util.ArrayList
|
||||||
import java.util.HashMap
|
import java.util.HashMap
|
||||||
|
import org.jetbrains.jet.plugin.util.FuzzyType
|
||||||
|
import org.jetbrains.jet.plugin.util.isNullable
|
||||||
|
import org.jetbrains.jet.plugin.util.makeNotNullable
|
||||||
|
|
||||||
class ArtificialElementInsertHandler(
|
class ArtificialElementInsertHandler(
|
||||||
val textBeforeCaret: String, val textAfterCaret: String, val shortenRefs: Boolean) : InsertHandler<LookupElement>{
|
val textBeforeCaret: String, val textAfterCaret: String, val shortenRefs: Boolean) : InsertHandler<LookupElement>{
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import org.jetbrains.jet.lang.resolve.scopes.DescriptorKindFilter;
|
|||||||
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
||||||
import org.jetbrains.jet.lang.types.expressions.ExpressionTypingComponents;
|
import org.jetbrains.jet.lang.types.expressions.ExpressionTypingComponents;
|
||||||
import org.jetbrains.jet.plugin.caches.resolve.ResolvePackage;
|
import org.jetbrains.jet.plugin.caches.resolve.ResolvePackage;
|
||||||
import org.jetbrains.jet.plugin.util.extensionsUtils.ExtensionsUtilsPackage;
|
import org.jetbrains.jet.plugin.util.UtilPackage;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
@@ -83,7 +83,7 @@ public abstract class BaseJetVariableMacro extends Macro {
|
|||||||
VariableDescriptor variableDescriptor = (VariableDescriptor) declarationDescriptor;
|
VariableDescriptor variableDescriptor = (VariableDescriptor) declarationDescriptor;
|
||||||
|
|
||||||
if (variableDescriptor.getExtensionReceiverParameter() != null
|
if (variableDescriptor.getExtensionReceiverParameter() != null
|
||||||
&& ExtensionsUtilsPackage.substituteExtensionIfCallableWithImplicitReceiver(
|
&& UtilPackage.substituteExtensionIfCallableWithImplicitReceiver(
|
||||||
variableDescriptor, scope, bindingContext, dataFlowInfo).isEmpty()) {
|
variableDescriptor, scope, bindingContext, dataFlowInfo).isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user