mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 00:05:53 +02:00
Bug 356346 - Do not reload expressions if the debug context is the same
as before.
This commit is contained in:
parent
fb7d64098f
commit
a87ea0e3ab
1 changed files with 16 additions and 13 deletions
|
@ -62,6 +62,7 @@ public class GoToAddressBarWidget {
|
||||||
private Button fOKButton;
|
private Button fOKButton;
|
||||||
private Button fOKNewTabButton;
|
private Button fOKNewTabButton;
|
||||||
private Composite fComposite;
|
private Composite fComposite;
|
||||||
|
private Object fCurrentDebugContext;
|
||||||
|
|
||||||
protected static int ID_GO_NEW_TAB = 2000;
|
protected static int ID_GO_NEW_TAB = 2000;
|
||||||
|
|
||||||
|
@ -267,7 +268,7 @@ public class GoToAddressBarWidget {
|
||||||
*/
|
*/
|
||||||
public void loadSavedExpressions(Object context, String memorySpace)
|
public void loadSavedExpressions(Object context, String memorySpace)
|
||||||
{
|
{
|
||||||
|
if ( context != null && ! context.equals( fCurrentDebugContext ) ) {
|
||||||
try {
|
try {
|
||||||
String[] expressions = getSavedExpressions(context, memorySpace);
|
String[] expressions = getSavedExpressions(context, memorySpace);
|
||||||
String currentExpression = fExpression.getText();
|
String currentExpression = fExpression.getText();
|
||||||
|
@ -278,11 +279,13 @@ public class GoToAddressBarWidget {
|
||||||
if (currentExpression != null) {
|
if (currentExpression != null) {
|
||||||
fExpression.setText(currentExpression);
|
fExpression.setText(currentExpression);
|
||||||
}
|
}
|
||||||
|
fCurrentDebugContext = context;
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
// Unexpected snag dealing with launch configuration
|
// Unexpected snag dealing with launch configuration
|
||||||
MemoryBrowserPlugin.log(e);
|
MemoryBrowserPlugin.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void addExpressionToHistory(Object context, String expr, String memorySpace) {
|
public void addExpressionToHistory(Object context, String expr, String memorySpace) {
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue