Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | CLASS zcl_abapgit_syntax_po DEFINITION
PUBLIC
INHERITING FROM zcl_abapgit_syntax_highlighter
CREATE PUBLIC.
PUBLIC SECTION.
METHODS constructor.
PROTECTED SECTION.
PRIVATE SECTION.
CONSTANTS:
BEGIN OF c_style,
msgid TYPE string VALUE 'keyword',
msgstr TYPE string VALUE 'xml_tag',
comment TYPE string VALUE 'comment',
END OF c_style.
CONSTANTS:
BEGIN OF c_token,
msgid TYPE c VALUE 'I',
msgstr TYPE c VALUE 'S',
comment TYPE c VALUE 'C',
END OF c_token.
CONSTANTS:
BEGIN OF c_regex,
msgid TYPE string VALUE '^msgid\b',
msgstr TYPE string VALUE '^msgstr\b',
comment TYPE string VALUE '^#.*',
END OF c_regex.
ENDCLASS.
CLASS ZCL_ABAPGIT_SYNTAX_PO IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
add_rule(
iv_regex = c_regex-msgid
iv_token = c_token-msgid
iv_style = c_style-msgid ).
add_rule(
iv_regex = c_regex-msgstr
iv_token = c_token-msgstr
iv_style = c_style-msgstr ).
add_rule(
iv_regex = c_regex-comment
iv_token = c_token-comment
iv_style = c_style-comment ).
" TODO maybe add rule to highlight empty msgstr with red
ENDMETHOD.
ENDCLASS.
|