1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 02:06:01 +02:00

Bug 145606: The watchpoint property dialog shows the filename rather than the project.

This commit is contained in:
Mikhail Khodjaiants 2007-06-18 15:29:38 +00:00
parent 777ead0e7f
commit f0c34f030e
2 changed files with 16 additions and 3 deletions

View file

@ -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$
}

View file

@ -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.