2016 Jul 26 11:12 AM
Hello,
I'm frequently running into the following issue: When typing in opening parentheses "(" with "automatically close parentheses" turned on, the ABAP code editor automatically inserts a space after the opening parenthesis. This a sensible choice for method calls, but it's not helpful for character field length specifications or inline data declarations. I always end up typing DATA( foobar) and find myself navigating back to delete the unwanted space. If I turn off "automatically close parentheses", I get neither the space nor the closing parentesis. Would it be possible to de-couple the space and the closing parenthesis from each other in the settings?
Thanks
Volker Wegert
2016 Aug 18 11:37 AM
Hi Volker,
I faced the same issue, yesterday. I defined an inline data declaration (i.e., DATA(<variable name>)) in a program in the very beginning of a source code line: The editor added a space between the brackets.
If there were some spaces in front of the DATA(<variable name>), the space would not be added.
We plan to provide a fix for this situation with the next version of our plug-ins. Could you provide further code snippets where it won’t work for you. We will try to reproduce and fix the issue also for these examples.
Thanks
Michael
2016 Jul 26 12:12 PM
Hi Volker,
I just checked the behavior in my ADT client 2.60. When I enter DATA( in the editor I will not get a space. The space is only inserted for CALL METHOD REF->HUGO(
Which client version do you have?
Regards,
Thomas.
2016 Jul 26 12:25 PM
Hi Thomas,
I'm using com.sap.adt.core.devedition.feature.group 2.60.4 - hope that's the version you meant. I've just rechecked after re-enabling the "close parentheses" setting:
Best regards
Volker
2016 Jul 26 1:01 PM
Hi Volker,
I'm a bit confused about which feature we are talking here. I mean that feature here:
And you?
Regards,
Thomas.
2016 Jul 26 1:35 PM
Hi Thomas,
we're talking about exactly the same feature.
Best regards
Volker
2016 Jul 26 5:50 PM
Hi Thomas,
I would also be happy, if the automatic space could be turned off or even better only occur, when needed.
I would more likely enter a space where needed, then going back and delete the unwanted space.
Best regards,
Dominik
2016 Aug 18 11:37 AM
Hi Volker,
I faced the same issue, yesterday. I defined an inline data declaration (i.e., DATA(<variable name>)) in a program in the very beginning of a source code line: The editor added a space between the brackets.
If there were some spaces in front of the DATA(<variable name>), the space would not be added.
We plan to provide a fix for this situation with the next version of our plug-ins. Could you provide further code snippets where it won’t work for you. We will try to reproduce and fix the issue also for these examples.
Thanks
Michael
2016 Aug 18 12:05 PM
Hi Michael,
The same is when you want to use:
Cheers
Łukasz
2016 Aug 26 2:27 PM
Hi Michael,
you are right, I never noticed that before: The problem with DATA(foo) only seems to appear if there is no whitespace at the very first position of the line. I get the same problem with VALUE() in a returning parameter if there is no whitespace before it in the line. However, as Łukasz mentioned, the problem also occurs at any other position in some cases (although I believe that's different and much harder to solve).
Best regards
Volker
2016 Aug 26 4:28 PM
Hi Volker,
Thanks, we have already fixed it for other keywords like VALUE(...), FIELD-SYMBOL(...), etc.
Kind regards,
Michael
2016 Aug 26 4:34 PM
Hi Lukasz,
let's see whether we could improve the behaviour for the message statement.
Most probably, we won't be able to provide an improvement for the length access on variables, because we can't distinguish between a variable and a method, currently at the client. Accessing the ABAP server would take too much time.
Thanks for providing the examples,
Michael
2016 Aug 26 6:24 PM
Hi Michael,
thanks.
Coming back to length acces, maybe it won't cover 100% of the cases but at least when you have "xxx+n(" then it's on 99% lenght access. You won't have problem with methods in this case as there is no such syntax with methods.
What do you think?
Cheers
Łukasz
2016 Aug 29 9:39 AM
Hi Łukasz,
Coming back to length acces, maybe it won't cover 100% of the cases but at least when you have "xxx+n(" then it's on 99% lenght access. You won't have problem with methods in this case as there is no such syntax with methods.
This came also to my mind. I was just not sure whether developers would get confused if there are two different behaviours for length-accesses and offset-length-accesses.
Michael
2016 Aug 29 9:52 AM