However the comparison does not seem to work.
I know that TEXT1 here is 'ID", yet the comparison does not work.
Do this 2 functions not return a string, explaining why the comparisons are failing?
I tried to check these, but wasn’t able to identify a solution: M2DocHTMLServices - M2Doc M2DocGenServices - M2Doc
Edit : I usually check for types on the Capella interpreter, however the M2DOC interpreter does not show the returned “type”.
An example of implementation can be found in the Sirius integration plug-in see the class SiriusConfigurationProvider and the extension in the plugin .xml.
SiriusConfigurationProvider lead to an empty page.
A) In 2019, you said that you would create a service that returns the “element of interest” in Capella (here:https:// stackoverflow. com/questions/59457543/how-can-i-access-to-the-dannotation-eoi-of-a-diagram-elements-of-interest-with )
It this the one : (((((https:// www.m2doc. org/ref-doc/nightly/m2doc_service_semanticbrowserservices.html#orgpolarsyskitalphaemdemodelelementgetelementofinterestfordiagram–sequenceeobject)))))
B) I usually use the “selection” or “selection.eClass()” to obtain the class of an element in my model, however the “element of interest” is not something that can be selected. How was it possible to establish that “element of interest” is actually a DAnnotation?
Same question for all other elements of the model that are not clickable.
C) When tryign to add the service related to the element of interest manually, it was impossible., Whether i have written ( getElementsOfInterest()) in the research bar, or SemanticBrowserServices, or even the full link org.eclipse.sirius.viewpoint, DRepresentationDescriptor.getElementsOfInterest(), nothing would show under the research bar. Only when selecting “Capella” package that i got all the services shown below.
This begs the question, how to actually add a single service… without having to tick the capella package box.
As I said earlier, I am quite used to Python & C++, however I never had to code a Java service or anything similar, I would not know where to start it. Maybe the missing page/link in my question number 1, would help? That’s an example of a full service?
From my understanding, i am guessing that creating a service can be done through Capella Studio maybe (following a tutorial similar to this one? https:// www.youtube. com/watch?v=NWCyKsPfc2Y ) or with Capella, following a tutorial similar to this one? ( Add Menu · eclipse/capella Wiki · GitHub ) and configuring org.eclipse.ui.commands and org.eclipse.ui.menus, but both examples seems to be targeting the developpemnt of a full add-on, rather than a service. Is creating a service for M2DOC a much simpler task? I would have loved to be guided through the process, eventhough this might be out of the scope of document generation? I am not sure. Instead, maybe get hints/guides where to start actually.
2.A) Yes I think it should return the same objects.
2.B) I had to look at the code of Capella and the XMI .aird model to find how this information was stored. I made a copy of the model to use as reference then added an element of interest and compared the two files.
2.C) You need to search for SemanticBrowserServices, but if you don’t have the class in your workspace nor you template is inside a plug-in project that depend on org.obeonetwork.capella.m2doc.aql.queries, you will not be able to import it. You can edit the custom properties with MS Word and set:
Using an IServicesConfigurator is not mandatory to create a service. But you will need to be familliar with plug-in development and build. You can have a look at the Capella extensions on github to see how it is done. The build is done using maven and run using github action.
The viewpoint generates plug-ins but not what you will need here. But yes the Plug-in development perspective and plug-in project will be needed. A good starting point can be found here. And yes you should be able to do all this with the Capella studio.