fidley / ABAPQuickFix

ABAP Quick Fix
https://abapblog.com
MIT License
42 stars 9 forks source link

Sort data declaration + bugfix #60

Closed lukas-mb closed 7 months ago

lukas-mb commented 7 months ago

Hi @fidley,

final steps went faster than expected. Besides a small bugfix in SplitToSeveralStatements, I added three quickfixes:

  1. Sort single DATA statements
  2. Sort combined DATA statement
  3. Sort all DATA statements

The order of prefixes can be customized in the Preferences, as well as options for additional empty lines.

I'm curious about your opinion :)

fidley commented 7 months ago

Perfect! I'll do testing once more and I'll give you feedback. Thanks!

fidley commented 7 months ago

58

In case of such declaration I get the Sort single DATA statements QF but it does not sort anything :) I would expect to have here Sort all DATA statements QF. data: g_error type c. data: gs_header type bapisdhd1. data: gs_headerx type bapisdhd1x. data: gt_return type table of bapiret2. data: gt_items type table of bapisditm. data: GT_itemsx type table of bapisditmx. data: GT_partners type table of bapiparnr. data: gt_schedules type table of bapischdl. data: gt_schedulesx type table of bapischdlx. data: gs_items type bapisditm. data: gs_itemsx type bapisditmx. data: gs_partners type bapiparnr. data: gs_schedules type bapischdl. data: gs_schedulesx type bapischdlx. data: gt_texts type table of bapisdtext. data: gs_texts type bapisdtext. data: gs_return like line of gt_return. image

fidley commented 7 months ago

Anyway, I've corrected it :)

fidley commented 7 months ago

Additionally, I didn't even knew such syntax is possible xD But it crashes. It could be an issue of my part of the code (AbapStatement class) image image

fidley commented 7 months ago

I will try to add your QF to the help and release notes tomorrow. Then I will deploy it :) Thanks for contribution!

lukas-mb commented 7 months ago

Haha, I've never seen this syntax before either. And thanks for the correction!

If I have a new idea, I'll get back to you :)