use of org.contextmapper.dsl.ui.handler.wizard.ExtractAggregatesByVolatilityRefactoringWizard in project context-mapper-dsl by ContextMapper.
the class ExtractAggregatesByVolatilityRefactoringHandler method executeRefactoring.
@Override
protected void executeRefactoring(CMLResource resource, ExecutionEvent event) {
BoundedContext bc = (BoundedContext) getSelectedElement();
ExtractAggregatesByVolatilityContext refactoringContext = new ExtractAggregatesByVolatilityContext(bc.getAggregates().stream().map(agg -> agg.getLikelihoodForChange()).collect(Collectors.toList()));
new WizardDialog(HandlerUtil.getActiveShell(event), new ExtractAggregatesByVolatilityRefactoringWizard(refactoringContext, executionContext -> {
ExtractAggregatesByVolatility ar = new ExtractAggregatesByVolatility(bc.getName(), executionContext.getVolatilityToExtract());
return finishRefactoring(ar, resource, event);
})).open();
}
Aggregations