Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2012-07-03 16:40:59 -0400
committerDoug Schaefer2014-03-24 11:46:43 -0400
commite81422fe2b50c093c5daa0a9aac3383f938d15d7 (patch)
tree4661221e4649b1ffa9358c860f7b1b261d86b317
parentd118d80af7484e8cb2b440269f0279a7993e0158 (diff)
downloadorg.eclipse.cdt-e81422fe2b50c093c5daa0a9aac3383f938d15d7.tar.gz
org.eclipse.cdt-e81422fe2b50c093c5daa0a9aac3383f938d15d7.tar.xz
org.eclipse.cdt-e81422fe2b50c093c5daa0a9aac3383f938d15d7.zip
PR 383941 - Support binaries with dots in their name.
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java
index 28ccffca693..79b4c264882 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java
@@ -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;
+ }
}
}

Back to the top