Class BslTranslationLogger
java.lang.Object
com.e1c.langtool.v8.dt.bsl.translator.BslTranslationLogger
Internal logger to save spesial information about semantic element if replace text or source matches pattern.
-
Constructor Summary
ConstructorsConstructorDescriptionBslTranslationLogger(DynamicFeatureAccessComputer dynamicFeatureAccessComputer, TypesComputer typesComputer, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IStringLiteralTypeComputer stringLiteralTypeComputer, org.eclipse.xtext.naming.IQualifiedNameConverter qualifiedNameConverter, ITranslationFeatureKeyProvider translationKeyProvider) -
Method Summary
Modifier and TypeMethodDescriptionstatic BslTranslationLoggercreate(org.eclipse.core.resources.IFile moduleFile, IProjectTranslationProvider translationProvider) voidflush()Flush log information into file that creates path same as module project relative path.voidLog current object context if RegEx matches replace or if replace empty and it matches node text.voidlogDocComment(int offset, String source, String replace, Object docComment, org.eclipse.xtext.nodemodel.INode context) Log current doc comment object context info if RegEx matches replace or source text if replace empty.static boolean
-
Constructor Details
-
BslTranslationLogger
@Inject public BslTranslationLogger(DynamicFeatureAccessComputer dynamicFeatureAccessComputer, TypesComputer typesComputer, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IStringLiteralTypeComputer stringLiteralTypeComputer, org.eclipse.xtext.naming.IQualifiedNameConverter qualifiedNameConverter, ITranslationFeatureKeyProvider translationKeyProvider)
-
-
Method Details
-
create
public static BslTranslationLogger create(org.eclipse.core.resources.IFile moduleFile, IProjectTranslationProvider translationProvider) -
needLogging
public static boolean needLogging() -
flush
public void flush()Flush log information into file that creates path same as module project relative path. -
log
Log current object context if RegEx matches replace or if replace empty and it matches node text. Also checks pair source text and translation if set in parameter list.- Parameters:
node- the node, cannot benull.replace- the replace, can benull.
-
logDocComment
public void logDocComment(int offset, String source, String replace, Object docComment, org.eclipse.xtext.nodemodel.INode context) Log current doc comment object context info if RegEx matches replace or source text if replace empty. Also checks pair source text and translation if set in parameter list.- Parameters:
offset- the offsetsource- the sourcereplace- the replacedocComment- the doc commentcontext- the context node to register log
-