bpmn-io / vs-code-bpmn-io

View and edit BPMN diagrams in VSCode. Powered by bpmn.io tools.
https://marketplace.visualstudio.com/items?itemName=bpmn-io.vs-code-bpmn-io
MIT License
113 stars 37 forks source link

Native editor support #67

Closed pinussilvestrus closed 1 year ago

pinussilvestrus commented 4 years ago

What should we do?

Instead of opening the BPMN editor inside a new webview panel, we should investigate whether it's feasible to offer native editor support, like image-preview has it.

Why should we do it?

This way we would have the editor as the default editor for BPMN diagrams in VS Code when opening such a file. Editing the XML should be still possible in some way, e.g. by changing the file type.

From a product perspective, it makes more sense to have the editor at first glance and avoid showing cryptic XML to the user.

Additional Notes

We started work on this branch. Currently, it's not allowed to ship proposed VS Code api to the marketplace, cf. documentation.

pinussilvestrus commented 4 years ago

One example extension which seems to get a custom editor extension up and released without unstable API: https://github.com/hediet/vscode-drawio

pinussilvestrus commented 4 years ago

Seems like stable API support for custom editors is not far away: https://code.visualstudio.com/api/extension-guides/custom-editors

pinussilvestrus commented 2 years ago

Example plugin that goes this route: https://github.com/yleflour/vscode-bpmn-editor/blob/main/src/bpmnEditor.ts#L3