Chris2011 commented on code in PR #4649:
URL: https://github.com/apache/netbeans/pull/4649#discussion_r976132889
##########
ide/html.editor/src/org/netbeans/modules/html/editor/completion/HtmlCompletionProvider.java:
##########
@@ -386,7 +386,16 @@ public void run() {
} else {
ts.move(dotPos - 1);
if (ts.moveNext() || ts.movePrevious()) {
- if (ts.token().id() ==
HTMLTokenId.TAG_CLOSE_SYMBOL && !CharSequenceUtilities.equals("/>",
ts.token().text())) {
+ if (!CharSequenceUtilities.equals("/>",
ts.token().text()) && null != LexerUtils.followsToken(ts, HTMLTokenId.TAG_OPEN,
true, false,
+ HTMLTokenId.ARGUMENT,
+ HTMLTokenId.VALUE,
+ HTMLTokenId.VALUE_CSS,
+ HTMLTokenId.VALUE_JAVASCRIPT,
+ HTMLTokenId.OPERATOR,
+ HTMLTokenId.WS,
+ HTMLTokenId.EL_CLOSE_DELIMITER,
+ HTMLTokenId.EL_CONTENT,
+ HTMLTokenId.EL_OPEN_DELIMITER)) {
Review Comment:
Shouldn't it be null !=... I thought it gives you the closing tag back, if
the method finds it? But in general you are right, less checks etc. seems more
performant and cleaner.
--
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