Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jwikman committed Aug 16, 2018
2 parents 184446d + f0aa92e commit 1f9d083
Show file tree
Hide file tree
Showing 29 changed files with 1,150 additions and 197 deletions.
73 changes: 62 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,74 @@
# Change Log
All notable changes to the "crs-al-language-extension" extension.
## [1.0.0] - 2018-08-03
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"](https://github.com/CloudReadySoftware/crs-al-language-extension/issues/67))
- Headline: tpageheadline (Pullrequest from [Dmitry](https://github.com/CloudReadySoftware/crs-al-language-extension/commits?author=dkatson). Thanks!)
- RoleCenter: tpagerolecenter, ttableactivities, tpageactivities (Pullrequest from [Dmitry](https://github.com/CloudReadySoftware/crs-al-language-extension/commits?author=dkatson). Thanks!)
- Fixed - [Unnecessary error message while disabling snippets](https://github.com/CloudReadySoftware/crs-al-language-extension/issues/65)

## [0.2.24] - 2018-07-13
- Fixed - [ttrigger within field](https://github.com/CloudReadySoftware/crs-al-language-extension/issues/66)
- Fixed - [Default AL Snippets won't disable](https://github.com/CloudReadySoftware/crs-al-language-extension/issues/65)
- Fixed - [issue with Reorganize files (case sensitivity)](https://github.com/CloudReadySoftware/crs-al-language-extension/commit/9adaa8988eec3dd4cde317f5e5e9e117568ee570)

## [0.2.22] - 2018-07-06
Fixed unreadable documentation - basically nothing changed

## [0.2.20] - 2018-07-06
- 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)

## [0.2.19] - 2018-07-03
- 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](https://github.com/CloudReadySoftware/crs-al-language-extension/pull/63) from [spookymattress](https://github.com/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.

## [0.2.18] - 2018-07-02
- No bugfixes (none reported)
- Improved efficiency of many existing snippets
- Added snippets for "fieldgroups" (like Brick and DropDown)

## [0.2.17] - 2018-06-24
Two new settings by [pullrequest](https://github.com/CloudReadySoftware/crs-al-language-extension/pull/56) from [Johannes Wikman](https://github.com/jwikman):
- `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-setting
- `CRS.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

## [0.2.16] - 2018-06-21
- This [pullrequest](https://github.com/CloudReadySoftware/crs-al-language-extension/pull/53) that was created by [Johannes Wikman](https://github.com/jwikman) solved a problem with weird characters in the objects names.
- The pullrequest above also also solved this [GitHub Issue](https://github.com/CloudReadySoftware/crs-al-language-extension/issues/54), by [Mohana Yadav](https://github.com/pmohanakrishna).

## [0.2.15] - 2018-06-13
- Solved [Github Issue](https://github.com/CloudReadySoftware/crs-al-language-extension/issues/48) 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
- `<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](https://github.com/CloudReadySoftware/crs-al-language-extension/issues/47) - renaming with prefix messed up the format of the fields
- Solved [Github Issue](https://github.com/CloudReadySoftware/crs-al-language-extension/issues/44) - ability to override the launch.json with a PublicWebBaseUrl
Expand Down
File renamed without changes.
92 changes: 58 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@ The idea is to be able to run an object straight from the development environmen
* CRS: Run Current Object (Web Client) (CTRL+SHIFT+r) - runs the object from the open file (the extension needs to be published first).
* CRS: Run CAL Test Tool in Web Client
Depending on which client, you will be asked for object type and object id. The functionality looks at the settings (launch.json and configuration settings).
![Run Objects](images/RunObject.gif)
### Reorganize Files
The commands can rename your file, and move the file to the folder, corresponding to the object type. There are four functions in the Command Palette:
* CRS: Rename - Current File
* CRS: Rename - All Files
* CRS: Reorganize - Current File
* CRS: CRS: Reorganize - All Files
Note - "Reorganize" will move a test-codeunit to the test-folder
### Search on Google / Microsoft Docs
Two commands have been added to search for any given search string on Google or Microsoft Docs. The search string "Business Central" will automatically be added.
* CRS: Search Microsoft Docs
* CRS: Search Google

The selected word in the editor will be added by default as a search string.

![Search on Google / Microsoft Docs](images/SearchGoogleDocs.gif)

### Snippets
al Snippets:
* tpagewizard (CRS: 3 steps)
Expand All @@ -41,7 +49,8 @@ al Snippets:
* Quite the same as the default snippet, but with the comment to include an TargetPageId to be able to properly rename the file (which might need that ID).
* tvar (CRS)
* Some easier way to greate a variable

* tfieldgroup(s) (CRS)
* To work with fieldgroups (Like "Brick" & "DropDown")
Apply some design patterns:
* tcodeunit (CRS: Method - No UI)
* creates a codeunit, conform on the "Event Based Software Architecture"
Expand All @@ -60,7 +69,6 @@ Snippets for building metadata (used in an xml-file):
* twebservice.. - 2 snippets
* tpermission.. - 3 snippets


This extension includes an (what I believe) improved version of all the al snippets that come default with the AL Language Extension from Microsoft. It's possible to disable the default al snippets in the settings, and enable the snippets from this extension. It's also possible to just enable both, or disable the CRS ones. For this, check the "Extension Settings" section below.

## Requirements
Expand All @@ -78,27 +86,37 @@ This extension contributes the following settings:
* `CRS.WinServerInstance`: Serverinstance where the windows client is connecting to
* `CRS.WinServerInstancePort`: Portnumber of the serverinstance where the windows client is connecting to
* `CRS.PublicWebBaseUrl`: Override Launch.json settings with this setting if necessary to run objects from VSCode
* `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)
* `CRS.FileNamePattern`: The pattern of the filename for non-extension objects.. These vars can be used:
- \<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\>
- `<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>`
* `CRS.FileNamePatternExtensions`: The pattern of the filename for extension objects. These vars can be used:
- \<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, like this example:
- `<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, like this example:
```al
tableextension 50100 "Just Some Table Extension" extends Customer //18
{
Expand All @@ -113,18 +131,24 @@ tableextension 50100 "Just Some Table Extension" extends Customer //18
}
```
* `CRS.FileNamePatternPageCustomizations`: The pattern of the filename for page customizations. These vars can be used:
- \<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
- \<ObjectName\> - weird chars are removed - includes prefix and suffix
- \<ObjectNameShort\> - includes prefix and suffix
- \<BaseName\> - weird chars are removed - does NOT include prefix nor suffix
- \<BaseNameShort\> - does NOT include prefix nor suffix
- \<BaseId\> - same remarks as above!
* `CRS.ObjectNamePrefix`: When using the Reorganize/Rename-commands, this setting will make sure the object name (and filename) will have a Prefix. Tip: use as a workspace-setting.
* `CRS.ObjectNameSuffix`: When using the Reorganize/Rename-commands, this setting will make sure the object name (and filename) will have a Suffix. Tip: use as a workspace-setting.
- `<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
- `<ObjectName>` - weird chars are removed - includes prefix and suffix
- `<ObjectNameShort>` - includes prefix and suffix
- `<BaseName>` - weird chars are removed - does NOT include prefix nor suffix
- `<BaseNameShort>` - does NOT include prefix nor suffix
- `<BaseId>` - same remarks as above!
* `CRS.ObjectNamePrefix`: When using the Reorganize/Rename-commands, this setting will make sure the object name (and filename) will have a Prefix.
- Tip 1: use as a workspace-setting.
- Tip 2: use an ending-space if you want the prefix to be separated with a space.
* `CRS.ObjectNameSuffix`: When using the Reorganize/Rename-commands, this setting will make sure the object name (and filename) will have a Suffix.
- Tip 1: use as a workspace-setting.
- Tip 2: use an start-space if you want the suffix to be separated with a space.
* `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-setting
* `CRS.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
* `CRS.AlSubFolderName`: Variable subfoldername. "None" means you want to disable the command to move files to a subfolder.
* `CRS.OnSaveAlFileAction`: Automatically will Rename/Reorganize the file you are editing. Takes into account the prefix/suffix as well.
* `DisableDefaultAlSnippets`: Disables the default snippets that come with the Microsoft.al-language extension. When you change the setting, you need to restart VSCode twice. Once for disabling the snippets on activation (at that time, the snippets are still loaded). And the second time to actually not load the snippets anymore.
Expand Down
Binary file removed images/Reorganize.gif
Binary file not shown.
Binary file renamed images/RunObject.gif → images/SearchGoogleDocs.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 23 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "crs-al-language-extension",
"displayName": "CRS AL Language Extension",
"description": "Make working with the (Dynamics NAV / 365) AL Language easier and more efficient.",
"version": "0.2.16",
"version": "1.0.0",
"publisher": "waldo",
"icon": "images/icon.png",
"author": {
Expand Down Expand Up @@ -89,6 +89,14 @@
{
"command": "crs.ReorganizeAllFiles",
"title": "CRS: Reorganize - All Files"
},
{
"command": "crs.SearchMicrosoftDocs",
"title": "CRS: Search Microsoft Docs"
},
{
"command": "crs.SearchGoogle",
"title": "CRS: Search Google"
}
],
"configuration": {
Expand Down Expand Up @@ -130,6 +138,12 @@
"description": "Public Web Url that overrules the setting in launch.json (empty setting will just take the settings in launch.json)",
"scope": "resource"
},
"CRS.ExtensionObjectNamePattern": {
"Type": "string",
"default": "",
"description": "The pattern of the objectname for extension objects (PageExtension or TableExtension). These vars can be used: <Prefix>,<Suffix>,<ObjectType>,<ObjectTypeShort>,<ObjectTypeShortUpper>,<ObjectId>,<BaseName>,<BaseNameShort>,<BaseId>",
"scope": "resource"
},
"CRS.FileNamePattern": {
"Type": "string",
"default": "<ObjectTypeShort><ObjectId>.<ObjectNameShort>.al",
Expand All @@ -150,14 +164,14 @@
},
"CRS.AlSubFolderName": {
"enum": [
"Src",
"src",
"Source",
"Objects",
"Al",
"None"
],
"type": "string",
"default": "Src",
"default": "src",
"description": "Sets the subfoldername of where the objects will be placed. 'None' prevents the 'Reorganize' to do anything (if you want to apply your own folder structure).",
"scope": "resource"
},
Expand All @@ -175,13 +189,13 @@
"CRS.ObjectNamePrefix": {
"type": "string",
"default": null,
"description": "When using the Reorganize/Rename-commands, this setting will make sure the object name (and filename) will have a Prefix. Tip: use as a workspace-setting",
"description": "When using the Reorganize/Rename-commands, this setting will make sure the object name (and filename) will have a Prefix. Tips: use as a workspace-setting. Use an ending-space if you want the prefix to be separated with a space.",
"scope": "resource"
},
"CRS.ObjectNameSuffix": {
"type": "string",
"default": null,
"description": "When using the Reorganize/Rename-commands, this setting will make sure the object name (and filename) will have a Suffix. Tip: use as a workspace-setting",
"description": "When using the Reorganize/Rename-commands, this setting will make sure the object name (and filename) will have a Suffix. Tips: use as a workspace-setting. Use an ending-space if you want the prefix to be separated with a space.",
"scope": "resource"
},
"CRS.RemovePrefixFromFilename": {
Expand Down Expand Up @@ -223,6 +237,10 @@
"language": "al",
"path": "./snippets/page.json"
},
{
"language": "al",
"path": "./snippets/table.json"
},
{
"language": "al",
"path": "./snippets/pageextension.json"
Expand Down
Loading

0 comments on commit 1f9d083

Please sign in to comment.