mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 00:45:28 +02:00
PR 383941 - Support binaries with dots in their name.
This commit is contained in:
parent
276cbc2257
commit
218640c008
1 changed files with 9 additions and 7 deletions
|
@ -651,15 +651,17 @@ public class CModelManager implements IResourceChangeListener, IContentTypeChang
|
||||||
ext = baseFileName.getFileExtension();
|
ext = baseFileName.getFileExtension();
|
||||||
} while (ext != null && ext.length() > 0);
|
} while (ext != null && ext.length() > 0);
|
||||||
|
|
||||||
boolean isBinary= false;
|
|
||||||
final IContentTypeManager ctm = Platform.getContentTypeManager();
|
final IContentTypeManager ctm = Platform.getContentTypeManager();
|
||||||
final IContentType ctbin = ctm.getContentType(CCorePlugin.CONTENT_TYPE_BINARYFILE);
|
final IContentType ctbin = ctm.getContentType(CCorePlugin.CONTENT_TYPE_BINARYFILE);
|
||||||
final IContentType[] cts= ctm.findContentTypesFor(baseFileName.toString());
|
final IContentType[] cts = ctm.findContentTypesFor(baseFileName.toString());
|
||||||
for (int i=0; !isBinary && i < cts.length; i++) {
|
if (cts.length > 0) {
|
||||||
isBinary= cts[i].isKindOf(ctbin);
|
boolean isBinary= false;
|
||||||
}
|
for (int i=0; !isBinary && i < cts.length; i++) {
|
||||||
if (!isBinary) {
|
isBinary = cts[i].isKindOf(ctbin);
|
||||||
return null;
|
}
|
||||||
|
if (!isBinary) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue