diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog
index 14809bbe0ec..9d294c07577 100644
--- a/debug/org.eclipse.cdt.debug.ui/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-19 Mikhail Khodjaiants
+ Bug 142860: Breakpoint marker is not shown in the editor's ruler.
+ * ToggleBreakpointAdapter.java
+ * plugin.properties
+ * plugin.xml
+
2006-05-12 Mikhail Khodjaiants
Bug 118274: Condition is not shown in the tooltip of conditional breakpoint.
Moved the "getBreakpointText" method and related methods to CDebugUtils.
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.properties b/debug/org.eclipse.cdt.debug.ui/plugin.properties
index 1635a8638c2..b3d2a742c16 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.properties
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.properties
@@ -93,6 +93,8 @@ DisableVariablesAction.tooltip=Disable Selected Variables
DefaultSourceLocator.name=Default C/C++ Source Locator
OldDefaultSourceLocator.name=Default C/C++ Source Locator (old)
+BreakpointMarkerPreference.label=Breakpoints
+
DisassemblyView.name=Disassembly
DisassemblyCurrentInstructionPointer=Disassembly Current Instruction Pointer
DisassemblySecondaryInstructionPointer=Disassembly Secondary Instruction Pointer
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.xml b/debug/org.eclipse.cdt.debug.ui/plugin.xml
index bf5cb79fd2e..e354d321cd9 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.xml
@@ -1066,8 +1066,18 @@
point="org.eclipse.ui.editors.markerAnnotationSpecification">
+ label="%BreakpointMarkerPreference.label"
+ overviewRulerPreferenceKey="breakpointIndicationInOverviewRuler"
+ overviewRulerPreferenceValue="false"
+ presentationLayer="3"
+ textPreferenceKey="breakpointIndication"
+ textPreferenceValue="false"
+ verticalRulerPreferenceKey="breakpointVerticalRuler"
+ verticalRulerPreferenceValue="true">
-
\ No newline at end of file
+
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java
index 416a3012c9a..740eb70066b 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java
@@ -31,6 +31,7 @@ import org.eclipse.cdt.debug.internal.ui.views.disassembly.DisassemblyView;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -50,6 +51,7 @@ import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IPathEditorInput;
import org.eclipse.ui.IStorageEditorInput;
import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.editors.text.ILocationProvider;
import org.eclipse.ui.texteditor.IEditorStatusLine;
import org.eclipse.ui.texteditor.ITextEditor;
@@ -303,13 +305,21 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTarget {
}
protected static IResource getResource( IWorkbenchPart part ) {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
if ( part instanceof IEditorPart ) {
IEditorInput editorInput = ((IEditorPart)part).getEditorInput();
if ( editorInput instanceof IFileEditorInput ) {
return ((IFileEditorInput)editorInput).getFile();
}
+ ILocationProvider provider = (ILocationProvider)editorInput.getAdapter( ILocationProvider.class );
+ if ( provider != null ) {
+ IPath location = provider.getPath( editorInput );
+ IFile[] files = root.findFilesForLocation( location );
+ if ( files.length > 0 )
+ return files[0];
+ }
}
- return ResourcesPlugin.getWorkspace().getRoot();
+ return root;
}
private String getSourceHandle( IEditorInput input ) throws CoreException {