Penstock

JetBrains / Using it

The editor in the IDE

How the BPMN, DMN and form editors sit inside a JetBrains IDE: which files open, the two tabs, saving and files changed outside.

Free

This page is only about the IDE. What the editor does is described once, for every tool, in The BPMN editor, The DMN editor and The form editor.

Which files open in the editor

File type in the IDEExtensionsOpens in
BPMNbpmn, bpmn.xml, bpmn20.xmlThe BPMN editor
DMNdmnThe DMN editor
Camunda Formform, when the file is a Camunda Form (a JSON object with components)The form editor

A .form file from the IntelliJ GUI Designer is left to the GUI Designer. Penstock takes only Camunda Forms.

The two tabs

The editor is registered ahead of the IDE's own editor, not in place of it. So a file has two tabs at the foot of the editor window:

Both edit the same file. A change on the canvas shows in the Text tab at once, and the other way round. The editor tab comes first.

Test-case files

A Camunda test-case file is a .json file in a folder called test-cases, or any .json file under 1 MB that names the cpt-test-cases schema. When the diagram it belongs to is found, the file gets a second tab called Scenarios, after the IDE's text editor. The diagram has the same name with a diagram extension, and is in the same folder, in the folder above test-cases, or, for a file under src/test/resources, anywhere under src/main/resources. The tab shows that diagram with its Scenarios panel open. See Tests in the IDE.

Saving

The editor writes the file on every change. The content goes to a temporary file that replaces the real one, and the IDE refreshes the file, so the Text tab and version control see it immediately.

When the file changes outside the editor

The IDE tells Penstock when a file changes on disk. A dialog called File Changed on Disk says that the diagram was changed outside the editor, that reloading loads those changes and drops what you have not saved, and that keeping it means your next save overwrites them. The buttons are Reload and Keep Editing. Renaming or moving the open file is followed without asking. The editor's own saves are never mistaken for outside changes, even with the same file open in two tabs.

Themes

The editor takes the IDE's theme by default, and a change of IDE theme redraws the diagram. Editor theme in the More menu picks Light, Dark or Dracula instead, whatever the IDE is running. A theme saved in a project by an earlier release is taken over once. Sketchy drawing is a personal choice in the same menu.

Clipboard

Copy and paste use the IDE's clipboard, so you can copy a pool from one diagram and paste it into a diagram open in another tab. Copy as image puts a PNG on the IDE clipboard, ready to paste into Confluence, Slack or an e-mail.

The context menu

Right-click an element for the editing actions, and, when they apply, Go to the Java class a task names, and the Pro actions that link to your code. See Code links in the IDE. Right-click a Java or Kotlin worker method and Create element template writes the element template of its job type into .camunda/element-templates. It is part of the code links, so it is Pro.

The IDE's own features that work on the file

Common problems

A .bpmn file opens as plain XML only.
Click the BPMN Editor tab at the bottom of the editor. If there is no such tab, the plugin is disabled. Turn it on in Settings | Plugins. If the file still opens as text, the pattern may have been given to another file type in Settings | Editor | File Types. Move it back to BPMN.
A .form file opens in the GUI Designer.
It is a GUI Designer form, not a Camunda Form.
The editor is blank.
See Troubleshooting.