All notable changes to the "crs-al-language-extension" extension:
Once again many changes by Christian Bräunlich - Big thanks again!
- Fixed snippets
- Improved the README
- Fixed issue "Prefix missing for Names containing % or brackets ( )" by Christian Bräunlich - Big thanks again!
- Updated snippets by Christian Bräunlich - Big thanks!
- Added
Event
keyword - thanks Frédéric Vercaemst!
- Snippet updated by Arthur. Thanks so much!
- Added setting
SkipWarningMessageOnRenameAll
that does just that ;-). Thanks Mustafa Kilic for the pull request! - Updated snippets tcodeunitMethodWithoutUIwaldo & tcodeunitMethodWithUIwaldo (renamed "Handled" to "IsHandled") (thanks IceOnly)
- Fixed snippet tinstallcodeunitwaldo (thanks Alexander Henkel)
- Fix about loading setting from multiple levels. (Thanks dannoe)
- Fix regarding runobject with certain browsers. (Thanks geschwint)
- Fix regarding naming convention of PermissionSet(Extension) (Thanks Tomas Kapitan)
- Added functionality: use comments to disable crs-string-manipulation (Thanks askotnica)
//crs-al disable
...
//crs-al enable
Improved snippets (also thank you Christian Bräunlich)
Updated snippets (including v19)
PR: Reuse crs terminal if one already exists by James Pearson - Thanks so much, James!
New command CRS: Compile DGML
, which enables the new capabilities of the compiler to generate a DGML document that can be opened by a DGML reader (usually Visual Studio).
Renamed "Run AL Test Tool" command.
New objects: PermissionSet
and PermissionSetExtension
in rename process
Added snippets:
tinstallcodeunitwaldo
- A template install codeunit. (thank you Waldemar and AJ)tUpgradeCodeunitwaldo
- A template upgrade codeunit.tUpgradeTableProcedurewaldo
- A template procedure to move all data from one table to the next.tUpgradeFieldProcedurewaldo
- A template procedure to move field data from one table to the other.
Improved snippets (thank you Daniel)
Added command CRS: Configure Best-practice File Naming
, it will set up your user settings or workspace settings with some settings that are considered to be best practice (Thank you, Vjeko).
Added:
- Support for Report Extensions
- New snippets regarding
GetRecordOnce
in setup tables. - Warning when using Chrome in combination with RunObject commands
- Take comments into account - it might have confused the object parsing (Bug 167)
Fix a very rare case where a rename could overwrite a file.
Added new command: CRS: Publish and Run Current Object
. Now you don't have to compile/publish first, to run object afterwards - it's all one command now!
Added "internal" to the method-snippet. Thanks Stefan!
Added 2 snippets for Notification Codeunit Patterns (described by Luc van Vugt):
tnotificationcodeunitwaldo
: (Notification Codeunit with a bunch of needed mechanics)tmynotificationscodeunitwaldo
: (same is above, but now with added subscriber to add the notification to the "My Notifications" page)
More information on Luc's blog:
Fix - run CRS: Create GraphViz Dependency Graph
on "just" a folder with lots of apps. Open the folder in VSCode, run the command.
New Command: CRS: Create GraphViz Dependency Graph
This command will read all app.json files in your workspace (so this function is really useful in a Multi-root workspace) and create a .dot dependency file from it. To display this file graphically, I recommend to also install the extension Graphviz Interactive Preview. If you have, this command will automatically open the preview after generating the graph.
This functionality will take these settings into account:
CRS.DependencyGraph.IncludeTestApps
: Whether to include all dependencies to test apps in the Dependency Graph.CRS.DependencyGraph.ExcludeAppNames
: List of apps you don't want in the dependency graph.CRS.DependencyGraph.ExcludePublishers
: List of publishers you don't want in the dependency graph.CRS.DependencyGraph.RemovePrefix
: Remove this prefix from the appname in the graph. Remark: this has no influence on the 'Exluce AppNames' setting.
Fix from Márton Sági about focusing webview and performance loss. Fixed a few snippets to comply with CodeCops
Fixed: action indentation after rename
New setting:
CRS.RemoveUnderscoreFromFilename
: When using the Reorganize/Rename-commands, this setting will remove any underscore from the filename (but keep it in object name). Tip: use as a workspace-setting
Fixed:
- Prefix/Suffix with underscores fails to be removed from filename
- Prefix/Suffix in procedures to objects parameters if procedure name ends with "action"
Finally found a solution for the annoying snippets that popped up in IntelliSense when not wanted.
Added:
Fixed:
- if/then statement runs tcodeunit snippet
- Remove the '.' in assistedsetup snippets
- Renaming doesn't remove underscore
- Renaming files fails on codeunits that implement interfaces
- Intellisense on EventSubscriber Procedure
Added support for "Interface" object of Business Central v16
Fixed a small issue with renaming extension objects with long name (and auto object naming)
Fixed issue when autorenaming resulted in a table-/pageextension that was too long.
New Command: "CRS: Search Object Names"
- It will search the selected object name in all your files.
- The regex can be set up with the setting
CRS.SearchObjectNamesRegexPattern
. - This idea comes from this blog by Jack Mallender. Thank you so much - this is extremely useful :-).
Changed - Allow renaming to result in too big object names
Added and updated snippets, like:
- tassistedsetup - for version >=15
- tProcedureFromClipboard - to convert a piece of code into a function, just cut the code and use this snippet - pretty cool ;-).
- tTestHandler.. - multiple snippets for easily adding handlers in test-codeunits
- added "caption" to snippets with also "UsageCategory" (to enable translation).
- Improved "Option" snippet. Reported by SirBETE
Solved:
- Updated naming convention for Control Addin (Thanks to this pullrequest.)
- Wrong behaviour when using "Trigger" as a new of a control (don't remember who gave the feedback, my apologies. here is the commit)
- Run Object for named online sandbox.
- Use al browser settings (if any). Reported by mjmatthiesen here.
Added keywords as suggested here by Frédéric Vercaemst.
Added <ObjectTypeShortPascalCase>
as an extra FilePattern option because Microsoft is going to include this as a Best Practice. Thanks ernestasjuska and hmerbouche for the heads up!
An example of the new "best practice" settings looks like:
"CRS.OnSaveAlFileAction": "Rename",
"CRS.FileNamePattern": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
"CRS.FileNamePatternExtensions": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
"CRS.FileNamePatternPageCustomizations": "<ObjectNameShort>.<ObjectTypeShortPascalCase>.al",
"CRS.ObjectNamePrefix": "ALDA ",
"CRS.RemovePrefixFromFilename": true,
- Improved:
- Prevent deleting files because of Multiroot Issue (Issue RenameWithGit icw MultiRoot workspace removes files)
- All snippets
- Renamed to "waldo's al language extension". Initially, it was intended to be built by the team members of CRS. But it turned out to be a purely community project by waldo only - so renaming it was inevitable ;-). I expect to rename the commands at some point as well.. .
Fixed: Test Snippets - it included a "." in the names, but seemed to break the "AL Test Runner". Changed to "_"?
Fixed: Remove spaces in ControlAddIn names and paths.
Fixed:
- When using keywords as fieldnames, you really NEED the surrounding quotes. Issue on github: Surround Keywords with doublequotes.
- Make rename/reorganize work for controladdins. Improved:
- Show output when there is a git-warning.
Fixed:
- ExtensionObjectNamePattern could create too big object names
- Update tpagewizard to avoid missing paranthesis warning - Thanks Chris!
- Fixed issue with special chars in field names, mentioned by omurcanates and fixed by Kenneth Fuglsang.
- Removed spaces from snippet prefixes, which makes it behave much better in IntelliSense.
- Kenneth Fuglsang changed the field-handling: only add quotes when necessary. Thanks so much!
- New and improved Method Snippets
Fixed:
- Rename command adds quotes around all object + control names by rvanbekkum - thanks so much!
- Improved stability for "rename with Git" (remember the setting
crs.RenameWithGit
) - snippet - tfield does not show DateTime as you time - reported by GreatScott000
- vulnerability issue with typescript
Improved snippets, including a contribution of Rasmus Aaen with a snippet for test cases by this pullrequest.
Fixed:
New:
- Run Current object from Status Bar / Right click
- New Output channel for this extension: all actions are logged there!
Improved:
- Renaming/Reorganizing using
git mv
, as requested by Chris Blank here. Enable by setting this setting:RenameWithGit
: Use 'git mv' to rename a file. This keeps history of the file, but stages the rename, which you should commit separately. The feature is still in preview-mode, therefore the default value is 'false'
- Add Prefix/Suffix to pageextension Groups and Fields
- Significantly less Debug Console Messages
- Snippets thanks to Chris Blank!
Fixed: "case insensitivity" for file extensions - Rename/Reorganize AL File in extension of file is in caps
- Added Extension API. By Pullrequest of Andrzej Zwierzchowski. Thanks so much! :-)
- Fixed small security issues
- slightly improved the table-snippet
- Merged Pull Request of Rasmus Aaen - Fixed casing and parenthesis
- Fixed - Issue with situations when many comments are in a file, which could cause (by exception) taking the wrong text for determining the object properties. Filed by Luc van Vugt in this issue.
- Fixed - Issue with leading comments in a file, which could cause the regex to end up taking wrong conclusions. Issue by Laura Nicolas.
- Small improvement on snippet(s)
- Fixed - Snippet "tFieldOption" by this Pull Request. Thanks ThePsionic!
- Fixed - CRS.WinServerInstance Expected String
- Fixed - Removed vulnerable dependencies "flatmap-stream" and "event-stream"
- Improved tooltips for settings
- Improved - Reopen files when renaming, reorganizing all files - by PR from Martin Kuhn. Thank you!
- Updated dependent modules & Changed/Reset compile-tasks to default behaviour
- Disabled command "Install Waldo's Modules" as this was never used, and not working like I would like it to. There is a better way to run powershell, and I'll implement that first.
- Added - Run page "Event Subscribers" from the command palette
- Added - Run page "Database Locks" from the command palette
- Improved - Close all files first when renaming / reorganizing all files
- Fixed - When auto renaming file, previous file stays open
- Fixed - other minor issues
- Added - When renaming a file, the cursor is positioned on the same place as it was before the rename
Fixed snippets
- Fixed - Reorganize doesn't work for enums
- Synched and improved snippets from the 2.0-version of the Microsoft-al extension.
- Fixed - Bug with not-lowercased object types
- Fixed - Using Rename/organize on file with unsaved changes creates duplicate files - by PR from Johannes Wikman. Thank you!
After 10k downloads, I guess we can speak of a version 1.0 ;-).
Changes:
- Added Snippets:
- flowfields: tflowfield, tflowfieldcount, tflowfieldexist, tflowfieldsum, tflowfieldlookup (Idea from "GreatScott000")
- Headline: tpageheadline (Pullrequest from Dmitry. Thanks!)
- RoleCenter: tpagerolecenter, ttableactivities, tpageactivities (Pullrequest from Dmitry. Thanks!)
- Fixed - Unnecessary error message while disabling snippets
- Fixed - ttrigger within field
- Fixed - Default AL Snippets won't disable
- Fixed - issue with Reorganize files (case sensitivity)
Fixed unreadable documentation - basically nothing changed
- New Feature: automatic object name for Extension Objects with a new setting:
CRS.ExtensionObjectNamePattern
: The pattern for the object name. If set (it's not set by default), it will perform an automatic object name for extension objects<Prefix>
<Suffix>
µ<ObjectType>
<ObjectTypeShort>
- a short notation of the object type.<ObjectTypeShortUpper>
- Same as "ObjectTypeShort" but uppercased<ObjectId>
<BaseName>
- weird chars are removed - does NOT include prefix nor suffix<BaseNameShort>
- does NOT include prefix nor suffix<BaseId>
- If you want this to work, you need to put the Id in comment after the base name (see below)
-
Fixed prefix and suffix behaviour:
- Now also suffixes on fields and actions
- No suffix/prefix anymore on action of new pages
-
Fixed setting "CRS.AlSubFolderName" - changed "Src" to "src", as that is Microsoft's recommendation (pullrequest from spookymattress :-)).
-
Added functionality: Search on Google / Microsoft Docs - these two commands have been added to search for any given search string on Google or Microsoft Docs:
- CRS: Search Microsoft Docs
- CRS: Search Google
The selected word in the editor will be added by default as a search string and the search string "Business Central" will automatically be added.
- No bugfixes (none reported)
- Improved efficiency of many existing snippets
- Added snippets for "fieldgroups" (like Brick and DropDown)
Two new settings by pullrequest from Johannes Wikman:
CRS.RemovePrefixFromFilename
: When using the Reorganize/Rename-commands, this setting will remove any prefix from the filename (but keep it in object name). Tip: use as a workspace-settingCRS.RemoveSuffixFromFilename
: When using the Reorganize/Rename-commands, this setting will remove any suffix from the filename (but keep it in object name). Tip: use as a workspace-setting
- This pullrequest that was created by Johannes Wikman solved a problem with weird characters in the objects names.
- The pullrequest above also also solved this GitHub Issue, by Mohana Yadav.
-
Solved Github Issue and in the meanwhile, I have been refactoring and extending the "Rename FileName" functionality a bit, resulting in these tags (copy from ReadMe.md):
<Prefix>
- just the prefix separately<Suffix>
- just the suffix separately<ObjectType>
<ObjectTypeShort>
- a short notation of the object type.<ObjectTypeShortUpper>
- Same as "ObjectTypeShort" but uppercased<ObjectId>
<ObjectName>
- weird chars are removed - includes prefix and suffix<ObjectNameShort>
<BaseName>
- weird chars are removed - does NOT include prefix nor suffix<BaseNameShort>
- does NOT include prefix nor suffix<BaseId>
- If you want this to work, you need to put the Id in comment after the base name
-
Solved Github Issue - renaming with prefix messed up the format of the fields
-
Solved Github Issue - ability to override the launch.json with a PublicWebBaseUrl
- Fix Issue with slash in base object name
- Some small improvements in snippets
- Better permission-xml snippet
- Run Current Object for Extension-objects
- Run Object in Cloud Sandbox
"Reorganize" will move a test-codeunit to the test-folder (github)
- Minor changes to some existing snippets
- Two snippet-contributions from Dmitry Katson (More info here): ttablesetup & tpagesetup - create setup-table with page
Configurations:
CRS.AlSubFolderName
: Added "Src" and "Source" folder (which Microsoft uses internally). Remember: 'None' prevents the 'Reorganize' to do anything (if you want to apply your own folder structure)CRS.DisableDefaultAlSnippets
is not by default "true" anymore as I decided that disabling the default AL snippets should be a conscious decision.
Added following snippets:
- tmynotifications - apply "discover event subscriber" for adding a "My Notification"
- tassistedsetup - apply "discover event subscriber" for adding an assisted setup
- tserviceconnection - apply "discover event subscriber" for adding a service connection
- tvar - a somewhat easier way to create a variable
Also applies prefix to fields on table extensions (not tables)
Now it will also apply the prefix to actions (requirement for Business Central)
Behind the scenes:
- Major redesign of the code
- Implemented testability
- Minor bugfixes
New command - Run CAL Test Tool in Web Client
Small bugfix - Github
Improved some snippets.
Added 2 new settings to control "prefix" and "suffix" of object names and filenames:
CRS.ObjectNamePrefix
: When using the Reorganize/Rename-commands, this setting will make sure the object name (and filename) will have a Prefix.CRS.ObjectNameSuffix
: When using the Reorganize/Rename-commands, this setting will make sure the object name (and filename) will have a Suffix.
Added an ability to rename/reorganize when you save a document. This way, your commit to SCM will always to be correct:
CRS.OnSaveAlFileAction
: Automatically will Rename/Reorganize the file you are editing. Takes into account the prefix/suffix as well.
Improved snippets
New command:
- CRS: Run Current Object (Web Client) (CTRL+SHIFT+r) New settings:
- DisableDefaultAlSnippets
- DisableWaldoSnippets Snippets:
- improved snippets from the al language extension
Bugfix - Reorganizing/Renaming Files - Issue On Github
Changelog activated like it should!
- Reorganize File(s) - Variable subfolder
- Support multi-root workspaces
New snippets to create a permission- & Webservice-metadata file.
Quite an important bugfix: ObjectId was swapped into ObjectName (typo :-/)
Added ability to use "ObjectNameShort" or "ObjectName" for renaming files. Added support for "&" in the name.
Following Changes were added:
- Alligned the file naming to the ones that are documented by microsoft here.
- Added tableextension and pageextension as snippets to help users include an BaseObjectId to be able to do the rename
- reopen file when renaming/reorganizing current file.
Added ability to run Table in web client
Minor but important (;-)) bugfix.
Updated Readme.md
The following commands were added:
- Rename Current File
- Rename All Files
- Reorganize Current File
- Reorganize All Files Rename: reads the file, and renames it to a certain filename, depending on the object. Reorganize: move the file to a folder, corresponding to the object type.
Added Snippet - Page Wizard
- Added Snippet - Method Codeunit (No UI)
- Bugfixing - for build operation
Bugfixing - for September Release.
Bugfixing - getting everything decently published on the Marketplace
Initial release