Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default cleanup range 'Current class' does not work (as expected?) #62

Closed
ConjuringCoffee opened this issue Jun 14, 2023 · 2 comments
Closed
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@ConjuringCoffee
Copy link
Contributor

Hi Jörg-Michael,

I have found that the default cleanup range "Current class" does not work the way I expected it to. Here's a global class as an example:

CLASS ycl_cleaner_example DEFINITION
  PUBLIC
  FINAL
  CREATE PUBLIC .

  PUBLIC SECTION.
    methods example.
  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.



CLASS ycl_cleaner_example IMPLEMENTATION.
  METHOD example.

  ENDMETHOD.

ENDCLASS.

If I place my cursor inside the method implementation, then I would have expected the cleanup range to target the entire class. However, it only applies to the method:

image

Is this a bug or am I just misinterpreting the option?

@ConjuringCoffee ConjuringCoffee changed the title Default cleanup range does not work (as expected?) Default cleanup range 'Current class' does not work (as expected?) Jun 14, 2023
@jmgrassau
Copy link
Member

Hi ConjuringCoffee,

yes, you're right – but it's not really a bug: In includes, you do not always have the class DEFINITION directly next to the IMPLEMENTATION (but rather, three different classes may be defined before then the three implementations follow); but the cleanup range currently is a single range of lines only.

Kind regards,
Jörg-Michael

@jmgrassau jmgrassau added the documentation Improvements or additions to documentation label Jun 14, 2023
@jmgrassau jmgrassau self-assigned this Sep 22, 2023
jmgrassau added a commit to jmgrassau/abap-cleaner that referenced this issue Sep 22, 2023
@jmgrassau
Copy link
Member

Hi ConjuringCoffee,

FYI, I now enhanced the documentation on the Default cleanup range accordingly.

Kind regards,
Jörg-Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants