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/05/17 14:15:51 UTC
[GitHub] [netbeans] dbalek commented on a change in pull request #2950: LSP: Find usages should search also in project dependecies.
dbalek commented on a change in pull request #2950:
URL: https://github.com/apache/netbeans/pull/2950#discussion_r633569876
##########
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:
Unit test added.
--
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
---------------------------------------------------------------------
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