Zum Inhalt springen
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

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

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.

File type in the IDE Extensions Opens in
BPMN bpmn, bpmn.xml, bpmn20.xml The BPMN editor
DMN dmn The DMN editor
Camunda Form form, 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 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:

  • BPMN Editor (or DMN Editor, Form Editor) shows the picture.
  • Text shows the raw XML or JSON in the IDE's own text editor.

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.

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.

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. A .bpmn file that has no layout opens laid out in memory and is written only once you edit it, so opening a file never changes it on disk.

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. When the same diagram is open in two editors, a change saved in one reaches the other as a change on disk, and it asks the same question.

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.

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.

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

Section titled “The IDE's own features that work on the file”
  • Find Action and the Keymap list every action of the editor under Tools | Penstock. See Settings in the IDE and Shortcuts.
  • Version control shows two diagrams instead of two blocks of XML when you compare a .bpmn file. See Diagram diff.
  • Problems lists the findings of the check, and Code | Inspect Code runs it. See Settings in the IDE.
  • Scripts open in their own editor tab with the IDE's colours and completion. See Scripts in their own tab.
  • The files penstock.yaml and .bpmnlintrc have their own icons in the Project view.
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.