本文整理汇总了Java中consulo.dotnet.psi.DotNetVariable.toTypeRef方法的典型用法代码示例。如果您正苦于以下问题:Java DotNetVariable.toTypeRef方法的具体用法?Java DotNetVariable.toTypeRef怎么用?Java DotNetVariable.toTypeRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类consulo.dotnet.psi.DotNetVariable
的用法示例。
在下文中一共展示了DotNetVariable.toTypeRef方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getParametersForLookup
import consulo.dotnet.psi.DotNetVariable; //导入方法依赖的package包/类
@Nullable
@Override
@RequiredReadAction
public ItemToShow[] getParametersForLookup(LookupElement item, ParameterInfoContext context)
{
Object object = item.getObject();
if(object instanceof DotNetLikeMethodDeclaration)
{
return new ItemToShow[]{new ItemToShow((CSharpSimpleLikeMethod) object, context.getFile())};
}
if(object instanceof DotNetVariable)
{
DotNetVariable variable = (DotNetVariable) object;
DotNetTypeRef dotNetTypeRef = variable.toTypeRef(tracksParameterIndex());
DotNetTypeResolveResult typeResolveResult = dotNetTypeRef.resolve();
if(typeResolveResult instanceof CSharpLambdaResolveResult)
{
return new ItemToShow[]{new ItemToShow((CSharpSimpleLikeMethod) typeResolveResult, variable)};
}
}
return ItemToShow.EMPTY_ARRAY;
}
示例2: getVariables
import consulo.dotnet.psi.DotNetVariable; //导入方法依赖的package包/类
@Nullable
@Override
protected PsiElement[] getVariables(Expression[] params, ExpressionContext context)
{
final PsiElement psiElementAtStartOffset = context.getPsiElementAtStartOffset();
if(psiElementAtStartOffset == null)
{
return PsiElement.EMPTY_ARRAY;
}
List<DotNetVariable> variables = CSharpLiveTemplateMacroUtil.resolveAllVariables(context.getPsiElementAtStartOffset());
List<DotNetVariable> list = new SmartList<DotNetVariable>();
for(DotNetVariable variable : variables)
{
DotNetTypeRef typeRefOfVariable = variable.toTypeRef(true);
if(CSharpTypeDeclarationImplUtil.isInheritOrSelf(typeRefOfVariable, psiElementAtStartOffset, ourAcceptableTypes))
{
list.add(variable);
}
}
return list.toArray(new PsiElement[list.size()]);
}
示例3: getVariables
import consulo.dotnet.psi.DotNetVariable; //导入方法依赖的package包/类
@Nullable
@Override
protected PsiElement[] getVariables(Expression[] params, ExpressionContext context)
{
final PsiElement psiElementAtStartOffset = context.getPsiElementAtStartOffset();
if(psiElementAtStartOffset == null)
{
return PsiElement.EMPTY_ARRAY;
}
List<DotNetVariable> variables = CSharpLiveTemplateMacroUtil.resolveAllVariables(context.getPsiElementAtStartOffset());
List<DotNetVariable> list = new SmartList<DotNetVariable>();
for(DotNetVariable variable : variables)
{
DotNetTypeRef typeRefOfVariable = variable.toTypeRef(true);
if(CSharpTypeDeclarationImplUtil.isInheritOrSelf(typeRefOfVariable, psiElementAtStartOffset, DotNetTypes2.System.Collections.Generic
.IList$1))
{
list.add(variable);
}
}
return list.toArray(new PsiElement[list.size()]);
}
示例4: getVariables
import consulo.dotnet.psi.DotNetVariable; //导入方法依赖的package包/类
@Nullable
@Override
protected PsiElement[] getVariables(Expression[] params, ExpressionContext context)
{
final PsiElement psiElementAtStartOffset = context.getPsiElementAtStartOffset();
if(psiElementAtStartOffset == null)
{
return PsiElement.EMPTY_ARRAY;
}
List<DotNetVariable> variables = CSharpLiveTemplateMacroUtil.resolveAllVariables(context.getPsiElementAtStartOffset());
List<DotNetVariable> list = new SmartList<DotNetVariable>();
for(DotNetVariable variable : variables)
{
DotNetTypeRef typeRefOfVariable = variable.toTypeRef(true);
if(typeRefOfVariable instanceof CSharpArrayTypeRef && ((CSharpArrayTypeRef) typeRefOfVariable).getDimensions() == 0)
{
list.add(variable);
}
}
return list.toArray(new PsiElement[list.size()]);
}
示例5: resolveLeftLambdaTypeRefForVariable
import consulo.dotnet.psi.DotNetVariable; //导入方法依赖的package包/类
@Nullable
@RequiredReadAction
public static CSharpLambdaResolveResult resolveLeftLambdaTypeRefForVariable(DotNetVariable variable)
{
DotNetTypeRef leftTypeRef = variable.toTypeRef(false);
DotNetTypeResolveResult typeResolveResult = leftTypeRef.resolve();
return typeResolveResult instanceof CSharpLambdaResolveResult ? (CSharpLambdaResolveResult) typeResolveResult : null;
}