mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[scalability] TU check for existance should just be resource test instead of parsing the file.
This commit is contained in:
parent
2beb6089ea
commit
424cfd2211
1 changed files with 11 additions and 0 deletions
|
@ -573,6 +573,17 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
String lid = type.getLanguage().getId();
|
String lid = type.getLanguage().getId();
|
||||||
return lid != null && lid.equals(ICFileTypeConstants.LANG_ASM);
|
return lid != null && lid.equals(ICFileTypeConstants.LANG_ASM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.model.ICElement#exists()
|
||||||
|
*/
|
||||||
|
public boolean exists() {
|
||||||
|
IResource res = getResource();
|
||||||
|
if (res != null)
|
||||||
|
return res.exists();
|
||||||
|
return super.exists();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue