/* (non-Javadoc)
* @see org.eclipse.ui.part.PageBookView#doDestroyPage(org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.part.PageBookView.PageRec)
*/
protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
IConsole console = (IConsole)fPartToConsole.get(part);
// dispose page participants
ListenerList listeners = (ListenerList) fConsoleToPageParticipants.remove(console);
if (listeners != null) {
Object[] participants = listeners.getListeners();
for (int i = 0; i < participants.length; i++) {
final IConsolePageParticipant participant = (IConsolePageParticipant) participants[i];
SafeRunner.run(new ISafeRunnable() {
public void run() throws Exception {
participant.dispose();
}
public void handleException(Throwable exception) {
ConsolePlugin.log(exception);
}
});
}
}
IPage page = pageRecord.page;
page.dispose();
pageRecord.dispose();
console.removePropertyChangeListener(this);
// empty cross-reference cache
fPartToConsole.remove(part);
fConsoleToPart.remove(console);
if (fPartToConsole.isEmpty()) {