|postExecuteSuccess fires when saveAs is cancelled [message #1288101]
||Tue, 08 April 2014 09:24
| Roy Stoliday
Registered: December 2013
We have added a command execution listener to the FILE_SAVE_AS command (via the command service). This was done in the creation of a view.|
We are overriding the performSaveAs method of our TextEditor.
If the user chooses to cancel the operation, we call the setCancelled(true) method of the progressMonitor that is passed into this method, and return immediately. I understand that is what is required to notify Eclipse that the operation has been cancelled.
Despite this, the postExecuteSuccess method of the command execution listener is called.
I didn't expect this method to fire given that the user cancelled the operation.
If this is not considered a bug, in this situation, what would be the correct way to determine that the user cancelled the operation in the execution listener? Would I need to add a State object to the command to achieve this?
Powered by FUDForum
. Page generated in 0.02626 seconds