Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » postExecuteSuccess fires when saveAs is cancelled(How best to spot when a user has cancelled a saveAs operation from an execution listener)
postExecuteSuccess fires when saveAs is cancelled [message #1288101] Tue, 08 April 2014 09:24
Roy Stoliday is currently offline Roy StolidayFriend
Messages: 6
Registered: December 2013
Junior Member
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?
Previous Topic:jFrame
Next Topic:Re: Need help configuring Hudson for SSL with Git/Gerrit
Goto Forum:
  


Current Time: Thu Apr 25 23:42:56 GMT 2024

Powered by FUDForum. Page generated in 0.07753 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top