dbalek commented on code in PR #9260:
URL: https://github.com/apache/netbeans/pull/9260#discussion_r3026806748
##########
java/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java:
##########
@@ -4088,6 +4102,9 @@ private void addMembers(final Env env, final TypeMirror
type, final Element elem
ElementUtilities.ElementAcceptor acceptor = new
ElementUtilities.ElementAcceptor() {
@Override
public boolean accept(Element e, TypeMirror t) {
+ if (!(env.getExcludes() == null ||
!env.getExcludes().contains(e))) {
Review Comment:
Maybe `if (env.getExcludes() != null && env.getExcludes().contains(e))`
would be easier to read, but otherwise OK.
##########
java/java.completion/src/org/netbeans/modules/java/completion/JavaCompletionTask.java:
##########
@@ -4889,6 +4906,7 @@ private void addAttributeValues(Env env, Element element,
AnnotationMirror annot
CharSequence fqn = ((TypeElement) ((DeclaredType)
type).asElement()).getQualifiedName();
if (JAVA_LANG_CLASS.contentEquals(fqn)) {
String name = value.endsWith(".class") ?
value.substring(0, value.length() - 6) : value; //NOI18N
+ //NOTE: for annotations, not sure if keeping this is
not more sensible. Can annotations realistically use local classes as attribute
values?
Review Comment:
I would use the method variant with Scope as the second parameter. I can
hypotethically imagine a type annotation having a local class as an attribute
value.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists