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

Auto-rename incorrect when file starts with XML documentation comment #223

Open vjekob opened 2 years ago

vjekob commented 2 years ago

When a file starts with an XML Doc comment (supported by AL language and VS Code for purpose of IntelliSense), and this comment includes something that looks like an object definition, auto-rename results in incorrect file name.

For example:

/// <summary>
/// ...
/// This interface "does not contain full suite of" `HttpClient` (yet), but provides everything that is necessary...
/// ...
/// </summary>
interface "DTS IHttpClient"
{
    // ...
}

This file gets renamed to doesnotcontainfullsuiteof.Interface.al instead of DTSIHttpClient.Interface.al.

waldo1001 commented 2 years ago

Would be nice that there is a parser somewhere I could use in stead of regex 🤪

Ji-Peter commented 2 years ago

you can use regex to ensure that there's no / in front of the <ObjectType> <ObjectID> <ObjectName> I had to do that to fix this exact issue.

ernestasju commented 5 months ago

Hi,

Would be nice that there is a parser somewhere I could use in stead of regex 🤪

This extension has a working AL parser and can do syntax tree operations AZ AL Dev Tools/AL Code Outline. The only nuisance is that it depends on CRS extension. 😄