summaryrefslogtreecommitdiffstats
path: root/src/filedef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/filedef.cpp')
-rw-r--r--src/filedef.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 7593834..d963688 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -92,8 +92,9 @@ FileDef::FileDef(const char *p,const char *nm,
{
docname.prepend(stripFromPath(path.copy()));
}
- m_isJava = name().right(5)==".java";
- m_isCSharp = name().right(5)==".cs";
+ SrcLangExt lang = getLanguageFromFileName(name());
+ m_isJava = lang==SrcLangExt_Java;
+ m_isCSharp = lang==SrcLangExt_CSharp;
memberGroupSDict = 0;
acquireFileVersion();
m_subGrouping=Config_getBool("SUBGROUPING");
@@ -263,10 +264,8 @@ void FileDef::writeIncludeFiles(OutputList &ol)
bool isIDLorJava = FALSE;
if (fd)
{
- isIDLorJava = fd->name().right(4)==".idl" || // M$ or Corba IDL
- fd->name().right(5)==".pidl" ||
- fd->name().right(5)==".java" || // Sun's Java
- fd->name().right(4)==".jsl"; // M$ J#
+ SrcLangExt lang = getLanguageFromFileName(fd->name());
+ isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java;
}
ol.startTypewriter();
if (isIDLorJava) // IDL/Java include