1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 16:56:04 +02:00

Quick workaround for PR 57287.

* model/org/eclipse/cdt/core/model/CoreModel.java
This commit is contained in:
Alain Magloire 2004-06-09 02:30:29 +00:00
parent afd9e92342
commit 6ba0814133
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2004-0608 Alain Magloire
Quick workaround for PR 57287.
* model/org/eclipse/cdt/core/model/CoreModel.java
2004-06-08 Alain Magloire
Patch from Dirk Dörr.

View file

@ -158,8 +158,11 @@ public class CoreModel {
*/
public static boolean isTranslationUnit(IFile file) {
if (file != null) {
ICFileType type = CCorePlugin.getDefault().getFileType(file.getProject(), file.getName());
return type.isTranslationUnit();
IProject p = file.getProject();
if (hasCNature(p) || hasCCNature(p)) {
ICFileType type = CCorePlugin.getDefault().getFileType(file.getProject(), file.getName());
return type.isTranslationUnit();
}
}
return false;
}