1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 23:05:47 +02:00

Bug 278632 - NPE in CSourceViewerConfiguration on non file:// IFileStores, patch by Andrew Eidsness

This commit is contained in:
Anton Leherbauer 2009-06-03 10:30:51 +00:00
parent f497c46b26
commit e868cbb696

View file

@ -957,9 +957,11 @@ public class CSourceViewerConfiguration extends TextSourceViewerConfiguration {
ILocationProvider locationProvider = (ILocationProvider)input.getAdapter(ILocationProvider.class);
if (locationProvider != null) {
IPath path = locationProvider.getPath(input);
if (path != null) {
contentType = CCorePlugin.getContentType(path.lastSegment());
}
}
}
if (contentType != null) {
return LanguageManager.getInstance().getLanguage(contentType);
}