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:
parent
274b07f70f
commit
35daa1d321
1 changed files with 9 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue