junichi11 commented on code in PR #5725:
URL: https://github.com/apache/netbeans/pull/5725#discussion_r1149884110


##########
php/php.editor/test/unit/src/org/netbeans/modules/php/editor/completion/PHPCCDocumentationTest.java:
##########
@@ -354,7 +364,21 @@ public void checkCompletionDocumentation(final String 
file, final String caretLi
     }
 
     private void checkCompletionOnlyDocumentation(String filePath, String 
caretLine) throws Exception {
-        checkCompletionDocumentation(filePath, caretLine, false, "", 
QueryType.DOCUMENTATION);
+        checkCompletionOnlyDocumentation(filePath, caretLine, false);
+    }
+
+    private void checkCompletionOnlyDocumentation(String filePath, String 
caretLine, boolean noDocument) throws Exception {
+        if (!noDocument) {
+            checkCompletionDocumentation(filePath, caretLine, false, "", 
QueryType.DOCUMENTATION);
+        } else {
+            try {
+                checkCompletionDocumentation(filePath, caretLine, false, "", 
QueryType.DOCUMENTATION);
+            } catch (AssertionError ex) {
+                // there is no completion item
+                return;
+            }

Review Comment:
   I wanted to do that. (I was also worried about that.)
   My first idea was to create an empty file if `match` is `null`.
   However, "being not shown documentation" is not  "being shown empty 
documentation", I thought... maybe, although there is no big problem. (Unit 
tests for the other languages may be affected by that change.)
   So, just caught `AssertionError` :) (It seems that `assertNotNull()` are 
only here)
   Do you have any ideas?



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

Reply via email to