Code Templates a.k.a. Code Snippets are a concept that makes writing code easier. Many IDE’s have a similar feature. Certain code parts are repetitive and by using a template you can simplify writing code as the generic part of the code will be added by CodeGenius Studio. All you as a developer need to do is supply some variables if any.
Here are some examples:
IF SalesLine.FINDSET THEN
... Your custom code ...
UNTIL SalesLine.NEXT = 0;
Basically any code could be considered a template. Base criteria is that you repeat some code regularly that may be slightly different. When it is different you would want to make a small change.
For example: you will not always write a FIND loop for the Sales Line table. You would want to be flexible in which table you want to loop through. CodeGenius Studio has the answer: Code Tags! You can define you own tags making CodeGenius Studio a very effective tool to help you insert repetitive code. When you hit a predefined hotkey the tags you have defined will require your input and after supplying the required info, CodeGenius Studio will insert the code for you.
CodeSmart code completion for Dynamics NAV 2013R2 and older versions
Before Dynamics NAV 2015 and the new code editing features there was no help in code completion. Since version 6, CodeGenius Studio has CodeSmart. This feature allows you to have code completion in your code editor. Obviously, the new code editing features with intellisense supersede this feature and can be turned off when coding in the newer versions of Dynamics NAV.
CodeSmart, the code completion feature in CodeGenius Studio actually discovers it’s position in the code editor making the suggestion accurate and reliable. It has also been designed to be fully customizable and therefore a useful asset when developing in Dynamics NAV.
With the option to integrate templates into CodeSmart, a valuable addition is made to your coding experience. Some developers like the hotkey method that is available in CodeGenius Studio. Others like the ability to extend further and integrate into CodeSmart. CodeGenius Studio makes this all possible.
The CodeSmart window docks into the Dynamics NAV code editor and when you hover your mouse over the options suggested the predefined CodeSmart option will display the syntax of the method or show a custom tooltip you added to your template. This improves the usability even further because you have your help file underneath your mouse! And best of all you can edit it all to your likings.