1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-03 22:35:43 +02:00

Avoid usage of getPath() - related to bug 218266

This commit is contained in:
Anton Leherbauer 2008-02-14 08:10:43 +00:00
parent a3aab7e451
commit 86529c7688
2 changed files with 6 additions and 6 deletions

View file

@ -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
@ -175,7 +175,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)
{

View file

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