Confusion regarding Capella Studio, Kitalpha, Sirius, EMF/EGF

Hello everyone. I’ve just recently started using Capella and realized I will most certainly need to develop a Capella Addon for my needs. I don’t have any Java background (coming from C/C++), though, and the development structure of the Eclipse platform is confusing me a little bit.

From what I read here, Capella Studio is built with Kitalpha, and both Capella and Kitalpha use Modelling components such as Sirius, EMF and EGF. If I were to write a plugin to recreate visual representations of Functional Exchanges, for example, should I use Sirius, EMF or EGF? And would the viewpoint itself be created with Kitalpha?

The plugin.xml structure is also a bit elusive right now, but it seems like an entry point to extend specific features (like org.eclipse.ui.menus) with the usage of handlers.

I was originally going to write a plugin using Python 4 Capella, but decided to do it natively since I need Capella’s graphical components.

1 Like

Hello,

Capela Studio will help you to create addons where you extend Capella to provide new types of semantic elements and also provide new representations or extend existing Capella representations (new layers, mappings, tools on an existing diagram for instance).
The metamodel extensions will use the EMF framework, but Capella provide an XText editor to easily write and generate your new semantic EClasses.
The graphical extensions will be specified using Sirius by adding your new elements of your new viewpoint in the .odesign.
As you mentioned, you can also use the different Eclipse extension point to continue customizing your environment, like using org.eclipse.ui.menu to create new contextual actions.
In the end, it will really depend on what is the objective of your addon. If you only need to add some graphical elements on some Capella diagram, you will probably mostly use Sirius and may not require that much Java code or Eclipse extension points.
You may be interested in the Capella studio tutorials and the Capella studio development documentation as a start.

Best regards,
Steve

1 Like

Hi @Steve_Monnier, thank you for the insight. I will keep reading the docs and start prototyping - I guess that’s the quickest way to learn.

Awesome question.
First thing, depending on what you want to do, you can do some graphical things with P4C, but you will have to do some research and ask questions. Of course you cannot do eveything. Yvan and people behind P4C said it was not meant for this, but the need for it showed itself, they are reconsidering, I think.

Second point, what have been mentioned by Steve Monnier concerning Sirius, is indeed true, Now I don’t know what method of developping he has in mind, probably using Capella Studio and changing the vptext files and write some java I suppose @Steve_Monnier ? Well, from my side I can tell you that you can use a specific tool/technology provided by Sirius, it is called, SIRIUS SPECIFIER, it can allow you to do some interesting things. Example, it can allow you to create specific tables that can be generated directly from your capella env.

I have 2 questions for you both: 1) Did you find youself developing on Capella itself (without using Capella Studio) ? Especially for the .ui.menus things.
2) Did you find yourselves go read /practice about EMF/EGF etc in order to apply that into Capella dev/ Capella Studio Dev processes?

1 Like

@KaBe Hi, thank you for the reply.

My goal at the moment is to get a simple model execution/simulation working on a separate viewpoint - like Glaway’s or PGM’s commercial solutions, but with less features for now.

Originally we would do this with P4C and Sismic, a Python library that allows statecharts to be executed (we were ‘translating’ Capella State Machines to YAML Statecharts and executing them), but the visualization of the simulation itself was troublesome and not as good as it could be if we did it entirely inside Capella.

So I think a better way to sumarize my question is: assuming I can abstract the simulation itself in a Java class that receives inputs from the e.g. Logical Architecture, how would I be able to graphically render the same Logical Architecture with extended features (like showing the current state in blue) in another viewpoint.

As for your questions, I have not yet used Capella itself for development purposes, nor have I read about EMF/EGF specifically… mostly because I thought those were only minor packages inside the “core” that was Capella Studio, but from what I gather it is the other way around?

1 Like

Very interesting, yeah i was going to share with you the PGM presentation available on youtube to see what can be done, but you already knew about it.

