/**
* @see org.andromda.metafacades.uml.ModelElementFacade#getStateMachineContext()
*/
protected Object handleGetStateMachineContext()
{
StateMachine machineContext = null;
final Collection machines = UML14MetafacadeUtils.getModel().getStateMachines().getStateMachine().refAllOfType();
for (final Iterator machineIterator = machines.iterator(); machineIterator.hasNext();)
{
final StateMachine machine = (StateMachine)machineIterator.next();
final ModelElement contextElement = machine.getContext();
if (metaObject.equals(contextElement))
{
machineContext = machine;
}
}