本文整理汇总了Java中com.intellij.psi.PsiNameValuePair.EMPTY_ARRAY属性的典型用法代码示例。如果您正苦于以下问题:Java PsiNameValuePair.EMPTY_ARRAY属性的具体用法?Java PsiNameValuePair.EMPTY_ARRAY怎么用?Java PsiNameValuePair.EMPTY_ARRAY使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.psi.PsiNameValuePair
的用法示例。
在下文中一共展示了PsiNameValuePair.EMPTY_ARRAY属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: annotateMethod
private void annotateMethod(@NotNull PsiMethod method) {
try {
AddAnnotationPsiFix fix = new AddAnnotationPsiFix(myAnnotation, method, PsiNameValuePair.EMPTY_ARRAY, myAnnotationsToRemove);
fix.invoke(method.getProject(), method.getContainingFile(), method, method);
}
catch (IncorrectOperationException e) {
LOG.error(e);
}
}
示例2: ClsAnnotationImpl
public ClsAnnotationImpl(final PsiAnnotationStub stub)
{
super(stub);
myReferenceElement = new AtomicNotNullLazyValue<ClsJavaCodeReferenceElementImpl>()
{
@NotNull
@Override
protected ClsJavaCodeReferenceElementImpl compute()
{
String annotationText = getStub().getText();
int index = annotationText.indexOf('(');
String refText = index > 0 ? annotationText.substring(1, index) : annotationText.substring(1);
return new ClsJavaCodeReferenceElementImpl(ClsAnnotationImpl.this, refText);
}
};
myParameterList = new AtomicNotNullLazyValue<ClsAnnotationParameterListImpl>()
{
@NotNull
@Override
protected ClsAnnotationParameterListImpl compute()
{
PsiNameValuePair[] attrs = getStub().getText().indexOf('(') > 0 ? PsiTreeUtil.getRequiredChildOfType(getStub().getPsiElement(), PsiAnnotationParameterList.class).getAttributes() :
PsiNameValuePair.EMPTY_ARRAY;
return new ClsAnnotationParameterListImpl(ClsAnnotationImpl.this, attrs);
}
};
}
示例3: AddAnnotationFix
public AddAnnotationFix(@NotNull String fqn, @NotNull PsiModifierListOwner modifierListOwner, @NotNull String... annotationsToRemove) {
this(fqn, modifierListOwner, PsiNameValuePair.EMPTY_ARRAY, annotationsToRemove);
}
示例4: annotateMethod
private void annotateMethod(@NotNull PsiMethod method)
{
AddAnnotationPsiFix fix = new AddAnnotationPsiFix(myAnnotation, method, PsiNameValuePair.EMPTY_ARRAY, myAnnotationsToRemove);
fix.invoke(method.getProject(), method.getContainingFile(), method, method);
}
示例5: AddNullableNotNullAnnotationFix
public AddNullableNotNullAnnotationFix(@NotNull String fqn, @NotNull PsiModifierListOwner owner, @NotNull String... annotationToRemove)
{
super(fqn, owner, PsiNameValuePair.EMPTY_ARRAY, annotationToRemove);
}