}
static Operation getContextOperation(ActivityEdge guardedEdge) {
// XXX you could perform a proper search in all places where an
// Operation specifiing some activity could hide
Activity activity = guardedEdge.getActivity();
Logging.debug(""+activity, guardedEdge);
Operation contextOp = null;
if (activity.getSpecification() instanceof Operation) {
contextOp = (Operation) activity.getSpecification();
} else if (activity.getOwner() instanceof Class) {
Class oClass = (Class) activity.getOwner();
contextOp = oClass.getOperation(activity.getName(), null, null);
}
return contextOp;
}