waldo1001 / crs-al-language-extension

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

Sugestion: reorganize folders add option to use a specific folder for API objects #280

Open ti-jalopez opened 1 year ago

ti-jalopez commented 1 year ago

Nowadays it is quite common to create API pages. It would be nice to use a folder for the APIs, instead of using the Page folder.

Perhaps a parameter can be added to indicate if a different folder is used for the APIs, using the default API as a folder name.

Best regards,

ernestasjuska commented 9 months ago

Hi, we use the following way to group API pages:

// in .vscode/settings.json or your.code-workspace
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
    "*.report.al": "$(capture).report.rdl, $(capture).report.docx, $(capture).report.xlsx",
    "*.reportext.al": "$(capture).reportext.rdl, $(capture).reportext.docx, $(capture).reportext.xlsx",
    "_APIPageContainer.txt": "API*.Page.al",     // <------------------
    "_APIQueryContainer.txt": "API*.Query.al",   // <------------------
},

So if you create a file named _APIPageContainer.txt in pages folder all pages starting with API will appear to be under _APIPageContainer.txt. image

This only works in inside VS Code though.