mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 07:40:42 +07:00
delegate: copy annotations with all args
This commit is contained in:
@@ -164,17 +164,16 @@ public class GenerateDelegateHandler implements LanguageCodeInsightActionHandler
|
||||
stmt = (PsiStatement)CodeStyleManager.getInstance(psiManager.getProject()).reformat(stmt);
|
||||
method.getBody().add(stmt);
|
||||
|
||||
for (PsiAnnotation annotation : methodCandidate.getElement().getModifierList().getAnnotations()) {
|
||||
method.getModifierList().add(annotation.copy());
|
||||
}
|
||||
|
||||
if (isMethodStatic || modifierList != null && modifierList.hasModifierProperty(PsiModifier.STATIC)) {
|
||||
PsiUtil.setModifierProperty(method, PsiModifier.STATIC, true);
|
||||
}
|
||||
|
||||
PsiUtil.setModifierProperty(method, PsiModifier.PUBLIC, true);
|
||||
|
||||
final Project project = method.getProject();
|
||||
for (PsiAnnotation annotation : methodCandidate.getElement().getModifierList().getAnnotations()) {
|
||||
OverrideImplementUtil.annotate(method, annotation.getQualifiedName());
|
||||
}
|
||||
|
||||
final PsiClass targetClass = ((PsiMember)target).getContainingClass();
|
||||
LOG.assertTrue(targetClass != null);
|
||||
PsiMethod overridden = targetClass.findMethodBySignature(method, true);
|
||||
|
||||
Reference in New Issue
Block a user