Intellij SFCC adds a floating toolbar at the top right of the editor of a file in your linked cartridges. It stays in place while you scroll and type. Each button is an icon that shows only on the files it works for, so a file shows only a few of them. Point at a button to see its name
The toolbar shows in the main editor once the project has a linked cartridge and indexing has finished. When none of its buttons apply to a file, the toolbar doesn't show
Buttons
From left to right:
| Button | Shows on | What it does | Read more |
|---|---|---|---|
| Show Hook Problems | A script that hooks.json registers, while it lacks a hook's function or exports a name more than once | Lists the problems. Choose a missing function to add it at the end of the script, or a duplicate to open its definitions | Hook problems |
| Override in Another Cartridge | A file in a linked cartridge. Its name says what the file is, such as Override Controller in Another Cartridge | Copies the file to the same path in another cartridge | Override a file |
| Show Overrides | A file that is in more than one cartridge | Lists every copy of the file by cartridge and compares them | See every copy of a file |
| Compare with B2C Instance | A file in a linked cartridge | Compares the file with the same file in the active code version | Compare with the instance |
| Show Template Graph | An ISML template | Opens a graph of the controllers that render the template and every template it includes | Template Graph |
| Usages | A controller or a pipeline | Lists every place in the code and site data that links to the file's routes, with the route before each place when the file has several | Usages |
Compare with B2C Instance, Show Template Graph and Usages are also in Find Action (Cmd+Shift+A, Ctrl+Shift+A), whether the toolbar shows them or not
Hook problems
Show Hook Problems appears on a script that hooks.json registers once the script fails as a hook, and goes away when you fix the last problem. Its name counts the problems, such as Show Hook Problems (2). Click it to list them under two headings:
| Heading | Lists | Choose a row to |
|---|---|---|
| Missing functions | Each platform hook the script is registered for whose function it doesn't export, such as beforePOST for dw.ocapi.shop.basket.items.beforePOST | Add exports.beforePOST at the end of the script. When the script exports the name in another case, such as beforePost, the row says exported as beforePost and opens that export instead |
| Duplicate exports | Each name the script exports more than once, with one row per definition and its line | Open that definition. The module keeps only one of them |
The same problems are marked in the script itself. See Hooks
Other items at the top right
| Item | Shows | Turn it off |
|---|---|---|
| The upload ring | Before the buttons while a file uploads, when Upload Progress in Editor is Indicator in the Floating Toolbar | Pick another style, see Progress in the editor |
| Open in Log Center | On an SFCC log, in a button of its own | Esc hides it until the editor shows again, see Open in Log Center |
Choose the buttons
Open Settings › Tools › Intellij SFCC › Floating Toolbar. The page lists every button with its icon and the files it shows on. Clear a button's check box and click Apply or OK, and the button leaves the toolbar on every file. Select it again to bring it back in its place
Under the buttons, Preview shows the toolbar on example files, one per tab: a controller, a template, a hook script and a pipeline. It follows the check boxes as you click them, before Apply. Under the editor it says why the buttons show on that file and names the ones a cleared check box keeps off it. Point at an icon in the preview to see its name
- Every button is on by default
- The choice applies to every project in this IDE and to editors that are already open
- A button you turn off stays in Find Action and in the menus that have it, such as Override in the Project view's context menu
- With every button off, the toolbar doesn't show, except for the upload ring while a file uploads
To find the page fast, search for Floating Toolbar in the Settings dialog's search field
Troubleshooting
| Symptom | What to do |
|---|---|
| No toolbar at all | Link the file's cartridge, see Cartridges & Modules, and wait until indexing finishes. Check that some buttons are on in Floating Toolbar settings. The toolbar shows only in the main editor, not in diff or preview windows |
| A button is missing on a file | Check that it is on in Floating Toolbar settings, and that the file is one it shows on. Show Overrides needs the file in more than one cartridge, and Show Hook Problems shows only while there are problems |
| Usages doesn't show on a controller | The controller's cartridge must be linked. A file in a folder that isn't a linked cartridge gets no Usages |