From 0533d620d41dda0cddc8699028d6f6cec508dbad Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Tue, 29 Apr 2003 18:42:18 +0000 Subject: [PATCH] disconnect() from the working copy manager. --- .../cdt/debug/internal/ui/editors/CDebugEditor.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/CDebugEditor.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/CDebugEditor.java index 691ead0b266..4ed8ac7c339 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/CDebugEditor.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/CDebugEditor.java @@ -390,8 +390,18 @@ public class CDebugEditor extends CEditor { newInput = ((EditorInputDelegate)input).getDelegate(); } + IEditorInput oldInput = getEditorInput(); + if ( oldInput instanceof EditorInputDelegate ) + { + oldInput = ((EditorInputDelegate)oldInput).getDelegate(); + } + if (oldInput != null) + { + CUIPlugin.getDefault().getWorkingCopyManager().disconnect(oldInput); + } super.doSetInput( newInput ); - CUIPlugin.getDefault().getWorkingCopyManager().connect(input); + // This hack should be after the super.doSetInput(); + CUIPlugin.getDefault().getWorkingCopyManager().connect(newInput); } protected void attachSourceLocation()