Incorporate Property Values in Function Names

For the models I am creating there are a number of functions I want to differentiate between. I have created a number of String Property Values for the different function types I have and have assigned them accordingly. However visually there still isn’t anything to depict the differences between the different functions. Is there a way to assign a property values and have it then incorporated in the function name? e.g. one of the function types I have is a “Sub Function”. When I assign the String Property Value “Sub Function” to lets say Function 1, is there a way the name then becomes something like Function 1 (SF). Where SF is short for “Sub Function”

There is nothing in Capella that allows you to do that natively.
However, we are planning to release very soon a global add-on to manage Property Values and have kind of “Profiles” on. top of Capella. Based on these Property Values, the end-users are able to define themselves the coloring of elements in diagrams for example.
I know there are some developments allowing to exploit these Property Values in the names of elements, but I don’t know yet if that will cover your use case or not. I am going to ask the right person

Hello all,
You can add contributions to the name of model elements.
However, in order to do so, you will have to use Capella Studio (and do a bit of programing…).
There is an extension point called " org.polarsys.capella.core.data.gen.edit.decorators.delegated Decorator ".
(It is advised to use Capella 1.2.0 or higher)
This extension point requires 4 different information:

  • class: the java class which will compute the contribution
  • id: id of the contribution
  • type: the EClass on which the contribution will be applied (abstract classes are supported)
  • position: choose between prefix, suffix and overrides
    The java class which will compute the name contribution need to implement the interface IDelegatedDecorator.
    This interface defines 3 methods:
  • getText: contribution to the model elements name
  • getImage: contribution to model elements symbol - NOT YET SUPPORTED
  • appliesTo: condition to be checked before applying the contribution
    Using this extension point you can add whatever you want as contribution to the name of a model element.
    In your case, you could directly determine if a function is a sub-function or not based on the relations with other functions in the model.

Thanks that’s great to know. I have also been exploring the use of modifying the appearance of model elements (colours of functions etc) but the use of property values just seems much better because with colours you have to manually apply them in each diagram, so to be able to assign colours with them as well would be ideal.

Hopefully it is just a matter of days before we can share this new add-on! Stay tuned!

Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.