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:
parent
db0af1ee12
commit
4cee9ce5a3
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue