Search in sources :

Example 1 with ExtractAggregatesByVolatilityRefactoringWizard

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();
}
Also used : ExtractAggregatesByVolatilityContext(org.contextmapper.dsl.ui.handler.wizard.ExtractAggregatesByVolatilityContext) BoundedContext(org.contextmapper.dsl.contextMappingDSL.BoundedContext) ExtractAggregatesByVolatilityRefactoringWizard(org.contextmapper.dsl.ui.handler.wizard.ExtractAggregatesByVolatilityRefactoringWizard) WizardDialog(org.eclipse.jface.wizard.WizardDialog) ExtractAggregatesByVolatility(org.contextmapper.dsl.refactoring.ExtractAggregatesByVolatility)

Aggregations

BoundedContext (org.contextmapper.dsl.contextMappingDSL.BoundedContext)1 ExtractAggregatesByVolatility (org.contextmapper.dsl.refactoring.ExtractAggregatesByVolatility)1 ExtractAggregatesByVolatilityContext (org.contextmapper.dsl.ui.handler.wizard.ExtractAggregatesByVolatilityContext)1 ExtractAggregatesByVolatilityRefactoringWizard (org.contextmapper.dsl.ui.handler.wizard.ExtractAggregatesByVolatilityRefactoringWizard)1 WizardDialog (org.eclipse.jface.wizard.WizardDialog)1