1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix source hover file location check

This commit is contained in:
Anton Leherbauer 2007-05-11 18:33:34 +00:00
parent db0af1ee12
commit 4cee9ce5a3

View file

@ -250,9 +250,9 @@ public class CSourceHover extends AbstractCEditorTextHover implements ITextHover
if (DEBUG) System.out.println("[CSourceHover] Computing source for " + new String(name.toCharArray()) + " in " + fileName); //$NON-NLS-1$//$NON-NLS-2$
IPath location= Path.fromOSString(fileName);
LocationKind locationKind= LocationKind.LOCATION;
if (name instanceof IASTName) {
if (name instanceof IASTName && !name.isReference()) {
IASTName astName= (IASTName)name;
if (astName.getContainingFilename().equals(fileName) && fTU.getResource() != null) {
if (astName.getTranslationUnit().getFilePath().equals(fileName) && fTU.getResource() != null) {
// reuse editor buffer for names local to the translation unit
location= fTU.getResource().getFullPath();
locationKind= LocationKind.IFILE;