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/06/11 14:32:20 UTC

[GitHub] [netbeans] sdedic commented on a change in pull request #1295: Using SourceFile attribute when indexing

sdedic commented on a change in pull request #1295: Using SourceFile attribute when indexing
URL: https://github.com/apache/netbeans/pull/1295#discussion_r292484273
 
 

 ##########
 File path: java/java.source.base/src/org/netbeans/modules/java/source/indexing/JavaCustomIndexer.java
 ##########
 @@ -189,7 +193,17 @@ protected void index(final Iterable<? extends Indexable> files, final Context co
                     at = 0;
                     for (URL singleBinaryRoot : binaryRoots) {
                         FileObject singleBinaryRootFo = binaryRootsFo[at++];
-                        JavaBinaryIndexer.doIndex(context, singleBinaryRoot);
+                       JavaBinaryIndexer.doIndex(context, singleBinaryRoot, (cf) -> {
+                            String src = cf.getSourceFileName();
+                            if (src != null) {
+                                String srcName = src.substring(src.lastIndexOf(File.separatorChar) + 1);
+                                if (!shortNames.contains(srcName)) {
 
 Review comment:
   Just `return shortNames.contains(srcName)` ?
   

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