Category Archives: Techniques

Confirming cancel in a ProgressMonitorDialog

I’m working on a routine that downloads content from a host to the users desktop.

As the content is being downloaded, a progress dialog is displayed (implemented as ProgressMonitorDialog).

In the progress monitor, the cancel button is enabled.

In the default implementation, if the cancel button is pressed on the ProgressMonitorDialog, the cancel button is disabled.

I wanted to be able to ask the user if they really want to cancel the operation. If they don’t, then continue on with the operation. If they do, then perform the cancellation as usual.

I couldn’t find a straight forward way to implement this with the default operation, so I came up with my own solution…

Continue reading

Related posts ...
In a recent project I had a combo box that I wanted to add additional
Normally, when you view the property pages on Eclipse items, the pages show up in
I'm in the process of updating the help text for my RCP and have found
I had a very frustrating day at work today ... nothing was working right ...

Dynamically populating a Combo based on shift key

In a recent project I had a combo box that I wanted to add additional entries to if they clicked on it with the shift key pressed.

This is to allow to select entries that would not normally be displayed (for example, out dated values that could actually be selected).

To do this, I added key-up & key-down listeners on the Display object and populated the Combo based on the shift key state.
Continue reading

Related posts ...
I'm in the process of updating the help text for my RCP and have found
Normally, when you view the property pages on Eclipse items, the pages show up in
I had a very frustrating day at work today ... nothing was working right ...
It took a bit of experimentation, but I think this routine could be used to

Controlling Property Page Sort Order

Normally, when you view the property pages on Eclipse items, the pages show up in alphabetical order.

Sometimes this isn’t what you want.  While I was working on my RCP project I found the property pages usually didn’t show up in a pleasing order, so had to figure out a way to control the sort order.

Continue reading

Related posts ...
Another item I struggled with ... adding the help icon to various dialogs (wizards, preferences,
I'm in the process of updating the help text for my RCP and have found
I had a very frustrating day at work today ... nothing was working right ...
It took a bit of experimentation, but I think this routine could be used to

Adding Help to Dialogs

I’m in the process of updating the help text for my RCP and have found that some of the dialogs that I’m invoking don’t have the ability to directly add help context id’s.

After a bit of digging, I found it’s not that difficult to add help to an object that extends Dialog.

For this example, I’m going to add a help id to the InputDialog class.

Continue reading

Related posts ...
In a recent project I had a combo box that I wanted to add additional
Normally, when you view the property pages on Eclipse items, the pages show up in
I had a very frustrating day at work today ... nothing was working right ...
It took a bit of experimentation, but I think this routine could be used to