nadment opened a new issue, #5985:
URL: https://github.com/apache/hop/issues/5985

   ### What needs to happen?
   
   When changing projects, the Explorer and Metadata perspectives are refreshed 
as many times as there are tabs open in those views.
   
   To speed up project switching, add a boolean to the HopGuiFileDelegate class 
to indicate whether the GUI is in the process of closing all files.
   
   ```
    public void closeAllFiles() {
       this.isClosing = true;
       for (IHopPerspective perspective : 
hopGui.getPerspectiveManager().getPerspectives()) {
         List<TabItemHandler> tabItemHandlers = perspective.getItems();
          for (TabItemHandler tabItemHandler : handlers) {
             IHopFileTypeHandler typeHandler = tabItemHandler.getTypeHandler();
             typeHandler.close();
           }      
       }
       this.isClosing = false;
     }
   ```
   
   This way, when each tab is removed, unnecessary refreshing can be avoided.
   
   ```
   public boolean remove(IHopFileTypeHandler fileTypeHandler) {
   ...
        // Avoid refresh in a closing process (when switching project)
        if (!hopGui.fileDelegate.isClosing()) {
   
               // Refresh tree to remove bold
               this.refresh();
   
               // Update HopGui menu and toolbar
               this.updateGui();
             }
      ...
   }
   ```
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Hop Gui


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