Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2008-02-14 03:10:14 -0500
committerAnton Leherbauer2008-02-14 03:10:14 -0500
commit1c9e22a4079b6f4131ddafcdca0b4a073576820d (patch)
tree49cd96646dbd52d743dad76e201064c7c1328e1b
parent7ba72ab68cfb38f4fd3deb7204ac22802259ebb0 (diff)
downloadorg.eclipse.cdt-1c9e22a4079b6f4131ddafcdca0b4a073576820d.tar.gz
org.eclipse.cdt-1c9e22a4079b6f4131ddafcdca0b4a073576820d.tar.xz
org.eclipse.cdt-1c9e22a4079b6f4131ddafcdca0b4a073576820d.zip
Avoid usage of getPath() - related to bug 218266
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleBreakpointAdapter.java8
2 files changed, 6 insertions, 6 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
index a091d9b346..caa3db15a0 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2007 QNX Software Systems and others.
+ * Copyright (c) 2004, 2008 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -173,7 +173,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
}
if ( element instanceof ExternalTranslationUnit ) {
ExternalTranslationUnit etu = (ExternalTranslationUnit) element;
- return new ExternalEditorInput( etu , new LocalFileStorage( etu.getPath().toFile() ) );
+ return new ExternalEditorInput( etu , new LocalFileStorage( etu.getLocation().toFile() ) );
}
if (element instanceof CSourceNotFoundElement)
{
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 1f325ae644..0006e412c6 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
@@ -364,10 +364,10 @@ public class ToggleBreakpointAdapter implements IToggleBreakpointsTarget {
private String getSourceHandle( IDeclaration declaration ) {
ITranslationUnit tu = declaration.getTranslationUnit();
if ( tu != null ) {
- IResource resource = tu.getResource();
- if ( resource != null )
- return resource.getLocation().toOSString();
- return tu.getPath().toOSString();
+ IPath location = tu.getLocation();
+ if (location != null) {
+ return location.toOSString();
+ }
}
return ""; //$NON-NLS-1$
}

Back to the top