| [news.eclipse.platform] Re: SelectionAction.dispose |
Hello Paul
Thanks for your help.
Upkar.
Paul Webster wrote:
Upkar Lidder wrote:Hello,
I did not find a jface group and so posting here.
This is the correct group.
I have an action (MyAction.java) that inherits from SelectionAction. MyAction uses dynamic images to set the imageDescriptor of the action. I am disposing off this image in the dispose method as follows:
Are you creating an ImageDescriptor from an Image? Or just providing multiple ImageDescriptors to you action?
Normally, IActions don't have that kind of lifecycle (i.e. actions aren't disposed). When added to menus or toolbars, the ActionContributionItem asks for the Image from the ImageDescriptor, and the ActionContributionItem is disposed with the Manager. Certain specific kinds of actions can have dispose methods, like IWorkbenchAction, but they depend on specific parts of the code (like the WorkbenchWindow or ContributionManager) to dispose them.
Later, PW