Skip to main content



      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 14:04 Go to next message
Eclipse UserFriend
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 14:43 Go to previous messageGo to next message
Eclipse UserFriend
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.
>
>
>
Re: WizardDialog's Cancel Button [message #521820 is a reply to message #521804] Thu, 18 March 2010 15:32 Go to previous message
Eclipse UserFriend
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 Jun 20 22:50:10 EDT 2025

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

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

Back to the top