Skip to main content



      Home
Home » Modeling » UML2 » How to add a StateMachine to a Class?
How to add a StateMachine to a Class? [message #623656] Thu, 12 July 2007 10:40
Eclipse UserFriend
Hello again ;)
what I try to do is simple. To model the different states of a class I
want to add a StateMachine as a child to a Class. I tried it like this:


StateMachine machine = UMLFactory.eINSTANCE.createStateMachine();
Class stateFullClass = getClassFromPackage(classDiagram,
stateFullClassName);
stateFullClass.allOwnedElements().add(machine);

"getClassFromPackage" searches in a Package "classDiagram" for a Class
"stateFullClassName". This method works fine. But an
UnsupportedOperationException is thrown when .add(machine) is called. So
how can I add a StateMachine to a Class?

greets
J.R.
Previous Topic:extending a profile
Next Topic:How do I get .emx recognised as .uml2?
Goto Forum:
  


Current Time: Sun Jul 13 13:00:20 EDT 2025

Powered by FUDForum. Page generated in 0.03736 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top