mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-20 15:35:24 +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,10 +651,11 @@ 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());
|
||||||
|
if (cts.length > 0) {
|
||||||
|
boolean isBinary= false;
|
||||||
for (int i=0; !isBinary && i < cts.length; i++) {
|
for (int i=0; !isBinary && i < cts.length; i++) {
|
||||||
isBinary = cts[i].isKindOf(ctbin);
|
isBinary = cts[i].isKindOf(ctbin);
|
||||||
}
|
}
|
||||||
|
@ -662,6 +663,7 @@ public class CModelManager implements IResourceChangeListener, IContentTypeChang
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
URI fileUri = file.getLocationURI();
|
URI fileUri = file.getLocationURI();
|
||||||
//Avoid name special devices, empty files and the like
|
//Avoid name special devices, empty files and the like
|
||||||
|
|
Loading…
Add table
Reference in a new issue