yasmramos opened a new pull request, #9047:
URL: https://github.com/apache/netbeans/pull/9047

   ## Summary
   
   This PR fixes Bug #9033 by enhancing the Java file detection in the Find in 
Projects feature.
   
   ## Problem
   
   Java files were not automatically detected in Find in Projects 
functionality, creating a regression in NetBeans 28.
   
   ## Solution
   
   Enhanced the `isPrimaryFile()` method in `VisibilityFilter.java` with a 
three-tier detection strategy:
   
   1. **DataObject primary file check**: Original logic preserved
   2. **MIME type verification**: Check for `text/x-java` MIME type  
   3. **File extension validation**: Verify `.java` extension
   
   ## Changes Made
   
   - Modified: 
`platform/api.search/src/org/netbeans/spi/search/impl/VisibilityFilter.java`
   - Enhanced isPrimaryFile() method with robust detection logic
   - Maintains backward compatibility
   
   ## Testing
   
   - Java files are now correctly detected in Find in Projects
   - Existing functionality remains unchanged
   - No regression in other file type detection
   
   ## References
   
   - Bug Report: #9033
   - Issue: Java files not automatically detected in Find in Projects


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