You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/11/15 12:59:41 UTC
[GitHub] [netbeans] ppisl commented on a change in pull request #3316: [NETBEANS-6196] Package code completion doesn't work in empty groovy …
ppisl commented on a change in pull request #3316:
URL: https://github.com/apache/netbeans/pull/3316#discussion_r749305257
##########
File path: groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/completion/KeywordCompletion.java
##########
@@ -98,6 +110,27 @@ public boolean complete(Map<Object, CompletionProposal> proposals, CompletionCon
return true;
}
+ boolean isFirstStatement(final CompletionContext request) {
+ TokenSequence<GroovyTokenId> ts = LexUtilities.getGroovyTokenSequence(request.doc, 1);
+
+ if (ts != null) {
+ ts.move(request.lexOffset);
+ if (ts.movePrevious()) {
+ while (ts.isValid() && ts.movePrevious() && ts.offset() >= 0) {
Review comment:
I wanted to be consistent with the rest of the code. Else this should be changed in more places, not only in my patch.
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists