Calling new services

  1. How to separate url with other plain text in description?

  2. How to write my own services and use them in the template?
    Thank you so much^-^

I haven’t found this plugin and there are multiple xml in my directory

  1. I guess this should be handled by the HTML code unless there is a bug in the parser used by M2Doc.

  2. You can follow this steps:

  • create a plugin project
  • write a Java class with one public method that take a least one parameter (it will be your receiver, the value of the expression before the call)
  • make sure the package containing the service Class is exported in the MANIFEST.MF file
  • import the service Class in your template using the template properties wizard

If some of your parameters are Capella elements, you will probably need to start a runtime to be able to test your service.

If you need to initialize your service Class with some values, you can use the org.obeonetwork.m2doc.ide.servicesConfigurator extension point. Make sure your plugin project depends on the org.obeonetwork.m2doc.ide plugin in the MANIFEST.MF dependencies.

1 Like

Thank you! I’ve succeeded to write my own services. I will contribute my functions and hope they will be helpful.

1 Like