mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
bug 357018: Languages column in Paths&Symbols tab shows Content Type
instead of language name
This commit is contained in:
parent
e44884f7ea
commit
881fc3304b
1 changed files with 11 additions and 0 deletions
|
@ -17,6 +17,8 @@ import java.util.List;
|
|||
import java.util.StringTokenizer;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.model.LanguageManager;
|
||||
import org.eclipse.cdt.core.settings.model.ICStorageElement;
|
||||
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||
import org.eclipse.cdt.internal.core.SafeStringInterner;
|
||||
|
@ -1698,6 +1700,15 @@ public class InputType extends BuildObject implements IInputType {
|
|||
langId = getLanguageIdAttribute();
|
||||
}
|
||||
|
||||
if(langId == null){
|
||||
IContentType contentType = getSourceContentType();
|
||||
if (contentType!=null) {
|
||||
ILanguage language = LanguageManager.getInstance().getLanguage(contentType);
|
||||
if (language!=null)
|
||||
langId = language.getId();
|
||||
}
|
||||
}
|
||||
|
||||
return langId;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue