本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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();
}
示例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;
}
示例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));
}
示例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));
}
示例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);
}
示例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);
}
示例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;
}
示例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()));
}
示例12: getOwner
import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@Nullable
@Override
public DotNetParameterListOwner getOwner()
{
return myOriginal.getOwner();
}
示例13: getOwner
import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@Nullable
@Override
public DotNetParameterListOwner getOwner()
{
return myMethod;
}
示例14: getOwner
import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@Nullable
@Override
public DotNetParameterListOwner getOwner()
{
return PsiTreeUtil.getParentOfType(this, DotNetParameterListOwner.class);
}
示例15: getOwner
import consulo.dotnet.psi.DotNetParameterListOwner; //导入依赖的package包/类
@Nullable
@Override
public DotNetParameterListOwner getOwner()
{
return getStubOrPsiParentOfType(DotNetLikeMethodDeclaration.class);
}