mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'master' of git@git.labs.intellij.net:idea/community
This commit is contained in:
@@ -484,6 +484,8 @@
|
||||
serviceImplementation="com.intellij.openapi.graph.impl.builder.util.CustomGraphActionsFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.graph.GraphPeerFactory"
|
||||
serviceImplementation="com.intellij.openapi.graph.impl.GraphPeerFactoryImpl"/>
|
||||
<applicationService serviceInterface="com.intellij.openapi.graph.GraphSvgExporter"
|
||||
serviceImplementation="com.intellij.openapi.graph.impl.GraphSvgExporterImpl"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.openapi.graph.builder.GraphBuilderFactory"
|
||||
serviceImplementation="com.intellij.openapi.graph.impl.builder.GraphBuilderFactoryImpl"/>
|
||||
|
||||
@@ -66,21 +66,18 @@ public class GppTypeConverter extends GrTypeConverter {
|
||||
public Boolean isConvertible(@NotNull PsiType lType, @NotNull PsiType rType, @NotNull GroovyPsiElement context) {
|
||||
if (rType instanceof GrTupleType) {
|
||||
final PsiType type = PsiUtil.extractIterableTypeParameter(lType, false);
|
||||
if (type != null && !TypesUtil.isAssignable(type, ((GrTupleType)rType).getParameters()[0], context)) {
|
||||
return null;
|
||||
}
|
||||
final PsiType[] componentTypes = ((GrTupleType)rType).getComponentTypes();
|
||||
if (type == null || TypesUtil.isAssignable(type, ((GrTupleType)rType).getParameters()[0], context)) {
|
||||
final PsiType[] componentTypes = ((GrTupleType)rType).getComponentTypes();
|
||||
|
||||
final PsiType expectedComponent = PsiUtil.extractIterableTypeParameter(lType, false);
|
||||
if (expectedComponent != null && hasDefaultConstructor(lType)) {
|
||||
return true;
|
||||
}
|
||||
final PsiType expectedComponent = PsiUtil.extractIterableTypeParameter(lType, false);
|
||||
if (expectedComponent != null && hasDefaultConstructor(lType)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (lType instanceof PsiClassType && hasConstructor((PsiClassType)lType, componentTypes, context)) {
|
||||
return true;
|
||||
if (lType instanceof PsiClassType && hasConstructor((PsiClassType)lType, componentTypes, context)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
else if (rType instanceof GrMapType) {
|
||||
final PsiType lKeyType = PsiUtil.substituteTypeParameter(lType, CommonClassNames.JAVA_UTIL_MAP, 0, false);
|
||||
@@ -94,8 +91,6 @@ public class GppTypeConverter extends GrTypeConverter {
|
||||
if (hasDefaultConstructor(lType)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
else if (rType instanceof GrClosureType) {
|
||||
final PsiType[] methodParameters = GppClosureParameterTypeProvider.findSingleAbstractMethodSignature(lType);
|
||||
@@ -103,10 +98,8 @@ public class GppTypeConverter extends GrTypeConverter {
|
||||
if (methodParameters != null && GrClosureSignatureUtil.isSignatureApplicable(signature, methodParameters, context)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user