diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/CBreakpointPropertyPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/CBreakpointPropertyPage.java index 9e0354360b7..4ac5d5e41ed 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/CBreakpointPropertyPage.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/CBreakpointPropertyPage.java @@ -7,6 +7,7 @@ * * Contributors: * QNX Software Systems - Initial API and implementation + * Nokia - https://bugs.eclipse.org/bugs/show_bug.cgi?id=145606 *******************************************************************************/ package org.eclipse.cdt.debug.internal.ui.propertypages; @@ -18,6 +19,9 @@ import org.eclipse.cdt.debug.core.model.ICBreakpoint; import org.eclipse.cdt.debug.core.model.ICFunctionBreakpoint; import org.eclipse.cdt.debug.core.model.ICWatchpoint; import org.eclipse.cdt.debug.ui.CDebugUIPlugin; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRunnable; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; @@ -318,9 +322,16 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement CDebugUIPlugin.log( ce ); } addField( createLabelEditor( getFieldEditorParent(), PropertyPageMessages.getString( "CBreakpointPropertyPage.18" ), type ) ); //$NON-NLS-1$ - String projectName = breakpoint.getMarker().getResource().getLocation().toOSString(); - if ( projectName != null ) { - addField( createLabelEditor( getFieldEditorParent(), PropertyPageMessages.getString( "CBreakpointPropertyPage.10" ), projectName ) ); //$NON-NLS-1$ + IProject project = breakpoint.getMarker().getResource().getProject(); + if ( project != null ) { + addField( createLabelEditor( getFieldEditorParent(), PropertyPageMessages.getString( "CBreakpointPropertyPage.10" ), project.getName() ) ); //$NON-NLS-1$ + } + IResource resource = breakpoint.getMarker().getResource(); + if ( resource instanceof IFile ) { + String filename = resource.getLocation().toOSString(); + if ( filename != null ) { + addField( createLabelEditor( getFieldEditorParent(), PropertyPageMessages.getString( "CBreakpointPropertyPage.20" ), filename ) ); //$NON-NLS-1$ + } } addField( createLabelEditor( getFieldEditorParent(), PropertyPageMessages.getString( "CBreakpointPropertyPage.14" ), expression ) ); //$NON-NLS-1$ } diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/PropertyPageMessages.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/PropertyPageMessages.properties index c6f28cbcf17..5299c595cfe 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/PropertyPageMessages.properties +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/propertypages/PropertyPageMessages.properties @@ -7,6 +7,7 @@ # # Contributors: # QNX Software Systems - initial API and implementation +# Nokia - https://bugs.eclipse.org/bugs/show_bug.cgi?id=145606 ############################################################################### CBreakpointPropertyPage.0=Ignore count must be a nonnegative integer @@ -29,6 +30,7 @@ CBreakpointPropertyPage.16=Invalid condition. CBreakpointPropertyPage.17=&Ignore count: CBreakpointPropertyPage.18=Type: CBreakpointPropertyPage.19=Enabled +CBreakpointPropertyPage.20=File: ThreadFilterEditor.0=&Restrict to Selected Targets and Threads: SignalPropertyPage.0=Description: {0}. SignalPropertyPage.1=Pass this signal to the program.