JaroslavTulach commented on a change in pull request #2950:
URL: https://github.com/apache/netbeans/pull/2950#discussion_r632643244



##########
File path: 
java/java.source.base/src/org/netbeans/api/java/source/SourceUtils.java
##########
@@ -834,7 +835,17 @@ public ClasspathInfo getClasspathInfo() {
     }
         
     //Helper methods
-    
+
+    /**
+     * Returns true if the given file is a class file
+     * @param file
+     * @return true if the given file is a class file
+     * @since 2.51
+     */
+    public static boolean isClassFile(@NonNull final FileObject file) {
+        return FileObjects.CLASS.equals(file.getExt()) || 
ClassParser.MIME_TYPE.equals(file.getMIMEType(ClassParser.MIME_TYPE));

Review comment:
       Possibly add a unit test.

##########
File path: 
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/Server.java
##########
@@ -123,6 +123,7 @@ public static boolean 
isClientResponseThread(NbCodeLanguageClient client) {
     }
     
     public static NbLspServer launchServer(Pair<InputStream, OutputStream> io, 
LspSession session) {
+        
System.setProperty("org.netbeans.modules.java.source.usages.BinaryAnalyser.fullIndex",
 "true");

Review comment:
       I am not sure what is this, but if we want to configure behavior of some 
other module, we should do it via branding API, not system property.




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

Reply via email to