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 2019/10/18 13:15:56 UTC

[GitHub] [netbeans] sdedic commented on a change in pull request #1570: [NETBEANS-3202] Fix issue in Text Block

sdedic commented on a change in pull request #1570: [NETBEANS-3202] Fix issue in Text Block
URL: https://github.com/apache/netbeans/pull/1570#discussion_r336482976
 
 

 ##########
 File path: java/java.editor/src/org/netbeans/modules/editor/java/TypingCompletion.java
 ##########
 @@ -547,6 +547,11 @@ static boolean posWithinString(Document doc, int caretOffset) {
         return posWithinQuotes(doc, caretOffset, JavaTokenId.STRING_LITERAL);
     }
     
+ static boolean posWithinTextBlock(Document doc, int caretOffset) {
+        TokenSequence<JavaTokenId> javaTS=javaTokenSequence(doc,caretOffset, false);
+        javaTS.movePrevious();
 
 Review comment:
   check if `javaTS` is not null and that `javaTS.movePrevious` actually didn't return `false` (there would be no token for `javaTS.token()`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
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