Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2020-01-27 16:16:43 +0000
committerAndrey Loskutov2020-01-31 16:16:12 +0000
commit034cac2c534b426f1018932b824bbe818b878797 (patch)
tree9d7cee1080cd6d935c5a1001d76bd993449c5aa9 /org.eclipse.debug.ui/ui/org
parent89a1b717855675c6f4a4d2f55062292dbb7eaf1f (diff)
downloadeclipse.platform.debug-034cac2c534b426f1018932b824bbe818b878797.tar.gz
eclipse.platform.debug-034cac2c534b426f1018932b824bbe818b878797.tar.xz
eclipse.platform.debug-034cac2c534b426f1018932b824bbe818b878797.zip
Bug 559590 - "Custom" debug view is not considered inY20200204-0035I20200203-1800I20200202-1800
SourceLookupService.debugContextChanged Check if the view part provided by the DebugContextProvider is shown, if the DebugContextProvider for given DebugContextEvent specifies its own part. This part is not necessarily the default Debug view. If this is the case, we also want to proceed with displaySource(). Change-Id: I1b86b3d2224c8532ddf23b4d423f211267ff3106 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.debug.ui/ui/org')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceLookupService.java15
1 files changed, 12 insertions, 3 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 a19871086..222ddcb1d 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
@@ -29,6 +29,7 @@ import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
@@ -57,19 +58,27 @@ public class SourceLookupService implements IDebugContextListener, ISourceDispla
@Override
public synchronized void debugContextChanged(DebugContextEvent event) {
if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) {
- if (isDebugViewActive() || canActivateDebugView()) {
+ if (isDebugViewActive(event) || canActivateDebugView()) {
displaySource(event.getContext(), event.getDebugContextProvider().getPart(), false);
}
}
}
- private boolean isDebugViewActive() {
+ private boolean isDebugViewActive(DebugContextEvent event) {
if (isDisposed()) {
return false;
}
IWorkbenchPage activePage = fWindow.getActivePage();
if (activePage != null) {
- return activePage.findView(IDebugUIConstants.ID_DEBUG_VIEW) != null;
+ IViewPart debugView = null;
+ IWorkbenchPart part = event.getDebugContextProvider().getPart();
+ if (part != null) {
+ debugView = activePage.findView(part.getSite().getId());
+ }
+ if (debugView == null) {
+ debugView = activePage.findView(IDebugUIConstants.ID_DEBUG_VIEW);
+ }
+ return debugView != null;
}
return false;
}

Back to the top