Closed ernestasjuska closed 4 years ago
So .. they made a rule to force a fixed naming behaviour :-/. Not sure I like that :(.
Thanks for the headsup - I guess I'll need to solve this by the time they release it.. .
Hello, It seems that the new naming rule of microsoft does not include the affix in the file name! The new naming: "ObjectNameExcludingPrefix.FullTypeName.al' 'ObjectNameExcludingPrefix.FullTypeNameExt.al'
Thanks
Well, I have an issue with this ... . If I change anything on the "auto renaming" part, I will start creating new names all of a sudden in existing environments - without people expecting it .. :-/.
Don't know what I should do, to be honest :(.
@ernestasjuska , @hmerbouche ,
I decided to add a seperate tag as suggested ... . As I don't have a complete overview - do you think this is conclusive - not sure about the controladdin :-/ - and no way I can look it up ... ?
case 'page': return 'Page';
case 'pageextension': return 'PageExt';
case 'codeunit': return 'Codeunit';
case 'table': return 'Table';
case 'tableextension': return 'TableExt';
case 'xmlport': return 'XmlPort';
case 'report': return 'Report';
case 'query': return 'Query';
case 'profile': return 'Profile';
case 'pagecustomization': return 'PageCust';
case 'enum': return 'Enum';
case 'enumextension': return 'EnumExt';
case 'controladdin': return 'ConAddin';
@ernestasjuska @hmerbouche ,
if you'd like to test it - here's a pre-build: https://www.dropbox.com/s/7vvkwit4t9qujw9/crs-al-language-extension-1.1.20.vsix?dl=1
I think these settings should work as "Best Practice", which make you able to use a prefix (or suffix), not add it in the filename, and the pascalcasing is there ... .
"CRS.OnSaveAlFileAction": "Rename",
"CRS.FileNamePattern": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
"CRS.FileNamePatternExtensions": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
"CRS.FileNamePatternPageCustomizations": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
"CRS.ObjectNamePrefix": "ALDA ",
"CRS.RemovePrefixFromFilename": true,
@waldo1001
I tested the new vsix and the new setting, it seems just perfect! Do you know when you can release this new version? Thanks
@waldo1001 To complete / correct your list :) Object | Abbreviation
Request Page | RequestPage Control Add-ins | ControlAddin Dotnet | Dotnet
@waldo1001
Thanks. It works great.
Tested control add-ins naming: For controladdins it should return "ControlAddIn" with capital "I".
Found one more type: interface "LBC My Interface" { }
should be in file LBCMyInterface.Interface.al
.
Pretty soon ;-)
@waldo1001 Do you like to change ConAddin to ControlAddin like the Suggestion from Microsoft?
Forced naming standard :( That would be the worst. The current standard isn't very readable. Gimme my spaces.
Hi,
New code analysers from AL Language extension shows warning if file is not named correctly. E.g:
table 123 "PREFIX My Demo"
should be in filePREFIXMyDemo.Table.al
, andpage extension 1234 "PREFIX My Demo Ext" extends "Standard Page"
should be in filePREFIXMyDemoExt.PageExt.al
.My initial guess was to use this:
This does not correctly capitalize object type (e.g. gives "codeunit" intead "Codeunit"), and does not give shorter extension object type (e.g. gives "pageextension" instead "PageExt").
I'm using AL Language extension 5.0.191295 (that's from insider BC version).
IMHO all that is missing is
<ObjectTypeShortPascalCase>
that would give "Table", "Page", "Codeunit", "Report", "Query", "XmlPort", "Enum", "TableExt", "PageExt", "EnumExt", "PageCust".Analyser does not consider case however it PascalCase looks nicer.
Thanks.