diff options
author | Anton Leherbauer | 2008-02-14 08:10:14 +0000 |
---|---|---|
committer | Anton Leherbauer | 2008-02-14 08:10:14 +0000 |
commit | 1c9e22a4079b6f4131ddafcdca0b4a073576820d (patch) | |
tree | 49cd96646dbd52d743dad76e201064c7c1328e1b | |
parent | 7ba72ab68cfb38f4fd3deb7204ac22802259ebb0 (diff) | |
download | org.eclipse.cdt-1c9e22a4079b6f4131ddafcdca0b4a073576820d.tar.gz org.eclipse.cdt-1c9e22a4079b6f4131ddafcdca0b4a073576820d.tar.xz org.eclipse.cdt-1c9e22a4079b6f4131ddafcdca0b4a073576820d.zip |
Avoid usage of getPath() - related to bug 218266
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 a091d9b3461..caa3db15a09 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 1f325ae6440..0006e412c61 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$ } |