Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Clear selection in ObjectPluginAction class when part is closed
Clear selection in ObjectPluginAction class when part is closed [message #797693] Mon, 13 February 2012 15:12
Wei Liu is currently offline Wei Liu
Messages: 3
Registered: July 2009
Junior Member
Hi,

We found that the selection in ObjectPluginAction class still references a model objects when the model is closed. We are wondering if it's a good idea to set empty selection in the partClosed method:

public void partClosed(IWorkbenchPartReference partRef) {
if (activePart != null && partRef.getPart(false) == activePart) {
selectionChanged(StructuredSelection.EMPTY);
disposeDelegate();
activePart = null;
}
// avoid memory leaks - OK?
super.selectionChanged(StructuredSelection.EMPTY);
}
Previous Topic:Mac style top menu bar
Next Topic:Event and notification for stop of extension plugins
Goto Forum:
  


Current Time: Wed Jul 30 23:23:26 EDT 2014

Powered by FUDForum. Page generated in 0.01901 seconds