1 | package de.uka.ipd.sdq.pcm.dialogs.repository; |
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.repository.PassiveResource; |
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 OpenCapacityDialog extends OpenStoExDialog { |
13 | |
14 | |
15 | @Override |
16 | protected RandomVariable getRandomVariable(EObject parent) { |
17 | PassiveResource pr = (PassiveResource) parent; |
18 | RandomVariable rv = pr.getCapacity_PassiveResource(); |
19 | return rv; |
20 | } |
21 | |
22 | @Override |
23 | protected TypeEnum getExpectedType(RandomVariable rv) { |
24 | return TypeEnum.INT; |
25 | } |
26 | |
27 | @Override |
28 | protected String getDialogMessage() { |
29 | return "Please enter the new capacity of the Passive Resource"; |
30 | } |
31 | |
32 | } |