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()); }