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

   When invoking "Close All" on a tab, some tabs may pop up confirmation 
dialogs asking whether their work should be saved or not. Pressing the "Cancel" 
button in any dialog, as opposed to "Save" or "Discard", should stop showing 
further dialogs, and stop the overall operation. This was not previously done. 
(In some cases, a bunch of dialogs would be shown on top of each other 
simultaneously, creating visual artifacts.)
   
   This change was made to the Close All and Close Other actions, as well as 
for the newly introduced "Close whole documents list at once" button in the 
document list dropdown (PR #4792).
   
   In a [previous discussion](https://github.com/apache/netbeans/pull/4792), it 
was suggested to make the whole operation atomic (i.e. don't close any tabs at 
all if the user presses Cancel after several tabs have already been iterated), 
but this is not possible given the existing APIs. (We don't know if Cancel was 
pressed until TopComponent.close() was called.) Moreover, the behavior 
implemented in this PR is more standard in any case; it matches the behavior in 
e.g. Photoshop and VSCode.
   
   It was also suggested to implement similar behavior in the save prompt that 
shows up when exiting the IDE, but this is a rather different operation that 
does not actually close any tabs (they remain "open" and persisted for the next 
time the IDE starts). I'm not quite sure how to improve it; it might require 
more discussion. See the "Savable" API and the o.n.core.ExitDialog class.
   
   I would also have liked to focus each TopComponent in turn when prompts to 
save come up, but this is a bit more work due to the various levels of 
abstractions involved. More work on this can be done later. See 
MultiViewFactory.resolveCloseOperation for a relevant starting point.


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