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

Bug 378906 - Give extension-less file names the chance to be binary.

Change-Id: I1308f2b8b20884b687b430b89dc5a187acdab9ad
Reviewed-on: https://git.eclipse.org/r/5966
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
This commit is contained in:
Doug Schaefer 2012-05-13 21:54:32 -04:00
parent b83750eae0
commit 747f41471a

View file

@ -198,13 +198,16 @@ public class BinaryRunner {
}
// check against known content types
// if the file has an extension
String name = proxy.getName();
IContentType contentType = CCorePlugin.getContentType(project, name);
if (contentType != null && textContentType != null) {
if (contentType.isKindOf(textContentType)) {
return true;
} else if (textContentType.isAssociatedWith(name)) {
return true;
if (name.contains(".")) {
IContentType contentType = CCorePlugin.getContentType(project, name);
if (contentType != null && textContentType != null) {
if (contentType.isKindOf(textContentType)) {
return true;
} else if (textContentType.isAssociatedWith(name)) {
return true;
}
}
}