diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageManager.java
index 182ede2c1ca..ec922927c1a 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/LanguageManager.java
@@ -24,8 +24,6 @@ import org.eclipse.cdt.internal.core.model.TranslationUnit;
import org.eclipse.cdt.internal.core.pdom.dom.IPDOMLinkageFactory;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.SafeRunner;
@@ -165,13 +163,11 @@ public class LanguageManager {
allTypes.add(CCorePlugin.CONTENT_TYPE_CXXSOURCE);
IContentTypeManager manager = Platform.getContentTypeManager();
- IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, LANGUAGE_EXTENSION_POINT_ID);
- IExtension[] extensions = point.getExtensions();
- for (int i = 0; i < extensions.length; ++i) {
- IConfigurationElement[] languages = extensions[i].getConfigurationElements();
- for (int j = 0; j < languages.length; ++j) {
- IConfigurationElement language = languages[j];
- IConfigurationElement[] contentTypes = language.getChildren(ELEMENT_CONTENT_TYPE);
+ IConfigurationElement[] configs= Platform.getExtensionRegistry().getConfigurationElementsFor(LANGUAGE_EXTENSION_POINT_ID);
+ for (int j = 0; j < configs.length; ++j) {
+ final IConfigurationElement languageElem = configs[j];
+ if (ELEMENT_LANGUAGE.equals(languageElem.getName())) {
+ IConfigurationElement[] contentTypes = languageElem.getChildren(ELEMENT_CONTENT_TYPE);
for (int k = 0; k < contentTypes.length; ++k) {
IContentType langContType = manager.getContentType(contentTypes[k].getAttribute(ATTRIBUTE_ID));
allTypes.add(langContType.getId());
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java
index 7984d3fb930..8770b911a16 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java
@@ -694,16 +694,6 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
public ILanguage getLanguage() throws CoreException {
if (language == null) {
language = computeLanguage(contentTypeId);
-
- // Special magic for C/C++ header files
- if (language == null && isHeaderUnit()) {
- if (CCorePlugin.CONTENT_TYPE_CHEADER.equals(contentTypeId)) {
- language = computeLanguage(CCorePlugin.CONTENT_TYPE_CSOURCE);
- }
- else if (CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(contentTypeId)) {
- language = computeLanguage(CCorePlugin.CONTENT_TYPE_CXXSOURCE);
- }
- }
}
return language;
diff --git a/core/org.eclipse.cdt.core/plugin.xml b/core/org.eclipse.cdt.core/plugin.xml
index 5b9549da56c..eed37a0a9b5 100644
--- a/core/org.eclipse.cdt.core/plugin.xml
+++ b/core/org.eclipse.cdt.core/plugin.xml
@@ -560,12 +560,14 @@
id="gcc"
name="GNU C">
+
+