mattcasters opened a new pull request, #7381:
URL: https://github.com/apache/hop/pull/7381

   # Walkthrough: Select Active File in Explorer Tree
   
   Implemented for issue #7380 : automatic selection of the active file in the 
file explorer tree (`ExplorerPerspective.tree`) on the left hand side when it 
is shown in a tab.
   
   ## Changes Made
   
   ### UI Components
   
   #### 
[ExplorerPerspective.java](file:///home/matt/git/mattcasters/hop/ui/src/main/java/org/apache/hop/ui/hopgui/perspective/explorer/ExplorerPerspective.java)
   
   1. **Hierarchy Check Helper**: Added `isDescendant(String parentPath, String 
childPath)` which standardizes paths and uses VFS `FileName.isDescendent` to 
verify nested file hierarchies.
   2. **Recursive Expansion & Loading**: Refactored `selectInTree(TreeItem, 
String)` to dynamically load children and expand unexpanded folders recursively 
along the path to the selected file, using `TreeMemory` to keep track of folder 
expansions.
   3. **Tab Switch & Focus Hooks**:
      - Added selection checking in `createSingleTabFolder()`'s selection 
listener.
      - Added selection checking in `FocusIn` display filter to ensure the 
correct item is selected when switching panes in split mode or switching editor 
focus.
   4. **Tab Creation Hooks**: Added calls to `selectInTree` at the start and 
end of `addFile()`, `addPipeline()`, and `addWorkflow()` to immediately select 
the newly opened tab's file in the tree.
   
   ## Verification
   
   ### Build Verification
   - Code formatted successfully with spotless: `./mvnw spotless:apply`
   - Build successfully compiles the `ui` module: `./mvnw clean install -pl ui 
-DskipTests`
   


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