Giter Site home page Giter Site logo

Comments (4)

jmgrassau avatar jmgrassau commented on September 27, 2024 1

Hi Suhas,

so now with
image

the implementation section depends on the first "METHOD …" line, therefore you'd get:

image

Kind regards,
Jörg-Michael

from abap-cleaner.

jmgrassau avatar jmgrassau commented on September 27, 2024

Hi Suhas,

with "Derive from first statement", ABAP cleaner indeed separately determines the casing from

  • the first statement in a class definition (i.e. the CLASS ... DEFINITION line itself)
  • the first statement in a class implementation (i.e. the CLASS ... IMPLEMENTATION line itself)

The idea behind this is that in class definitions, SE80 always seems to use lower case keywords and upper case identifiers (regardless of the settings in menu "Utilities / Settings" -> ABAP Editor -> Pretty Printer), while for class implementations, SE80 does observe these settings, so SE80 could produce different formatting for the implementations (e.g. upper case keywords and lower case identifiers).

Therefore, if "derive from first statement" would now only derive the settings from the CLASS … DEFINITION line and someone in the team still uses SE80, you would always end up to have everything in lower case keywords and upper case identifiers – and that might not be intended, even by the SE80 users.

But you're right: SE80 does seem to put CLASS <NAME> IMPLEMENTATION to upper case! That makes this line rather useless to derive the settings from, of course. I think the best way to solve this would be to derive the settings for the implementation part from the first "METHOD method_name" line.

If that's still not satisfying, we could of course consider to add another option to the "Auto-determine upper/lower case" selection, so everyone could decide for themselves:

  • "derive from first statement in code document" (as ABAP Formatter does)
  • "derive from first statement of a class definition / method implementation"

Kind regards,
Jörg-Michael

from abap-cleaner.

suynwa avatar suynwa commented on September 27, 2024

"derive from first statement of a class definition / method implementation"
This is promising 🥇

from abap-cleaner.

jmgrassau avatar jmgrassau commented on September 27, 2024

Hi Suhas,

thanks again for this hint! The renamed option and adjusted behavior was now released with version 1.5.3, hope it helps!

Kind regards,
Jörg-Michael

from abap-cleaner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.