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:
parent
afd9e92342
commit
6ba0814133
2 changed files with 10 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue