junichi11 commented on code in PR #4169:
URL: https://github.com/apache/netbeans/pull/4169#discussion_r890625299
##########
php/php.editor/src/org/netbeans/modules/php/editor/completion/PHPCodeCompletion.java:
##########
@@ -1482,6 +1482,20 @@ public boolean isAccepted(PhpElement element) {
// XXX currently, only when mixins are used
directly in the class. should support all cases?
accessibleTypeMembers.addAll(request.index.getAccessibleMixinTypeMembers(typeScope,
enclosingType));
}
+ } else if (typeScope instanceof EnumElement) {
+ // add methods of BackedEnum/UnitEnum interface
+ EnumElement enumElement = (EnumElement) typeScope;
+ String enumInterfaceName =
enumElement.getBackingType() != null ? "\\BackedEnum" : "\\UnitEnum"; // NOI18N
+ final NameKind nameQuery =
NameKind.exact(QualifiedName.create(enumInterfaceName));
+ Set<InterfaceElement> enums =
request.index.getInterfaces(nameQuery);
+ for (InterfaceElement backedEnum : enums) {
+
accessibleTypeMembers.addAll(request.index.getAccessibleTypeMembers(backedEnum,
backedEnum));
+ }
+ if (enumElement.getBackingType() != null
+ &&
!enumElement.getBackingType().toString().isEmpty()
Review Comment:
Will fix it. Thank you!
--
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