Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [MOFScript] How to express: if ( pseudostate.kind = uml.PseudostateKind(deepHistory) ) { ... }
[MOFScript] How to express: if ( pseudostate.kind = uml.PseudostateKind(deepHistory) ) { ... } [message #607068] Thu, 30 August 2007 17:58
Ondrej Rohlik is currently offline Ondrej RohlikFriend
Messages: 13
Registered: July 2009
Junior Member
Hello!

I am trying to query my UML model to find out whether a pseudostate in a
state machine is a deepHistory, shallowHistory, choice, or intial.

In UML metamodel there is PseudostateKind enumeration which contains
(among others) values deepHistory, shallowHistory, choice, or intial.

In UML metamodel there is a Pseudostate that has a "kind" of type
PseudostateKind.

Is there a way in MOFScript to write a condition like the one below?

uml.Region::getHistoryState() : uml.Pseudostate {
var pseudostate : uml.Pseudostate = self.getPseudostateFromRegion()
if ( pseudostate.kind = uml.PseudostateKind(deepHistory) ) {
stdout.println("Muhaha! The deepHistory found !")
result = pseudostate
}
}

The line in question is the third one.

Any hints welcome. Thanks you in advance.

Best regards,
Ondrej
Previous Topic:[MOFScript] Is it important the location of the entry point?
Next Topic:[MOFScript] How to express: if ( pseudostate.kind = uml.PseudostateKind(deepHistory) ) { ... }
Goto Forum:
  


Current Time: Thu Dec 18 08:44:30 GMT 2014

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

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