<s> import os <EOL> from robotide . lib . robot . errors import DataError <EOL> from robotide . lib . robot . parsing import VALID_EXTENSIONS as RESOURCE_EXTENSIONS <EOL> from robotide . lib . robot . utils import JYTHON <EOL> from . robotbuilder import LibraryDocBuilder , ResourceDocBuilder <EOL> from . specbuilder import SpecDocBuilder <EOL> if JYTHON : <EOL> from . javabuilder import JavaDocBuilder <EOL> else : <EOL> def JavaDocBuilder ( ) : <EOL> raise DataError ( '<STR_LIT>' ) <EOL> def DocumentationBuilder ( library_or_resource ) : <EOL> extension = os . path . splitext ( library_or_resource ) [ <NUM_LIT:1> ] [ <NUM_LIT:1> : ] . lower ( ) <EOL> if extension in RESOURCE_EXTENSIONS : <EOL> return ResourceDocBuilder ( ) <EOL> if extension == '<STR_LIT>' : <EOL> return SpecDocBuilder ( ) <EOL> if extension == '<STR_LIT>' : <EOL> return JavaDocBuilder ( ) <EOL> return LibraryDocBuilder ( ) </s>
