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 // check against known content types
// if the file has an extension
String name = proxy.getName(); String name = proxy.getName();
IContentType contentType = CCorePlugin.getContentType(project, name); if (name.contains(".")) {
if (contentType != null && textContentType != null) { IContentType contentType = CCorePlugin.getContentType(project, name);
if (contentType.isKindOf(textContentType)) { if (contentType != null && textContentType != null) {
return true; if (contentType.isKindOf(textContentType)) {
} else if (textContentType.isAssociatedWith(name)) { return true;
return true; } else if (textContentType.isAssociatedWith(name)) {
return true;
}
} }
} }