| 1 | package de.uka.ipd.sdq.pcm.dialogs.seff; |
| 2 | |
| 3 | import org.eclipse.emf.ecore.EObject; |
| 4 | |
| 5 | import de.uka.ipd.sdq.pcm.dialogs.OpenStoExDialog; |
| 6 | import de.uka.ipd.sdq.pcm.seff.GuardedBranchTransition; |
| 7 | import de.uka.ipd.sdq.stoex.RandomVariable; |
| 8 | import de.uka.ipd.sdq.stoex.analyser.visitors.TypeEnum; |
| 9 | |
| 10 | // Manually written open policy to open the StoEx Dialog. It's |
| 11 | // called via a CustomBehaviour in the genmap |
| 12 | public class OpenBranchConditionDialog extends OpenStoExDialog { |
| 13 | |
| 14 | |
| 15 | @Override |
| 16 | protected RandomVariable getRandomVariable(EObject parent) { |
| 17 | GuardedBranchTransition transition = (GuardedBranchTransition) parent; |
| 18 | RandomVariable rv = transition.getBranchCondition_GuardedBranchTransition(); |
| 19 | return rv; |
| 20 | } |
| 21 | |
| 22 | @Override |
| 23 | protected TypeEnum getExpectedType(RandomVariable rv) { |
| 24 | return TypeEnum.BOOL; |
| 25 | } |
| 26 | |
| 27 | } |