dbalek commented on a change in pull request #36:
URL: https://github.com/apache/netbeans-html4j/pull/36#discussion_r647302041
##########
File path:
boot/src/main/java/org/netbeans/html/boot/impl/JavaScriptProcesor.java
##########
@@ -234,18 +235,127 @@ private boolean verifyResourceAtPath(final String res,
StandardLocation location
public Iterable<? extends Completion> getCompletions(Element e,
AnnotationMirror annotation, ExecutableElement member, String userText
) {
+ if (e.getKind() == ElementKind.METHOD &&
member.getSimpleName().contentEquals("args")) { // NOI18N
+ return argsCompletion(e);
+ }
+ if (e.getKind() == ElementKind.METHOD &&
member.getSimpleName().contentEquals("body")) { // NOI18N
+ return bodyCompletion(e, userText);
+ }
+ return null;
Review comment:
Better to return an empty iterable than `null` as suggested by
https://docs.oracle.com/javase/7/docs/api/javax/annotation/processing/Processor.html#getCompletions(javax.lang.model.element.Element,%20javax.lang.model.element.AnnotationMirror,%20javax.lang.model.element.ExecutableElement,%20java.lang.String)
--
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.
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