So far all the examples I have seen were about extending a Capella viewpoint (e.g., logical, physical arch., etc.). However, What I am trying to do is to create a new
independent viewpoint. I tried to do so and now I can see the viewpoint in the explorer (shown below). But I don’t know how to create a diagram instance for this viewpoint. I tried to right click on the aird file and select Add Model and create a model element with the root class that I created in the data file, but the file is not created after doing the steps and it does not throw any errors.
P.S. My goal would be to add an step in the overall (Arcadia) workflow. It would be good we could create a graphical editor using Sirius graphical editor (instead of Capella studio textual editor) and then package and plug it to Capella.
Any idea ?
pourali_parsa.yahoo.com wrote on Fri, 11 May 2018 07:59
It would be good we could create a graphical editor using Sirius graphical editor (instead of Capella studio textual editor) and then package and plug it to Capella.
Please know that you do not necessarily have to use the textual definition of vpdsl in order to specify your diagrams. You can directly use odesign files (from Sirius).
The vpdsl mechanism should have generated a plugin ending with “.design”.
This plugins contains a folder called “description” with inside it a .odesign file.
You can directly edit this file to specify your diagrams if vpdsl language does not support what you want to do.
If you directly edit the odesign file, you will have to edit the file “.conf.vptext” in your “.vpdsl” plugin in order to ensure that if you generate again your viewpoint, it will note overwrite the modifications you’ve made in the odesign file. For this, just modify the line “OverwriteOdesign: true” to false.
Now in the odesign file, you can define extensions of existing diagram (e.g. layers as for the basic mass, price and performance viewpoints) or you can define new diagrams from scratch.
Please have a look at the Sirius embedded help for more information on how to specify diagrams or extensions using odesign files.
If you define a new diagram, you will have in the properties of this new diagram a field called “Domain Class”.
This field specify on which kind of model element this kind of diagram can be created.
In the example provided here, we can see that a “System Function Breakdown” diagram [SFBD] can be created under a “SystemFunction” model element.
In Capella, if you select a model element of the selected kind, you will then be able to do right click, New Diagram / Table then select the new diagram you’ve defined.
Thanks a looooot for your reply. You’re right about the points on Sirius and how to use it instead of the textual editor. I found it after my post here. However, I was not sure if we change the Sirius odesign, how can we again package it and export it from the odesign! Because I found that the only way is to right click on the spect.vptext and select the generate and pack, but if it is not updated then no idea … anyways this is OK, I am now more expert in developing it textually and it is actually good.
Back to my original question:
In your System function example, I believe you are still extending an element from Capella which is: System Analysis-> System Functions. What if our new diagram cannot be categorized under any of the Capella’s elements and we don’t want to extend any existing element of Capella. In other words, as part of the transportation system, we are trying to add one new diagram type (let’s say guideway) to model some specific aspects of the system. So it is a new viewpoint basically, not a new diagram type. We are trying to create a new category under the Capella’s root as a sibling to Operational Analysis, System Analysis and etc. I found that they are all under the SystemEngineering element in the meta-model and tried to extend it but it didn’t work… Is there any resource that you can redirect me to it ? I couldn’t also find this SystemFunctions example, is it available somewhere?
You can package your viewpoint “by hand” using the Eclipse mechanism:
To do so, File / Export, choose Deployable features. By default, vdsl should have created 4 different feature projects in your workspace: “.af.feature”, “.feature”, “.representation.feature” and “.rules.feature”. You only need to select the “.feature” one as it includes the 3 others. You can then choose to package your viewpoint in a folder or in a zip file.
The example I provided you is actually the real [SFBD] diagram from Capella source code.
BTW, you can have a look at Capella diagrams source code by importing the plugin “org.polarsys.capella.core.sirius.analysis”.
Going back on your practical example, you need to define a model element that will extend the SystemEngineering element.
I could do it easily with the following code:
I could then define this new element under the SystemEngineering element with right click, Add Capella Element:
This sounds awesome. Thanks for all the support. I’ll take a look into it and will let you know the results.
Thanks Aurélien, I tried it and it worked. The problem was that I could not see that “Add Capella Element” item ! What I was doing was, generating view point (NOT packing it), and then run it (as a New Eclipse Runtime instance). Apparently, in this case not all the features such as the right click option are available. So, I tried to generate and package it and then copy it to the dropins, and theeen ran the eclipse! I could see the options then.
I’m not sure how much of the problem was for the fact that I was just trying to run an instance from the Capella Studio, though. But it is fixed now.
Thanks a lot.
Please know that the “Add Capella Element” menu should be available and work even if you do not package the viewpoint.
Do you have any other plugins loaded and open in your workspace?
Beware that any plugin loaded and open in your workspace will be taken into account by the runtime instance (some other plugins may generate an error).
You can check if there is errors in your runtime by opening the “Error Log” view (Window / Show View / Other).
If it still does not work you can always try to import your plugins in a fresh install of Capella Studio…
OK I see … I tried importing to a new instance of Capella Studio, but I still don’t see the Add Capella Element option. BTW, in the tutorial video (Quality Assessment example on youtube) it says that you have to choose " org.polarsys.capella.core.platform.sirius.ui.perspective.pro duct " as the program to run option. However, when I’m trying to configure my runtime instance, I don’t see that option. Therefore, I just go with the “org.polarsys.capella.studio.product.CapellaStudio”. Can this be the reason ?
OK NEVER MIND, I had to open the “Capella Project Explorer” view, and it works now. Thanks
Actually you should use the “org.polarsys.capella.rcp.product” for your runtime environment.
It will solve all your issues!
Great! Thanks a lot for your support!
What happened to the codes written in this comment? Were they lost during migration to the new forum?
I tried going searching for the old forum here : ( Eclipse Community Forums: Welcome to the forum), I did not find it.