SAP / abap-cleaner

ABAP cleaner applies 95+ cleanup rules to ABAP code at a single keystroke
Apache License 2.0
457 stars 48 forks source link

ABAP Cleaner Menu greyed out for one system but not for another #334

Open AxelR8 opened 4 months ago

AxelR8 commented 4 months ago

First of all thank you for this great tool!

I have the ABAP Cleaner menu options under Source Code in ADT greyed out for one system 1909 SAP_ABA 75E but not for another system with a more modern release where it is working just fine. I could not find anything related to release or ABAP stack in the System Requirement section, so I wonder if there are any or whether I did something stupid that caused it to be optionally disabled.

jmgrassau commented 4 months ago

Hi AxelR8,

basically the ABAP cleaner menus are enabled whenever the menu "Source Code / Format Block" is also enabled. I just tried a 1909 / SAP_ABA 75E / SAP_BASIS 754 system, things look fine there. If you open an editor with a CDS View definition, both "Format Block" and ABAP cleaner menus are grayed out (as they should), but if you place he cursor in an editor with ABAP code, all of those are enabled.

ABAP cleaner does have some logic that blocks cleanup rules which introduce newer syntax (such as calculation assignment operators +=, -= etc.) if the underlying ABAP release does not support this syntax; but that's only "inner" ABAP cleaner logic and not related to enabling or disabling the menu item on the UI.

Actually, not sure how exactly "Format Block" determines whether it is enabled or not – does the user for your 1909 system have development authorization etc.?

Kind regards, Jörg-Michael