Here are the difficulties I noticed:

  • You can create Logical Components and such using Java (the same way you would be doing that with P4C), but if you want it to be “displayed” in the diagram, that would need even more lines of code which are related to the EMF and other stuff, which can be confusing.
  • If you rewrite some properties for some already existing elements (let’s say a physical function), maybe you are adding a variable to it without implementing any graphical lines of code, then the packaged expansion, whenever the addon is activated/referenced will cause the original physical functions graphical properties to be replaced with your new one → Resulting in lot of problems → functional chains not showing up, not being able to drag and drop elements inside the physical function etc.
  • Many lines of code rely on something related to “instances” I would guess that was related to Sirius technology, I am not sure though, I don’t remember. So you would need to learn the functions that create Capella models, but also need to see and imagine what are the graphical elements, and finally you will need to have an idea about “sessions” or instances or whatever is it called, I think it is related to the user interaction with the UI/diagrams/elements.

All these 3 elements combined were overwhelming to me.

I was able to do many things with M2DOC, sirius specifier and P4C, without having to dwell a lot in EMF dev or pure sirius java dev, although I did very few. Anytime I wanted to swim pure eclipse dev relying on Eclipse Modeling Framework, i got distracted. Maybe you can do it better.

One thing you can do it to go check the github related to Capella, although I really don’t know how to navigate that, you can also go check capella plugins folder and check all the java code and classes existing and see how you can undertand that, example:
... tried to find one with Emf elements withign recognizable capella elements but I cant find the specific plugin .. sorry.. maybe I can find it later.

The thing is that there are a BILLION files and classes.
If you ever succeed in doing it, please do tell me about it.

One final solution, you can contact Capella for professional help.

1 Like

Yeah, everything at first seemed overwhelming, even the folder structure. And for some cases I’m absolutely sure that avoiding “EMF dev or pure sirius java dev” is the correct choice, but I don’t think I’ll be able to avoid it in my case - which means a lot of reading.

In any case, it’s good to talk about those issues, I’m confident that I’ll get a bit more familiar with the environment and I’ll certainly try updating you if I reach any milestones.

Also, if it’s not confidential, may I know what you would like to add to Capella?

@KaBe I have used Capella Studio only to create a new addon from scratch, so I could create a vpdsl project and generate the plugins for my addon. However, I may not be the best person to answer these because I am Sirius and Team for Capella developer, so EMF (and other frameworks) and Eclipse extension points are what we use to develop the frameworks :).

@mvccogo Concerning your following description:

Have you looked at the addon PVMT? With that addon you can define new colors on graphical elements based on some values and it will show only if you decide to display the “Diagram Styler” layer. Depending on what you want to display, you may not need to develop a new addon.

If you choose to develop an addon, I understand that it can feel overwhelming between the different framework, java and the Eclipse features. Using Capella Studio to develop this addon, there are some wizard to help you create the vpdsl project that then generates the plugins. From there, you may only need knowledge on Sirius, in order to create the diagrams you want (or extend existing ones). From the Sirius editor you can specify a lot of thing. You will need to code in Java or declare some extension points if you need something custom that is not available in Sirius. You may not even do it, or only on specific topics. To sum up, start with what is “easy” to specify with Sirius (using the editor and maybe some simple java services) and then you can go to more custom features that would require you to learn more about EMF, Eclipse.

1 Like

@mvccogo mvccogo, I would love to do ANYTHING. Making my own diagrams, making my own palette of tools, changing the effect of drag and drop or clicking, adding buttons everywhere i would like (menu on the bottom, the one that hold properties tabs etc), or on the left , on the right, of course changing the colors and disposition of components/functions at will, I would love to have all the control to do ANYTHING i want. Sometimes even Capella Staff don’t know everything about Capella I think, maybe depend on the person.

Maybe we can talk more about it some other time if you will be open for it,
by the way, what are you “reading” right now or plan to read next to get onboard?

@Steve_Monnier
I feel we are talking about the same sirius technologies allowing you to interact with odesign.