From b414e5add016f5840ad63c4ccc646641a14d8fb4 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Wed, 11 May 2011 18:39:50 +0000 Subject: [PATCH] Cosmetics. --- .../internal/corext/template/c/FileTemplateContextType.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContextType.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContextType.java index 90206634c91..bba0e7fb6e8 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContextType.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/template/c/FileTemplateContextType.java @@ -233,12 +233,15 @@ public class FileTemplateContextType extends TemplateContextType { public static String contextTypeIdForContentType(IContentType contentType) { return contentType.getId() + CONTEXTTYPE_SUFFIX; } + public static boolean isFileTemplateContextType(String contextTypeId) { return contextTypeId.endsWith(CONTEXTTYPE_SUFFIX); } + public static boolean isContextTypeForContentType(String contextTypeId, String contentTypeId) { return contextTypeId.endsWith(CONTEXTTYPE_SUFFIX) && contextTypeId.startsWith(contentTypeId); } + public static String contentTypeIdForContextType(String contextTypeId) { return contextTypeId.substring(0, contextTypeId.length() - CONTEXTTYPE_SUFFIX.length()); }