mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
jsr-299 + 330
This commit is contained in:
@@ -128,9 +128,9 @@ public class AnnotationUtil {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static PsiAnnotation[] findAnnotations(final PsiMember psiMember, @NotNull Collection<String> annotationNames) {
|
||||
if (psiMember == null) return PsiAnnotation.EMPTY_ARRAY;
|
||||
final PsiModifierList modifierList = psiMember.getModifierList();
|
||||
public static PsiAnnotation[] findAnnotations(final PsiModifierListOwner modifierListOwner, @NotNull Collection<String> annotationNames) {
|
||||
if (modifierListOwner == null) return PsiAnnotation.EMPTY_ARRAY;
|
||||
final PsiModifierList modifierList = modifierListOwner.getModifierList();
|
||||
if (modifierList == null) return PsiAnnotation.EMPTY_ARRAY;
|
||||
final PsiAnnotation[] annotations = modifierList.getAnnotations();
|
||||
ArrayList<PsiAnnotation> result = null;
|
||||
|
||||
@@ -33,13 +33,13 @@ public class AliasingPsiTarget extends DelegatePsiTarget implements PomRenameabl
|
||||
return setAliasName(newName);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return StringUtil.notNullize(getNameAlias(((PsiNamedElement)getNavigationElement()).getName()));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public AliasingPsiTarget setAliasName(@Nullable String newAliasName) {
|
||||
@NotNull
|
||||
public AliasingPsiTarget setAliasName(@NotNull String newAliasName) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -48,4 +48,9 @@ public class AliasingPsiTarget extends DelegatePsiTarget implements PomRenameabl
|
||||
return delegatePsiTargetName;
|
||||
}
|
||||
|
||||
protected void renameTargets(@NotNull String newDelegateName) {
|
||||
if (!newDelegateName.equals(((PsiNamedElement)getNavigationElement()).getName())) {
|
||||
((PsiNamedElement)getNavigationElement()).setName(newDelegateName);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user