Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 14:40
Jan Reimann is currently offline Jan ReimannFriend
Messages: 90
Registered: July 2009
Member
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: Thu Apr 25 21:40:28 GMT 2024

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

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

Back to the top