Are there other means to interact with Python Scripts than popup and toolbar of the console?

Hello,
As far as I know:

  • Popup option = adding the option to interact with the script in the right click menu of the model elements.
  • Console = adding it in the general console.

→ Question: is is possible to add the option, an icon clickable, outisde of this 2 options? let’s say:

  • Directly on a diagram, a little icon next to a capelle element (such as a logical component maybe)?
  • On the properties of a capella element?

The console solution cannot be sustained if there are too many scripts.

Hi,

Means to interact with Python Scripts are described in the page: EASE/Scripts - Eclipsepedia.
# toolbar : <Name of the view> integrates to specific view (Properties for example).
If you want more “integrated” means like

you will have to develop something using extension points and contribute some code.

An other solution would be to develop a dedicated UI using Python4Capella to launch your scripts, there are some standard UI libraries directly usable. But this may take some time too.

Regards,
Arnaud

1 Like

Hello,
Thanks for the answer. Very interesting. I was not aware of the EASE wiki.

I am not sure what is “extension points” here.

I assume you are talking about PyQt and such. I actually thought about it. And have it planned on my “to do (if I have time)” list.

Hi,

For information about extension points please refer to documentation FAQ What are extensions and extension points? - Eclipsepedia or tutorials available online like Eclipse Extension Points and Extensions - Tutorial.

Basically projects and frameworks like Capella and Sirius provide extension points to provide additional behavior and tooling to the existing tool. But this requires to build some plugins and deploy them in your environment.

Regards,
Arnaud

1 Like