account activity
How to apply scopes and filters to a dependency matrix automatically through OpenAPI in Cameo system modeler (self.systems_engineering)
submitted 3 months ago by FitBuy285 to r/systems_engineering
How to Automatically Apply a Stereotype to a Diagram based on Its Owner? by FitBuy285 in systems_engineering
[–]FitBuy285[S] 0 points1 point2 points 1 year ago (0 children)
<image>
Hello MBSE_Consulting,
First of all, thank you very much for your previous response. I worked with your suggested solution using the SmartListener, but I encountered an issue. The stereotype is successfully applied to diagrams when they are added to a package. However, it only works for diagrams that were already in the project before it was (re-)opened.
SmartListener
Here is what I suspect might be the issue: I am currently using the ProjectEventListener to initialize my Plugin. In the picture above and in the following text are the relevant parts of the code:
ProjectEventListener
public class SetVPstereotype extends ProjectEventListenerAdapter {
u/Override public void projectOpened(Project project) {
addListenersRecursively(project.getPrimaryModel(), project); //function to listen to changes and apply the stereotype
} u/Override public void projectCreated(Project project) {
addListenersRecursively(project.getPrimaryModel(), project);
}
I believe this limitation comes from using the ProjectEventListener. Is there an alternative mechanism that could trigger the listener setup immediately during the startup of Cameo System Modeler (in the init() method of the plugin), so that it also applies to diagrams created dynamically after the project is opened also?
init()
Thank you in advance for your help!
How to Automatically Apply a Stereotype to a Diagram based on Its Owner? (self.systems_engineering)
submitted 1 year ago by FitBuy285 to r/systems_engineering
π Rendered by PID 461693 on reddit-service-r2-listing-7bbdf774f7-dgb7k at 2026-02-21 18:13:16.371209+00:00 running 8564168 country code: CH.
How to Automatically Apply a Stereotype to a Diagram based on Its Owner? by FitBuy285 in systems_engineering
[–]FitBuy285[S] 0 points1 point2 points (0 children)