Class ProjectViewSectionSplitter


  • public final class ProjectViewSectionSplitter
    extends java.lang.Object
    Splitter is responsible for splitting file content into "raw" sections - section name and entire section body. Also, it removes comments (starting with '#') from section content

    e.g.:
    file content:

    
     ---
        import path/to/another/file.bazelproject
    
        section1: value1 # comment
    
        section2:
          included_value1
          included_value2
          -excluded_value3
     ---
     

    will be split into raw sections:
    1) 'import' -- 'path/to/another/file.bazelproject\n\n'
    2) 'section1' -- 'value1 \n\n'
    3) 'section2' -- '\n included_value1\n included_value2\n -excluded_value3\n'

    • Constructor Detail

      • ProjectViewSectionSplitter

        public ProjectViewSectionSplitter()
    • Method Detail

      • getRawSectionsForFileContent

        public static ProjectViewRawSections getRawSectionsForFileContent​(java.lang.String fileContent)