### Eclipse Workspace Patch 1.0 #P org.eclipse.compare Index: compare/org/eclipse/compare/internal/CompareEditor.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareEditor.java,v retrieving revision 1.32 diff -u -r1.32 CompareEditor.java --- compare/org/eclipse/compare/internal/CompareEditor.java 30 Mar 2006 10:24:27 -0000 1.32 +++ compare/org/eclipse/compare/internal/CompareEditor.java 10 May 2006 18:22:23 -0000 @@ -130,6 +130,15 @@ IEditorInput oldInput= getEditorInput(); if (oldInput instanceof IPropertyChangeNotifier) ((IPropertyChangeNotifier)input).removePropertyChangeListener(fPropertyChangeListener); + + ISaveablesLifecycleListener lifecycleListener = null; + if (oldInput != null) { + lifecycleListener = (ISaveablesLifecycleListener) getSite() + .getService(ISaveablesLifecycleListener.class); + lifecycleListener.handleLifecycleEvent(new SaveablesLifecycleEvent( + this, SaveablesLifecycleEvent.POST_CLOSE, getSaveables(), + false)); + } super.setInput(input); @@ -154,6 +163,11 @@ } firePropertyChange(IWorkbenchPartConstants.PROP_INPUT); + + if (lifecycleListener != null) { + lifecycleListener.handleLifecycleEvent(new SaveablesLifecycleEvent(this, + SaveablesLifecycleEvent.POST_OPEN, getSaveables(), false)); + } } public IActionBars getActionBars() {