Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2006-07-06 19:39:23 +0000
committerDarin Wright2006-07-06 19:39:23 +0000
commitc5311ec25bb03636274afd4f45a36c1bc2dd27d0 (patch)
treeed35919e46675efedb14c891253b2fda623f6460
parentd7e55b80df5406568d3d1d9b51e1b2418c3361e2 (diff)
downloadeclipse.platform.debug-c5311ec25bb03636274afd4f45a36c1bc2dd27d0.tar.gz
eclipse.platform.debug-c5311ec25bb03636274afd4f45a36c1bc2dd27d0.tar.xz
eclipse.platform.debug-c5311ec25bb03636274afd4f45a36c1bc2dd27d0.zip
Bug 144253 [source lookup] Stack Frame CHANGE events no longer force a source lookup
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupService.java30
1 files changed, 21 insertions, 9 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupService.java
index 5049fab46..757485661 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupService.java
@@ -43,6 +43,25 @@ public class SourceLookupService implements IDebugContextListener, ISourceDispla
* @see org.eclipse.debug.ui.contexts.IDebugContextListener#contextActivated(java.lang.Object, org.eclipse.ui.IWorkbenchPart)
*/
public synchronized void contextActivated(ISelection selection, IWorkbenchPart part) {
+ displaySource(selection, part, false);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.contexts.IDebugContextListener#contextChanged(org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
+ */
+ public void contextChanged(ISelection selection, IWorkbenchPart part) {
+ displaySource(selection, part, true);
+ }
+
+ /**
+ * Displays source for the given selection and part, optionally forcing
+ * a source lookup.
+ *
+ * @param selection
+ * @param part
+ * @param force
+ */
+ protected synchronized void displaySource(ISelection selection, IWorkbenchPart part, boolean force) {
if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection)selection;
if (structuredSelection.size() == 1) {
@@ -53,17 +72,10 @@ public class SourceLookupService implements IDebugContextListener, ISourceDispla
} else {
page = part.getSite().getPage();
}
- displaySource(context, page, false);
+ displaySource(context, page, force);
}
}
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.contexts.IDebugContextListener#contextChanged(org.eclipse.jface.viewers.ISelection, org.eclipse.ui.IWorkbenchPart)
- */
- public void contextChanged(ISelection selection, IWorkbenchPart part) {
- contextActivated(selection, part);
- }
+ }
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.contexts.ISourceDisplayAdapter#displaySource(java.lang.Object, org.eclipse.ui.IWorkbenchPage, boolean)

Back to the top