Class DcsNStrUtil
java.lang.Object
com.e1c.langtool.v8.dt.internal.dcs.i18n.DcsNStrUtil
Contain utility methods to process DCS Expressions with embedded NStr's.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ContextTranslationKeybuildNStrContextTranslationKey(org.eclipse.core.resources.IFile file, org.eclipse.emf.common.util.URI fileURI, FeatureKey featureKey, String sourceString) static booleancanContainNStr(String value) static StringformatNStr(Map<String, String> strings) Format NStr string from given map.static booleanisExpressionWithNStr(String value, QName elementName) static StringprocessExpressionWithNStr(FeatureKey fieldFeatureKey, String expression, BiFunction<FeatureKey, String, String> processor)
-
Method Details
-
canContainNStr
-
isExpressionWithNStr
-
processExpressionWithNStr
public static String processExpressionWithNStr(FeatureKey fieldFeatureKey, String expression, BiFunction<FeatureKey, String, String> processor) -
formatNStr
Format NStr string from given map. Apostrophe'symbols inside string escaped with doubling. Quotation mark"escaping should be done separately. Currently handled in {@link DcsNStrUtil.processExpressionWithNStr(FeatureKey, String, BiFunction<FeatureKey, String, String>)}- Parameters:
strings- Map <language code> ⇒ <localized message>.- Returns:
- Formatted NStr content (without outer quotes
-
buildNStrContextTranslationKey
public static ContextTranslationKey buildNStrContextTranslationKey(org.eclipse.core.resources.IFile file, org.eclipse.emf.common.util.URI fileURI, FeatureKey featureKey, String sourceString)
-