Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

AdT (ABAP in Eclipse), Code Formatter/PrettyPrinter / Beautify - more options?

joachimrees1
Active Contributor

I have exactly the question someone had back in 2014:

https://archive.sap.com/discussions/message/15254359

I would wish for e.g. such simple things as aligning adjacent statements by the '='-character, like so:

var1 = 'xyz'.
var_very_long = 123.

“format source (shift+F1) -->:
var1          = 'xyz'.
var_very_long = 123.

It's end of 2017 now, is the answer any different?

(As far as I can tell, no: 😞

- but maybe there's something in the dev-pipeline?)

best

Joachim

1 ACCEPTED SOLUTION

ThFiedler
Product and Topic Expert
Product and Topic Expert

Hi Joachim,

there are currently no plans to further improve the pretty printer/Formatter.

Regards,

Thomas.

5 REPLIES 5

tedtedster
Explorer

Hello Joachim,

looking for the exact same issue, i found your post. Just wanna inform anybody who is also searching for the formatter-option in adt: In the meanwhile it works well (Shift + F1).

Cheers

Hi Erik, thanks for your Feedback! But I am not sure if I understand your "it works well" ?!

My wish was, that this

var1 = 'xyz'.
var_very_long = 123.

would be turned into into that (-> nicely aligning at the '=' )

var1          = 'xyz'.
var_very_long = 123.

I tried it again today: it didn't do it and I still didn't find an option for achieving that.
Best
Joachim

0 Kudos

Hello Joachim,

well, i tried it at home with the latest ADT Version. And yes it aligns as nicely as the pretty Printer in sap. Have a look at the top bar. There should smth. like "edit". there you can expand a new menu with one entry called "Format" (again, smth. like that). And if i hit that, it Formats my abap Code well.

Best regards

larshp
Active Contributor

we have an evil plan to be able to run the abaplint pretty printer from ADT, https://github.com/abaplint/abaplint/issues/629

ThFiedler
Product and Topic Expert
Product and Topic Expert

Hi Joachim,

there are currently no plans to further improve the pretty printer/Formatter.

Regards,

Thomas.