本文整理匯總了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;
}