ObjectiveThe aim of Simplificy is to simplify the work of project developers at Efficy by adding to VSCode some shortcuts and commands related to Efficy. SetupThis extension has been originally designed to work with at most one custom folder and one standard Efficy folder in your VSCode workspace. However, you can work with as many custom folders and standard versions as you like at the same time. For this extension to work as expected, always start by opening your custom folder in an empty workspace. You can then add as many custom folders as you wish. Features1. Efficy API auto-completion
Type Efficy. to see all of the methods available. Switch between parameters by pressing the Tab key. 2. Define Custom Folder
Hit Ctrl+Shift+P and search for Efficy Enterprise > Define Custom Folder. If there is a single custom folder in your workspace, it will automatically be picked by Simplificy. Simplificy has been designed to work with branches or the trunk, not with the root folder. 3.1 Add Standard Efficy Folder
Right Click on VSCode's explorer to see the command Efficy Enterprise > Add Standard Folder. This shortcut will automatically search for the matching standard Efficy folder to add to your Workspace. If you do not have a custom Efficy folder in your workspace, you won't be able to use this command as the Efficy Enterprise menu from Simplificy won't appear at all. 3.2 Add Standard Lib Folder
Right Click on VSCode's explorer to see the command Efficy Enterprise > Add Standard Lib Folder. This shortcut will automatically search for the matching standard Lib folder to add to your Workspace. If you do not have a custom Efficy folder in your workspace, you won't be able to use this command as the Efficy Enterprise menu from Simplificy won't appear at all. 3.3 Add Standard Conficy Folder
Right Click on VSCode's explorer to see the command Efficy Enterprise > Add Standard Conficy Folder. This shortcut will automatically search for the matching standard Conficy folder to add to your Workspace. If you do not have a custom Efficy folder in your workspace, you won't be able to use this command as the Efficy Enterprise menu from Simplificy won't appear at all. 3.4 Add Standard Extranet Folder
Right Click on VSCode's explorer to see the command Efficy Enterprise > Add Standard Extranet Folder. This shortcut will automatically search for the matching standard Extranet folder to add to your Workspace. If you do not have a custom Efficy folder in your workspace, you won't be able to use this command as the Efficy Enterprise menu from Simplificy won't appear at all. 3.5 Add Standard Servicy Folder
Right Click on VSCode's explorer to see the command Efficy Enterprise > Add Standard Servicy Folder. This shortcut will automatically search for the matching standard Servicy folder to add to your Workspace. If you do not have a custom Efficy folder in your workspace before using this command, an error message will be displayed. 4. Reveal Standard File
Right-click on a file from your custom Efficy folder and select the command Efficy Enterprise > Reveal Standard File. This command will automatically open in a new tab the Standard file according to your custom folder version. You can also trigger this command with the keyboard shortcut Ctrl+Alt+F:
This shortcut will use the currently opened file to find the Standard one. If the file is not found in Efficy standard, an error message is displayed:
This command is only visible on files from a custom folder. 5. Search In Standard
Right-click on a text selection from your custom code and select the command: Efficy Enterprise > Search in Standard Folder. This command will search for the current selection text in the Efficy standard folder only. In order to use this command, you will need to add a standard Efficy folder to your workspace via the Efficy Enterprise > Add Standard Folder command. Otherwise, the following error will be displayed:
6. Customize File
Right-click on a file from your standard Efficy folder and select the command: Efficy Enterprise > Customize File. This command will check if you already customized the selected standard file. If so, it will open your custom file. Otherwise, it will create the file and its missing folder structure. This command is only visible on files from a standard folder. 6.1 Customize Selection (Macro)
Select the macro block you want to override in a standard macro file, then right-click and select the command: Efficy Enterprise > Customize Selection (Macro). Only the selected lines are copied to your custom macro, which is created if it does not exist yet. This command is only visible on macro files from a standard folder. 7. Install ProjUtils
The command downloaded and executed a remote installation script, which is no longer allowed for published extensions. ProjUtils must now be installed manually. 8. Create Node API Call
Right-click on your text editor from VSCode and select the command: Efficy Enterprise > Create Node API Call. The missing structure (node/api folders) will be created if not existing. Utils will also be imported to your file if missing. You will then be prompted to pick an existing folder inside of node/api, or create a new one. You can also directly create your endpoint file at any moment. If the file created already exists, an error will be displayed as you see in the GIF above. If you use this command outside of the efficy/js folder scope, an error will be displayed:
9. Open CRM
Right-click on your file explorer from VSCode and select the command: Efficy Enterprise > Open CRM. Note that this will need you to have a customer profile set for your custom. If no customer profile is set, you will be asked to open Alias and Customer Manager:
10. Format SQL
Right-click on your SQL expression from your text editor and select the command: Efficy Enterprise > Format SQL. This command will format your SQL statement to a ready-to-use variable that will keep your statement's syntax indentation. Tables referenced by FROM/JOIN are automatically wrapped in the Run this command one more time to get your SQL statement back, without the security clauses, ready to paste in a DB client. 11. Macro Syntax Coloration
Open a macro file to notice syntax coloration. Credits to Stefan Vucinic for originally making this snippet. 12. Imports auto-completion
Auto-completion of files path is triggered by slashes and quotes (simple or double). Auto-completion of imports is also working inside of define/require/requirejs statements:
Those are the paths triggering auto-completion for @imports:
Those are the paths triggering auto-completion for define/require/requirejs:
13. Access Import
Place your cursor on the imported file that you want to open or select the full @import statement before running the following command: Efficy Enterprise > Access Import. Note that this command does not work with imports from the standard. 14. Auto-update of require.config
Save a front-end file (efficy/js - efficy/css) to notice the auto update of require's appendSuffixCustom property (js/config/require.config.js). If no require.config.js file is found, Simplificy will ask you if you wish to create it. You can enable or disable this feature from VSCode's Simplificy settings. 15. Contexts Report
Hit Ctrl+Shift+P and search for Efficy Enterprise > Contexts Report. This command will search for every opened/closed context in your custom folder and generate a report for you. You can easily open the files that need to be checked by clicking on them. You can also export the report in a .txt format. This feature is built upon a foundational snippet made by Slim Gaigi which has been improved for Simplificy. 16. Settings
File > Preferences > Settings > Extensions > Simplificy 17. Compare with Standard
Right-click on a file from your custom Efficy folder and select Efficy Enterprise > Compare with Standard. A side-by-side diff opens against the standard counterpart of your file. 18. Go to Definition for imports
Hold Ctrl and click (or press F12 on) any @import or define/require path to open the target file, whether it is custom, customshared or standard. 19. Macro Tag Documentation
Hover any The tag catalog is scraped from EDN and auto-updates monthly along with the Efficy API.
At the bottom of a tag hover, click View in EDN Documentation to open that tag in Simplificy's EDN view (Efficy logo in the activity bar). 20. Diagnostics
21. Simplificy Log Reader
Right-click a The panel parses the log by database and task: pick a database, then a task, to isolate its lines (both lists are searchable). A Runs by timestamp table lists each execution with its start, end and duration. Click a run to drill into it. You can also load several files at once (one tab each), load a whole folder, filter by keyword and copy the result. Future features coming
Enjoy!Created and maintained by Julien Turunen |
























