mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 142860: Breakpoint marker is not shown in the editor's ruler.
This commit is contained in:
parent
9df742ada4
commit
5839b72abe
4 changed files with 31 additions and 3 deletions
|
@ -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
|
2006-05-12 Mikhail Khodjaiants
|
||||||
Bug 118274: Condition is not shown in the tooltip of conditional breakpoint.
|
Bug 118274: Condition is not shown in the tooltip of conditional breakpoint.
|
||||||
Moved the "getBreakpointText" method and related methods to CDebugUtils.
|
Moved the "getBreakpointText" method and related methods to CDebugUtils.
|
||||||
|
|
|
@ -93,6 +93,8 @@ DisableVariablesAction.tooltip=Disable Selected Variables
|
||||||
DefaultSourceLocator.name=Default C/C++ Source Locator
|
DefaultSourceLocator.name=Default C/C++ Source Locator
|
||||||
OldDefaultSourceLocator.name=Default C/C++ Source Locator (old)
|
OldDefaultSourceLocator.name=Default C/C++ Source Locator (old)
|
||||||
|
|
||||||
|
BreakpointMarkerPreference.label=Breakpoints
|
||||||
|
|
||||||
DisassemblyView.name=Disassembly
|
DisassemblyView.name=Disassembly
|
||||||
DisassemblyCurrentInstructionPointer=Disassembly Current Instruction Pointer
|
DisassemblyCurrentInstructionPointer=Disassembly Current Instruction Pointer
|
||||||
DisassemblySecondaryInstructionPointer=Disassembly Secondary Instruction Pointer
|
DisassemblySecondaryInstructionPointer=Disassembly Secondary Instruction Pointer
|
||||||
|
|
|
@ -1066,8 +1066,18 @@
|
||||||
point="org.eclipse.ui.editors.markerAnnotationSpecification">
|
point="org.eclipse.ui.editors.markerAnnotationSpecification">
|
||||||
<specification
|
<specification
|
||||||
annotationImageProvider="org.eclipse.cdt.debug.internal.ui.BreakpointImageProvider"
|
annotationImageProvider="org.eclipse.cdt.debug.internal.ui.BreakpointImageProvider"
|
||||||
|
annotationType="org.eclipse.cdt.debug.core.breakpoint"
|
||||||
|
colorPreferenceKey="breakpointIndicationColor"
|
||||||
|
colorPreferenceValue="0,0,255"
|
||||||
icon="icons/obj16/brkp_obj.gif"
|
icon="icons/obj16/brkp_obj.gif"
|
||||||
annotationType="org.eclipse.cdt.debug.core.breakpoint">
|
label="%BreakpointMarkerPreference.label"
|
||||||
|
overviewRulerPreferenceKey="breakpointIndicationInOverviewRuler"
|
||||||
|
overviewRulerPreferenceValue="false"
|
||||||
|
presentationLayer="3"
|
||||||
|
textPreferenceKey="breakpointIndication"
|
||||||
|
textPreferenceValue="false"
|
||||||
|
verticalRulerPreferenceKey="breakpointVerticalRuler"
|
||||||
|
verticalRulerPreferenceValue="true">
|
||||||
</specification>
|
</specification>
|
||||||
<specification
|
<specification
|
||||||
colorPreferenceValue="217,255,226"
|
colorPreferenceValue="217,255,226"
|
||||||
|
|
|
@ -31,6 +31,7 @@ import org.eclipse.cdt.debug.internal.ui.views.disassembly.DisassemblyView;
|
||||||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
|
import org.eclipse.core.resources.IWorkspaceRoot;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
@ -50,6 +51,7 @@ import org.eclipse.ui.IFileEditorInput;
|
||||||
import org.eclipse.ui.IPathEditorInput;
|
import org.eclipse.ui.IPathEditorInput;
|
||||||
import org.eclipse.ui.IStorageEditorInput;
|
import org.eclipse.ui.IStorageEditorInput;
|
||||||
import org.eclipse.ui.IWorkbenchPart;
|
import org.eclipse.ui.IWorkbenchPart;
|
||||||
|
import org.eclipse.ui.editors.text.ILocationProvider;
|
||||||
import org.eclipse.ui.texteditor.IEditorStatusLine;
|
import org.eclipse.ui.texteditor.IEditorStatusLine;
|
||||||
import org.eclipse.ui.texteditor.ITextEditor;
|
import org.eclipse.ui.texteditor.ITextEditor;
|
||||||
|
|
||||||
|
@ -303,13 +305,21 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static IResource getResource( IWorkbenchPart part ) {
|
protected static IResource getResource( IWorkbenchPart part ) {
|
||||||
|
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
|
||||||
if ( part instanceof IEditorPart ) {
|
if ( part instanceof IEditorPart ) {
|
||||||
IEditorInput editorInput = ((IEditorPart)part).getEditorInput();
|
IEditorInput editorInput = ((IEditorPart)part).getEditorInput();
|
||||||
if ( editorInput instanceof IFileEditorInput ) {
|
if ( editorInput instanceof IFileEditorInput ) {
|
||||||
return ((IFileEditorInput)editorInput).getFile();
|
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 {
|
private String getSourceHandle( IEditorInput input ) throws CoreException {
|
||||||
|
|
Loading…
Add table
Reference in a new issue