diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java index fdc8c5ccfe6..5238a57dce2 100644 --- a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java +++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java @@ -62,6 +62,7 @@ public class GoToAddressBarWidget { private Button fOKButton; private Button fOKNewTabButton; private Composite fComposite; + private Object fCurrentDebugContext; protected static int ID_GO_NEW_TAB = 2000; @@ -267,20 +268,22 @@ public class GoToAddressBarWidget { */ public void loadSavedExpressions(Object context, String memorySpace) { - - try { - String[] expressions = getSavedExpressions(context, memorySpace); - String currentExpression = fExpression.getText(); - fExpression.removeAll(); - for (String expression : expressions) { - fExpression.add(expression); + if ( context != null && ! context.equals( fCurrentDebugContext ) ) { + try { + String[] expressions = getSavedExpressions(context, memorySpace); + String currentExpression = fExpression.getText(); + fExpression.removeAll(); + for (String expression : expressions) { + fExpression.add(expression); + } + if (currentExpression != null) { + fExpression.setText(currentExpression); + } + fCurrentDebugContext = context; + } catch (CoreException e) { + // Unexpected snag dealing with launch configuration + MemoryBrowserPlugin.log(e); } - if (currentExpression != null) { - fExpression.setText(currentExpression); - } - } catch (CoreException e) { - // Unexpected snag dealing with launch configuration - MemoryBrowserPlugin.log(e); } }