From 747f41471aeb0ebb79bed2ab279c4b567ac9e7ae Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Sun, 13 May 2012 21:54:32 -0400 Subject: [PATCH] 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 IP-Clean: Doug Schaefer Tested-by: Doug Schaefer --- .../cdt/internal/core/model/BinaryRunner.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java index cd4d11c62d0..30b68f9d52e 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryRunner.java @@ -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; + } } }