Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorPatrick Chuong2011-02-07 14:48:39 -0500
committerPatrick Chuong2011-02-07 14:48:39 -0500
commit2f04b81343a5bb24327e06b7ac4b84e4c9b0d5b4 (patch)
treed7c7151a210a1908d217ade4c1863471b2928db7 /debug
parent3806bba6bc0f4e165bd5e132ce2407995b1ce400 (diff)
downloadorg.eclipse.cdt-2f04b81343a5bb24327e06b7ac4b84e4c9b0d5b4.tar.gz
org.eclipse.cdt-2f04b81343a5bb24327e06b7ac4b84e4c9b0d5b4.tar.xz
org.eclipse.cdt-2f04b81343a5bb24327e06b7ac4b84e4c9b0d5b4.zip
Bug 312121 - [breakpoints] Show fullpath not working in breakpoints view for other breakpoint type
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/ICDebugInternalConstants.java10
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java18
2 files changed, 28 insertions, 0 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/ICDebugInternalConstants.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/ICDebugInternalConstants.java
index 4e736f482a..331d18dd0f 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/ICDebugInternalConstants.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/ICDebugInternalConstants.java
@@ -44,4 +44,14 @@ public class ICDebugInternalConstants {
* plus this key
*/
public static final String SHOW_FULL_PATHS_PREF_KEY = "org.eclipse.cdt.debug.ui.cDebug.show_full_paths"; //$NON-NLS-1$
+
+ /**
+ * An attribute set by a non-ICBreakpoint to support fullpath capability in the Breakpoints view.
+ * If this attribute exists, not <code>null</code>, in the breakpoint marker or the breakpoint is an
+ * ICBreakpoint type, then the show fullpath action in the Breakpoints view is enabled, otherwise
+ * disabled. The show fullpath action does not toggle the value of this breakpoint attribute, it is
+ * the breakpoint's responsibility to monitor the SHOW_FULL_PATHS_PREF_KEY value change and update
+ * the breakpoint presentation in the Breakpoints view.
+ */
+ public static final String ATTR_CAPABLE_OF_SHOW_FULL_PATHS = "org.eclipse.cdt.debug.ui.cDebug.capable_of_show_full_paths"; //$NON-NLS-1$
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java
index 642ad191b6..5f8a8d328e 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java
@@ -16,8 +16,11 @@ import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
import org.eclipse.cdt.debug.internal.ui.CDebugModelPresentation;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.IBreakpointManager;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
import org.eclipse.debug.internal.ui.views.launch.LaunchView;
import org.eclipse.debug.ui.IDebugModelPresentation;
import org.eclipse.debug.ui.IDebugView;
@@ -100,6 +103,21 @@ public class ShowFullPathsAction extends ViewFilterAction {
}
}
}
+
+ // Breakpoints view
+ else if (view instanceof BreakpointsView) {
+ IBreakpointManager bkptmgr = DebugPlugin.getDefault().getBreakpointManager();
+ IBreakpoint[] bkpts = bkptmgr.getBreakpoints();
+ for (IBreakpoint bkpt : bkpts) {
+ try {
+ Object attr = bkpt.getMarker().getAttribute(ICDebugInternalConstants.ATTR_CAPABLE_OF_SHOW_FULL_PATHS);
+ if (attr != null) {
+ setEnabled(true);
+ return;
+ }
+ } catch (Exception e) {/* ignore */}
+ }
+ }
super.selectionChanged(action, selection);
}
}

Back to the top