valb3r / flowable-bpmn-intellij-plugin

Flowable, Activiti, Camunda BPMN engines process editor plugin for IntelliJ. Pure Kotlin (and some Java)
https://plugins.jetbrains.com/plugin/14318-flowable-bpmn-visualizer
MIT License
157 stars 31 forks source link

Bundled Camunda XSD is missing custom extensions #335

Closed teake closed 1 year ago

teake commented 1 year ago

Describe the bug The Bundled camunda XSD is missing custom extensions, which results in IntelliJ wrongly complaining about e.g. camunda:asyncBefore="true" being an unallowed attribute.

To Reproduce Steps to reproduce the behavior:

  1. Open a bpmn file that has a custom Camunda extension in the XML
  2. IntelliJ will highlight as an error.

Expected behavior That IntelliJ will not flag custom Camunda XML extensions as errors.

Screenshots

Screenshot 2023-02-17 at 16 51 24

IntelliJ version (please complete the following information):

Additional context List of custom Camunda extensions: https://docs.camunda.org/manual/7.14/reference/bpmn20/custom-extensions/. Related discussion: https://github.com/camunda/camunda-modeler/issues/1972.

Perhaps the easiest way to fix this is to remove the bundled camunda-1.0.xsd file?

valb3r commented 1 year ago

@teake Thanks for feedback,

Perhaps the easiest way to fix this is to remove the bundled camunda-1.0.xsd file?

Yes it would be easiest, but I think supporting correct schema is better. Need to check how much of work it is there - I would prefer having 95% complete XSD schema compared to none

teake commented 1 year ago

Yes, I agree that having the correct schema would be better. But then it would need to be 100% complete IMHO; otherwise IntelliJ will complain about non-allowed attributes and elements when you use those that are not in the XSD,, which is really annoying and distracts from actual errors in the code.

valb3r commented 1 year ago

@teake It looks like it is quite large change... Still, I don't want to remove XSD support at all, I can suggest checkbox to disable XSD injection in plugin settings in order to quickly deal with it. So for your use case you will uncheck checkbox in settings and XSD schema will get unloaded

teake commented 1 year ago

@valb3r Yes, that sounds like a good comprise.

valb3r commented 1 year ago

@teake Here is Camunda plugin build that allows to disable XSD schemas provided by plugin: camunda-bpmn-plugin.zip

Guide to install: https://www.youtube.com/watch?v=tfSAEMSIrqA&t=42s

Check it, if it is OK I'll merge it into master

(built from https://github.com/valb3r/flowable-bpmn-intellij-plugin/tree/bugfix/FBP-335-allow-disabling-xsd)

teake commented 1 year ago

Works like a charm, thanks!