use of de.uka.ipd.sdq.pcm.stochasticexpressions.PCMStoExPrettyPrintVisitor in project Palladio-Editors-Sirius by PalladioSimulator.
the class SetRandomVariable method execute.
@Override
public void execute(Collection<? extends EObject> selections, Map<String, Object> parameters) {
RandomVariable randomVariable = getRandomVariable((EObject) parameters.get("element"));
StochasticExpressionEditDialog dialog = new StochasticExpressionEditDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), getExpectedType());
dialog.setInitialExpression(randomVariable);
dialog.open();
if (dialog.getReturnCode() == Dialog.OK) {
randomVariable.setSpecification(dialog.getResultText());
randomVariable.setSpecification(new PCMStoExPrettyPrintVisitor().prettyPrint(dialog.getResult()));
}
}
Aggregations