amondel2 commented on code in PR #432:
URL: 
https://github.com/apache/grails-intellij-plugin/pull/432#discussion_r4191362908


##########
plugin/src/main/java/org/apache/grails/intellij/plugin/projectView/impl/Grails3NodeProvider.java:
##########
@@ -63,8 +78,21 @@ public class Grails3NodeProvider implements 
GrailsViewNodeProvider {
 
     PsiDirectory src = GrailsViewItems.findPsiDirectory(application, "src");
     if (src != null) {
-      PsiFileSystemItemFilter filter = item -> !specialDirs.contains(item) && 
GrailsViewItems.shouldShowItem(item);
+      List<PsiDirectory> testDirs = findTestSourceDirectories(src);
+      // Directories that get their own node, so src can refuse to claim them. 
PsiDirectoryNode.contains()
+      // only applies a node's filter to the file and its immediate parent, so 
hiding the directories from

Review Comment:
   Fixed in `e1ad4a0`. Corrected — `contains()` applies the filter to the file 
itself only, calling `findFile`/`findDirectory` on the same `VirtualFile`, 
never to its parent.
   
   Your conclusion was right and stayed: hiding a directory doesn't stop the 
node claiming what's under it, which is exactly why the ancestor check is 
required. The `isAncestor(dir, dir, false)` note covering the directories 
themselves is unchanged too.



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

Reply via email to