File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,22 @@ public void run() {
404404 completeMarkerAnnotation (completeAfter );
405405 suggestDefaultCompletions = false ;
406406 }
407+ if (context .getLocationInParent () == MemberValuePair .NAME_PROPERTY && context .getParent () instanceof MemberValuePair memberValuePair ) {
408+ Set <String > names = new HashSet <>();
409+ if (memberValuePair .getParent () instanceof NormalAnnotation normalAnnotation ) {
410+ for (Object o : normalAnnotation .values ()) {
411+ if (o instanceof MemberValuePair other && other != memberValuePair ) {
412+ names .add (other .getName ().getIdentifier ());
413+ }
414+ }
415+ }
416+ Arrays .stream (((Annotation )memberValuePair .getParent ()).resolveTypeBinding ().getDeclaredMethods ()) //
417+ .filter (this ::isVisible ) //
418+ .filter (method -> !names .contains (method .getName ()))
419+ .map (this ::toAnnotationAttributeRefProposal ) //
420+ .forEach (this .requestor ::accept );
421+ suggestDefaultCompletions = false ;
422+ }
407423 if (context .getParent () instanceof MemberValuePair ) {
408424 // TODO: most of the time a constant value is expected,
409425 // however if an enum is expected, we can build out the completion for that
You can’t perform that action at this time.
0 commit comments