当前位置: 首页>>代码示例>>Java>>正文


Java DotNetParameterListOwner类代码示例

本文整理汇总了Java中consulo.dotnet.psi.DotNetParameterListOwner的典型用法代码示例。如果您正苦于以下问题:Java DotNetParameterListOwner类的具体用法?Java DotNetParameterListOwner怎么用?Java DotNetParameterListOwner使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DotNetParameterListOwner类属于consulo.dotnet.psi包,在下文中一共展示了DotNetParameterListOwner类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isEqualParameters

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@RequiredReadAction
private static boolean isEqualParameters(Map<String, String> funcParameters, DotNetParameterListOwner parameterListOwner)
{
	DotNetParameter[] parameters = parameterListOwner.getParameters();
	if(parameters.length == 0)
	{
		return true;
	}
	if(parameters.length != funcParameters.size())
	{
		return false;
	}

	int i = 0;
	for(String expectedType : funcParameters.values())
	{
		DotNetParameter parameter = parameters[i++];

		DotNetTypeRef typeRef = UnityFunctionManager.createTypeRef(parameter, expectedType);
		if(!CSharpTypeUtil.isTypeEqual(parameter.toTypeRef(true), typeRef, parameter))
		{
			return false;
		}
	}
	return true;
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:27,代码来源:UnityEventCSharpMethodLineMarkerProvider.java

示例2: compareParameterList

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@RequiredReadAction
private static boolean compareParameterList(@NotNull PsiElement listOwner, @NotNull PsiElement listOwner2, @NotNull PsiElement scope)
{
	DotNetTypeRef[] parameterTypeRefs = ((DotNetParameterListOwner) listOwner).getParameterTypeRefs();
	DotNetTypeRef[] parameterTypeRefs1 = ((DotNetParameterListOwner) listOwner2).getParameterTypeRefs();
	if(parameterTypeRefs.length != parameterTypeRefs1.length)
	{
		return false;
	}

	for(int i = 0; i < parameterTypeRefs.length; i++)
	{
		DotNetTypeRef parameterTypeRef = parameterTypeRefs[i];
		DotNetTypeRef parameterTypeRef1 = parameterTypeRefs1[i];

		if(!CSharpTypeUtil.isTypeEqual(parameterTypeRef, parameterTypeRef1, scope))
		{
			return false;
		}
	}
	return true;
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:23,代码来源:CSharpElementCompareUtil.java

示例3: process

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@RequiredReadAction
@Override
public void process(@NotNull CSharpResolveOptions options,
		@NotNull DotNetGenericExtractor defaultExtractor,
		@Nullable PsiElement forceQualifierElement,
		@NotNull Processor<ResolveResult> processor)
{
	PsiElement element = options.getElement();

	DotNetParameterListOwner parameterListOwner = CSharpReferenceExpressionImplUtil.findParentOrNextIfDoc(element, DotNetParameterListOwner
			.class);
	if(parameterListOwner == null)
	{
		return;
	}

	SimpleNamedScopeProcessor scopeProcessor = new SimpleNamedScopeProcessor(processor, options.isCompletion(),
			ExecuteTarget.LOCAL_VARIABLE_OR_PARAMETER);
	ResolveState state = ResolveState.initial();
	state = state.put(CSharpResolveUtil.SELECTOR, options.getSelector());

	parameterListOwner.processDeclarations(scopeProcessor, state, null, element);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:24,代码来源:ParameterFromParentKindProcessor.java

示例4: buildCallArguments

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@RequiredReadAction
private static List<NCallArgument> buildCallArguments(@NotNull CSharpCallArgument[] callArguments, @NotNull PsiElement callable, @NotNull PsiElement scope)
{
	if(callable instanceof DotNetVariable)
	{
		DotNetTypeRef ref = ((DotNetVariable) callable).toTypeRef(true);
		DotNetTypeResolveResult resolve = ref.resolve();
		if(resolve instanceof CSharpLambdaResolveResult)
		{
			return MethodResolver.buildCallArguments(callArguments, ((CSharpLambdaResolveResult) resolve).getParameterInfos(), scope);
		}
	}
	else if(callable instanceof DotNetParameterListOwner)
	{
		return MethodResolver.buildCallArguments(callArguments, (DotNetParameterListOwner) callable, scope);
	}

	return Collections.emptyList();
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:20,代码来源:CSharpParameterHintsProvider.java

示例5: getInitializer

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@RequiredReadAction
@Nullable
@Override
public DotNetExpression getInitializer()
{
	int index = getIndex();
	if(index == -1)
	{
		return null;
	}
	DotNetParameterListOwner owner = getOwner();
	if(owner instanceof MsilMethodEntry)
	{
		return ((MsilMethodEntry) owner).getConstantValue(index);
	}
	return null;
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:18,代码来源:MsilParameterImpl.java

示例6: MethodParameterResolveContext

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
public MethodParameterResolveContext(DotNetParameterListOwner parameterListOwner, PsiElement scope, boolean resolveFromParent)
{
	myScope = scope;
	myResolveFromParent = resolveFromParent;
	myParameters = parameterListOwner.getParameters();
	myParamsParameter = ArrayUtil.getLastElement(myParameters);
	if(myParamsParameter != null && !myParamsParameter.hasModifier(CSharpModifier.PARAMS))
	{
		myParamsParameter = null;
	}

	myInnerParamsParameterTypeRefValue = NotNullLazyValue.createValue(() -> myParamsParameter == null ? DotNetTypeRef.ERROR_TYPE : CSharpResolveUtil.resolveIterableType(myScope,
			getParamsParameterTypeRef()));
	myParamsParameterTypeRefValue = NotNullLazyValue.createValue(() -> myParamsParameter == null ? DotNetTypeRef.ERROR_TYPE : myParamsParameter.toTypeRef(true));
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:16,代码来源:MethodParameterResolveContext.java

示例7: buildCallArguments

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@NotNull
@RequiredReadAction
public static List<NCallArgument> buildCallArguments(@NotNull CSharpCallArgument[] callArguments,
		@NotNull DotNetParameterListOwner parameterListOwner,
		@NotNull PsiElement scope,
		boolean resolveFromParent)
{
	return buildCallArguments(callArguments, scope, new MethodParameterResolveContext(parameterListOwner, scope, resolveFromParent));
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:10,代码来源:MethodResolver.java

示例8: calc

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@NotNull
@RequiredReadAction
public static MethodCalcResult calc(@NotNull CSharpCallArgument[] callArguments, @NotNull DotNetParameterListOwner parameterListOwner, @NotNull PsiElement scope, boolean resolveFromParent)
{
	List<NCallArgument> list = buildCallArguments(callArguments, parameterListOwner, scope, resolveFromParent);
	return calc(list, scope);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:8,代码来源:MethodResolver.java

示例9: getFirstTypeRefOrParameter

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@NotNull
@RequiredReadAction
private DotNetTypeRef getFirstTypeRefOrParameter(DotNetParameterListOwner owner, DotNetGenericExtractor extractor)
{
	DotNetParameter[] parameters = owner.getParameters();
	assert parameters.length != 0;
	assert parameters[0].hasModifier(CSharpModifier.THIS);
	return GenericUnwrapTool.exchangeTypeRef(parameters[0].toTypeRef(false), extractor, myExpression);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:10,代码来源:ExtensionResolveScopeProcessor.java

示例10: getParametersInfos

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@NotNull
@RequiredReadAction
public static CSharpSimpleParameterInfo[] getParametersInfos(@NotNull DotNetParameterListOwner parameterListOwner)
{
	DotNetParameter[] parameters = parameterListOwner.getParameters();

	CSharpSimpleParameterInfo[] parameterInfos = new CSharpSimpleParameterInfo[parameters.length];
	for(int i = 0; i < parameters.length; i++)
	{
		DotNetParameter parameter = parameters[i];
		parameterInfos[i] = new CSharpSimpleParameterInfo(i, parameter, parameter.toTypeRef(true));
	}
	return parameterInfos;
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:15,代码来源:CSharpLikeMethodDeclarationImplUtil.java

示例11: computeSourcePosition

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@Override
@RequiredDispatchThread
public void computeSourcePosition(@NotNull XNavigatable navigatable)
{
	PsiElement psiElement = DotNetSourcePositionUtil.resolveTargetPsiElement(myDebugContext, myFrame);
	if(psiElement == null)
	{
		return;
	}
	DotNetCodeBlockOwner codeBlockOwner = PsiTreeUtil.getParentOfType(psiElement, DotNetCodeBlockOwner.class);
	if(codeBlockOwner == null)
	{
		return;
	}

	// search parameterlist owner
	DotNetParameterListOwner parameterListOwner = PsiTreeUtil.getParentOfType(codeBlockOwner, DotNetParameterListOwner.class, false);
	if(parameterListOwner == null)
	{
		return;
	}

	DotNetParameter[] psiParameters = parameterListOwner.getParameters();

	DotNetSourceLocation sourceLocation = myFrame.getSourceLocation();
	if(sourceLocation == null)
	{
		return;
	}

	DotNetParameter parameter = psiParameters[myParameter.getIndex()];
	PsiElement nameIdentifier = parameter.getNameIdentifier();
	if(nameIdentifier == null)
	{
		return;
	}
	navigatable.setSourcePosition(XDebuggerUtil.getInstance().createPositionByOffset(parameter.getContainingFile().getVirtualFile(), nameIdentifier.getTextOffset()));
}
 
开发者ID:consulo,项目名称:consulo-dotnet,代码行数:39,代码来源:DotNetMethodParameterValueNode.java

示例12: getOwner

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@Nullable
@Override
public DotNetParameterListOwner getOwner()
{
	return myOriginal.getOwner();
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:7,代码来源:CSharpLightParameter.java

示例13: getOwner

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@Nullable
@Override
public DotNetParameterListOwner getOwner()
{
	return myMethod;
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:7,代码来源:CSharpLightParameterBuilder.java

示例14: getOwner

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@Nullable
@Override
public DotNetParameterListOwner getOwner()
{
	return PsiTreeUtil.getParentOfType(this, DotNetParameterListOwner.class);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:7,代码来源:CSharpParameterImpl.java

示例15: getOwner

import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@Nullable
@Override
public DotNetParameterListOwner getOwner()
{
	return getStubOrPsiParentOfType(DotNetLikeMethodDeclaration.class);
}
 
开发者ID:consulo,项目名称:consulo-csharp,代码行数:7,代码来源:CSharpStubParameterImpl.java


注:本文中的consulo.dotnet.psi.DotNetParameterListOwner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。