waldo1001 / crs-al-language-extension

Make working with the (Dynamics NAV / 365) AL Language easier and more efficient.
MIT License
34 stars 43 forks source link

Problem automatic added suffix for Page Controls #243

Open RaKuNbg opened 2 years ago

RaKuNbg commented 2 years ago

Hi Waldo, I guess that my problem is related to your al-language-extension..

I have these settings in my settings.json file: image

Now I had to do a little change in one of my page extensions. When I saved the file, I got theses changes: image

Questions:

waldo1001 commented 2 years ago

THis is what the changelog says: It was introduced on: [1.1.0] - 2019-03-26 because of this issue: https://github.com/waldo1001/crs-al-language-extension/issues/93

There is no setting, since this is quite mandatory.

First time I see that the controls in the lower part are not updated .. seems there is a bug :-/.

RaKuNbg commented 2 years ago

Thanks for the quick response I just checked some more files in my repository and it seems that I have the suffix in almost every page extension except some single ones.

And I think the cause of the bug could be parenthesis in the field or functionname of the control:

Here are two examples where the suffix was not added after changing the object: image image Please check if that is the problem

But that still does not explain why in first example had the suffix in none of the controls

But one of my questions of the initial post is still open: Is it intentionally that these changes are applied when "crs.OnSaveAlFileAction": "Rename" ==> Shouldn't it be only if the option is "Reorganize" or what excactly is the difference between the two options? ==> Would a third option "Rename and Reorganize" make sense?

pri-kise commented 2 years ago

I think this issue is somehow similiar to my last issue https://github.com/waldo1001/crs-al-language-extension/issues/210:

The problematic line is probably the following: https://github.com/waldo1001/crs-al-language-extension/blob/8d1444c468acbbdf59faa545943ca721d76a2228/src/NAVObject.ts#L592

Maybe all of the .fieldRegEx functions should be updated.

@christianbraeunlich maybe you can check those regexes, since you fixed the other one perfectly.