Class BslCommentTextProcessor

All Implemented Interfaces:
FeatureValueCollector, IBasicProcessor
Direct Known Subclasses:
BslCommentClearableTextProcessor

public class BslCommentTextProcessor extends AbstractBslCommentTextProcessor
Translator processor of Documentation comment model.
  • Field Details

    • context

      protected final org.eclipse.emf.ecore.EObject context
      The context
  • Constructor Details

    • BslCommentTextProcessor

      public BslCommentTextProcessor(org.eclipse.core.resources.IFile file, org.eclipse.emf.ecore.EObject context, FeatureKey featureKeyPreffix, BslDocumentationComment comment, List<org.eclipse.xtext.nodemodel.INode> lines, org.eclipse.text.edits.MultiTextEdit edit, IProjectTranslationProvider translationProvider, Function<org.eclipse.emf.ecore.EObject,String> eObjectReplaceProvider, TranslatorProperties translatorProperties, BslTranslationLogger problemLogger, BmOperationContext typeComputationContext, Method method)
      Instantiates a new bsl documentation comment text processor.
      Parameters:
      file - the file of the module, cannot be null.
      context - the context of doc-comment, cannot be null.
      featureKeyPreffix - the feature key prefix, cannot be null.
      comment - the root documentation comment model object, cannot be null.
      lines - the lines of the doc-comment, cannot be null.
      edit - the edits that will be append by translator changes, cannot be null.
      translationProvider - the translation provider, cannot be null.
      eObjectReplaceProvider - the e object replace provider, cannot be null.
      translatorProperties - the translator properties, cannot be null.
      problemLogger - the translation problem logger
      typeComputationContext - the BM operation context for the type computation process, cannot be null.
    • BslCommentTextProcessor

      public BslCommentTextProcessor(org.eclipse.core.resources.IFile file, FeatureKey featureKeyPreffix, BslDocumentationComment comment, List<org.eclipse.xtext.nodemodel.INode> lines, org.eclipse.text.edits.MultiTextEdit edit, IProjectTranslationProvider translationProvider, Function<org.eclipse.emf.ecore.EObject,String> eObjectReplaceProvider, TranslatorProperties translatorProperties, BslTranslationLogger problemLogger, Method method, BmOperationContext typeComputationContext)
      Instantiates a new bsl documentation comment text processor.
      Parameters:
      file - the file of the module, cannot be null.
      featureKeyPreffix - the feature key prefix, cannot be null.
      comment - the root documentation comment model object, cannot be null.
      lines - the lines of the doc-comment, cannot be null.
      edit - the edits that will be append by translator changes, cannot be null.
      translationProvider - the translation provider, cannot be null.
      eObjectReplaceProvider - the e object replace provider, cannot be null.
      translatorProperties - the translator properties, cannot be null.
      problemLogger - the translation problem logger
      method - the method of doc-comment, cannot be null.
      typeComputationContext - the BM operation context for the type computation process, cannot be null.
  • Method Details

    • doProcess

      protected <T> void doProcess(DocCommentProcessor.Parent parent, T object, Class<T> clazz)
      Description copied from class: DocCommentProcessor
      Processes concrete object of Bsl comment
      Overrides:
      doProcess in class DocCommentCollector
      object - processing object, can't be null
    • replaceLinkPart

      protected void replaceLinkPart(LinkPart link)
      Replaces link part.
      Parameters:
      link - the link, can be null.
    • replaceTypes

      protected void replaceTypes(TypeSection.TypeDefinition typeDef)
      Replaces types.
      Parameters:
      typeDef - the type definition, cannot be null.
    • doProcessTranslatable

      protected void doProcessTranslatable(BslDocumentationComment.Description object, FeatureValue fv)
      Do process translatable.
      Parameters:
      object - the object, cannot be null.
      fv - the feature value, cannot be null.
    • doProcessTranslatable

      protected void doProcessTranslatable(TagPart object, FeatureValue fv)
      Do process translatable.
      Parameters:
      object - the object, cannot be null.
      fv - the feature value, cannot be null.
    • translateDocComment

      protected void translateDocComment(BslDocumentationComment.Description object, String translation, boolean methodDescription)
      Translate doc comment.
      Parameters:
      object - the object, cannot be null.
      translation - the translation, cannot be null.
      methodDescription - the method description
    • translateTagDescription

      protected void translateTagDescription(TagPart part, String translation)
      Translates tag description.
      Parameters:
      part - the part, cannot be null
      translation - the translation, cannot be null
    • addReplace

      protected void addReplace(org.eclipse.xtext.nodemodel.INode bslNode, int partOffset, String original, String replace, boolean firstPart)
      Adds the replace.
      Parameters:
      bslNode - the bsl node, cannot be null.
      partOffset - the part offset, cannot be null.
      original - the original, cannot be null.
      replace - the replace, cannot be null.
      firstPart - the first part, cannot be null.
    • isMethodDescription

      protected static boolean isMethodDescription(Object rootObject)