Class BslTreeGenerator


  • public class BslTreeGenerator
    extends Object
    A helper to generate the AST for the Gumtree comparison algorithm in the convenient format for bsl files.
    • Constructor Detail

      • BslTreeGenerator

        public BslTreeGenerator​(org.eclipse.jface.text.IDocument document)
        Creates a new BslTreeGenerator with the given document.
        Parameters:
        document - the Bsl document, can not be null
    • Method Detail

      • generateGumTreeAST

        public com._1c.g5.gumtree.core.tree.INode generateGumTreeAST​(org.eclipse.emf.common.util.URI uri)
                                                              throws com._1c.g5.gumtree.core.tree.TreeGeneratorException
        Generates the GumTree AST from the bsl file.
        Parameters:
        uri - the URI of the bsl file, can not be null
        Returns:
        the root of the built tree, can not be null
        Throws:
        com._1c.g5.gumtree.core.tree.TreeGeneratorException - if there are syntax errors in the bsl file
      • generateGumTreeAST

        public com._1c.g5.gumtree.core.tree.INode generateGumTreeAST​(String content)
                                                              throws com._1c.g5.gumtree.core.tree.TreeGeneratorException
        Generates the GumTree AST from the bsl file.
        Parameters:
        content - the content of the bsl file, can not be null
        Throws:
        com._1c.g5.gumtree.core.tree.TreeGeneratorException - if there are syntax errors in the bsl file