I need to have some action performed when \"Save All\" button is pressed. If I subscribe to DocumentSaved
event that event is invoked once for each unsaved document
You can subscribe to the command execution events with the following code:
events = dte.Events;
commandEvents = events.get_CommandEvents(null, 0);
commandEvents.AfterExecute += OnAfterExecute;
In your OnAfterExecute handler you can check if it is the File.SaveAll command: VSConstants.VSStd97CmdID.SaveSolution.