diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/FileLanguageMappingPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/FileLanguageMappingPropertyPage.java index 9b0506b107d..a6caa86f8cb 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/FileLanguageMappingPropertyPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/FileLanguageMappingPropertyPage.java @@ -83,7 +83,7 @@ public class FileLanguageMappingPropertyPage extends PropertyPage { protected Control createContents(Composite parent) { IFile file = getFile(); IProject project = file.getProject(); - fContentType = CContentTypes.getContentType(project, file.getLocation().toString()); + fContentType = CContentTypes.getContentType(project, file.getName()); fContents = new Composite(parent, SWT.NONE); fContents.setLayout(new GridLayout(2, false));