1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

PR 383941 - Support binaries with dots in their name.

This commit is contained in:
Doug Schaefer 2012-07-03 16:40:59 -04:00
parent 274b07f70f
commit 35daa1d321

View file

@ -662,16 +662,17 @@ public class CModelManager implements IResourceChangeListener, IContentTypeChang
baseFileName = baseFileName.removeFileExtension();
ext = baseFileName.getFileExtension();
} while (ext != null && ext.length() > 0);
boolean isBinary= false;
final IContentTypeManager ctm = Platform.getContentTypeManager();
final IContentType ctbin = ctm.getContentType(CCorePlugin.CONTENT_TYPE_BINARYFILE);
final IContentType[] cts= ctm.findContentTypesFor(baseFileName.toString());
for (int i=0; !isBinary && i < cts.length; i++) {
isBinary= cts[i].isKindOf(ctbin);
}
if (!isBinary) {
return null;
final IContentType[] cts = ctm.findContentTypesFor(baseFileName.toString());
if (cts.length > 0) {
boolean isBinary= false;
for (int i=0; !isBinary && i < cts.length; i++) {
isBinary = cts[i].isKindOf(ctbin);
}
if (!isBinary) {
return null;
}
}
}