Skip to Content

Customize Syntax Coloring in ABAP in Eclipse

Syntax coloring is a nice feature every ABAP developer loves since the new ABAP editor was provided a couple of years ago.

But you can only use it to distinguish between keywords, non-keywords, literals and comments. But keywords are all colored the same way in the ABAP editor. 

In Eclipse you have much more possibilities to customize the color settings of the keywords in the editor. With the new ADT version 2.58 it is possible to specify the keyword colors via the eclipse preferences page:

01-04-2016 15-12-14.png

In the example above I specify that “Method” and “Endmethod” statements are colored differently in the editor than the other keywords. I can even specify different font settings for these keywords, e.g. I could strikethrough FORM statements. The code then looks like this:

01-04-2016 15-16-32.png

Have fun with your colored code.



You must be Logged on to comment or reply to a post.
  • Thomas,

    Thank you for this post. I am currently on 2.58 and have been able to change my syntax highlighting and love it.

    I was looking at the version history at Version history for 2.60 link   and noticed that this was mentioned under the change log for version 2.60 and not 2.58. So, the question is, what really did change with version 2.60?



  • Hi Thomas,

    does this feature depend by the NW Backend Version?

    I'm on NW7.4 SP08 and installed ADT 2.60 on Eclipse Luna:


    But unfortunately i can't find this setting possibility within the preferences:

    ADT Preferences.PNG



    • /
      • I found the reason for my issue.

        As I mentioned, i'm running on Eclipse Luna. But my mistake was, that i downloaded ADT2.60 from the Update-Site for Mars.

        A colleague of mine runs Eclipse Mars, we installed the plug-in on his system and he has this settings now at the same area within the preferences as thomas descriped above.

        However, thanks for your reply.



  • Hi Thomas,

    nice feature. I found some quirks on my installation.

    1) I switched syntax coloring for the data keyword on. It seems that it doesn't work for inline declarations.

    2016-06-25 23_16_46-workspace - ABAP_2 - Global Class ZCL_ALV_REPORTING_VIEW [DVE] - active, locked .png

    2) If i try it for field-symbol(s) it looks like this

    2016-06-25 23_19_34-Preferences.png

    2016-06-25 23_23_40-workspace - ABAP_2 - Global Class ZCL_ALV_REPORTING_VIEW [DVE] - active, locked .png

    3) and if i activate it for select, select-options are also considered.

    2016-06-25 23_27_11-workspace - ABAP_2 - Program Z_TEST_TEMPLATE [DVE] - active - DVE_010_guenterc_e.png

    Is this behaviour intended, maybe you can explain it?

    Regards Christian

    P.S. I use the latest ADT version

    2016-06-25 23_28_55-About Eclipse Features.png

    • Hi Christian,

      thanks for the feedback. I just checked my internal client and it is seams that the bugs are already fixed. So you can expect the correct behavior with the next patch of ADT.



  • I have the latest ADT plugin (2.68) but the syntax coloring doesn't work, only basic color rules are applied. Does there any priority? Where should I search too fix it?

  • Hello Thomas,

    what about adding regular expressions for styling? Then we could remove the coloring of "METHOD" in CALL METHOD, but keeping it at the beginning of a METHOD block. I know that CALL METHOD is old-fashioned, but much of the written code is it, too.

    I think about something like Indesign's GREP-Styles:

    Best Regards,


    • Hi Harald,

      no, this is not possible. Maybe a nice extension to the editor. I will talk with my development experts about it.




      • Not my Idea. Taken over from the ABAP-Workbench Editor.

        • Your eyes do not need to jump to the status bar every time you open an editor tab.
        • Would make it a little easier for abap-workbench programmers to switchover to eclipse.