diff options
author | Darin Wright | 2005-02-17 04:31:23 +0000 |
---|---|---|
committer | Darin Wright | 2005-02-17 04:31:23 +0000 |
commit | 785837a0d117e99df4cc567343a73d454e6cc6c5 (patch) | |
tree | ff7e988ca5a0c05e67adfc61794564d7a52b7d5c /org.eclipse.debug.ui | |
parent | 5603c6557822aecefe2d726aa90ff1edef0085d1 (diff) | |
download | eclipse.platform.debug-785837a0d117e99df4cc567343a73d454e6cc6c5.tar.gz eclipse.platform.debug-785837a0d117e99df4cc567343a73d454e6cc6c5.tar.xz eclipse.platform.debug-785837a0d117e99df4cc567343a73d454e6cc6c5.zip |
Bug 85653 - Reuse of source lookup result
Diffstat (limited to 'org.eclipse.debug.ui')
3 files changed, 22 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupResult.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupResult.java index 2a64d3717..ff3c499f8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupResult.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupResult.java @@ -112,4 +112,18 @@ public class SourceLookupResult implements ISourceLookupResult { protected void setEditorInput(IEditorInput input) { fEditorInput = input; } + + /** + * Updates the artifact to refer to the given artifact + * if equal. For example, when a source lookup result is resued + * for the same stack frame, we still need to update in case + * the stack frame is not identical. + * + * @param artifact new artifact state + */ + public void updateArtifact(Object artifact) { + if (fArtifact.equals(artifact)) { + fArtifact = artifact; + } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java index b4dc324ec..ebc0e3573 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java @@ -47,6 +47,7 @@ import org.eclipse.debug.internal.ui.actions.AddToFavoritesAction; import org.eclipse.debug.internal.ui.actions.EditLaunchConfigurationAction; import org.eclipse.debug.internal.ui.sourcelookup.EditSourceLookupPathAction; import org.eclipse.debug.internal.ui.sourcelookup.LookupSourceAction; +import org.eclipse.debug.internal.ui.sourcelookup.SourceLookupResult; import org.eclipse.debug.internal.ui.views.AbstractDebugEventHandlerView; import org.eclipse.debug.internal.ui.views.DebugUIViewsMessages; import org.eclipse.debug.internal.ui.views.DebugViewDecoratingLabelProvider; @@ -725,6 +726,10 @@ public class LaunchView extends AbstractDebugEventHandlerView implements ISelect scheduleSourceLookup(); } else { setStackFrame(stackFrame); + SourceLookupResult result = (SourceLookupResult) fResult; + if (result != null) { + result.updateArtifact(stackFrame); + } scheduleSourceDisplay(); } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceLookupResult.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceLookupResult.java index f96bb3e29..979609b71 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceLookupResult.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/sourcelookup/ISourceLookupResult.java @@ -17,7 +17,9 @@ import org.eclipse.ui.IEditorInput; * The result contains the resolved source element and description * of an editor (editor id, and editor input) in which to display * the result. - * + * <p> + * Clients are not intended to implement this interface. + * </p> * @see org.eclipse.debug.ui.DebugUITools#lookupSource(Object, ISourceLocator) * @see org.eclipse.debug.ui.DebugUITools#displaySource(ISourceLookupResult, IWorkbenchPage) * @since 3.1 |