Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » WizardDialog's Cancel Button(Cancel button's listener removed during active processes)
WizardDialog's Cancel Button [message #521791] Thu, 18 March 2010 18:04 Go to next message
Dennis Ponos is currently offline Dennis PonosFriend
Messages: 2
Registered: March 2010
Junior Member
When an IRunnableWithProgress runs inside a WizardDialog (for instance, by using the run() method of IWizardContainer), the WizardDialog disables all the GUI components except for the Cancel Button. The WizardDialog also removes the listener from the the Cancel Button for the duration of the active running operation.

So it appears to the user that the active running operation can be canceled, but since the listener was removed, nothing happens.

When the operation finishes, all the GUI components become enabled, and the listener is re-attached to the Cancel button.

Does anyone know why the WizardDialog would keep the Cancel button enabled but remove the listener?

I am finding myself in need of re-implementing the WizardDialog just to keep the listener attached and actually do something when the button is pressed during a running operation. I tried subclassing the WizardDialog and overriding the behavior, but the WizardDialog's attributes are all private w/out accessors so it is making it very difficult to override.



Re: WizardDialog's Cancel Button [message #521804 is a reply to message #521791] Thu, 18 March 2010 18:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Dennis,

I think the idea is that only the progress monitor should be consulted
by the long running task/operation. Unless that operation respects the
cancellation, nothing else ought to be done. It's just a theory though...


Dennis Ponos wrote:
> When an IRunnableWithProgress runs inside a WizardDialog (for
> instance, by using the run() method of IWizardContainer), the
> WizardDialog disables all the GUI components except for the Cancel
> Button. The WizardDialog also removes the listener from the the
> Cancel Button for the duration of the active running operation.
> So it appears to the user that the active running operation can be
> canceled, but since the listener was removed, nothing happens.
> When the operation finishes, all the GUI components become enabled,
> and the listener is re-attached to the Cancel button.
> Does anyone know why the WizardDialog would keep the Cancel button
> enabled but remove the listener?
> I am finding myself in need of re-implementing the WizardDialog just
> to keep the listener attached and actually do something when the
> button is pressed during a running operation. I tried subclassing
> the WizardDialog and overriding the behavior, but the WizardDialog's
> attributes are all private w/out accessors so it is making it very
> difficult to override.
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: WizardDialog's Cancel Button [message #521820 is a reply to message #521804] Thu, 18 March 2010 19:32 Go to previous message
Dennis Ponos is currently offline Dennis PonosFriend
Messages: 2
Registered: March 2010
Junior Member
Hi Ed,

Thanks for replying to my inquiry.

I agree about the progress monitor only being consulted by the long running task/operation. The operation does respect progress monitor cancellation.

One of the issues I'm facing, however, is that there is nothing that the user can do that would set the progress monitor to a canceled state.

And really, it's not that important that the operation gets cancelled. The operations I'm talking about only take a few seconds. What I would like to happen, minimally, is that the WizardDialog "remembers" that the user pressed cancel. So when the task does complete, the dialog will close. But the WizardDialog doesn't even do that. It just "forgets" that the user pressed the Cancel button.



[quote title=Ed Merks wrote on Thu, 18 March 2010 14:43]Dennis,

I think the idea is that only the progress monitor should be consulted
by the long running task/operation. Unless that operation respects the
cancellation, nothing else ought to be done. It's just a theory though...

Previous Topic:Eclipse Plugin Standalone deployment in Linux
Next Topic:How load text into JavaStackTraceConsolePage programmatically?
Goto Forum:
  


Current Time: Fri Apr 26 16:37:31 GMT 2024

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

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

Back to the top