Skip to content
Snippets Groups Projects
Commit 0f7bcfa4 authored by Florian Lambers's avatar Florian Lambers
Browse files

added matching, moved migration-component

parent 6b247c33
No related branches found
No related tags found
No related merge requests found
......@@ -9,9 +9,11 @@ import javax.annotation.PostConstruct;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import de.fhmuenster.masterthesis.Testgenerator.rest.dto.MigrationResultWrapperDTO;
import de.fhmuenster.masterthesis.Testgenerator.rest.service.change.ChangeService;
import de.fhmuenster.masterthesis.Testgenerator.yaml.MigrationResultStatus;
import de.fhmuenster.masterthesis.Testgenerator.yaml.MigrationYaml;
import de.fhmuenster.masterthesis.Testgenerator.yaml.YamlReader;
......@@ -34,6 +36,9 @@ public class MigrationService {
private MigrationYaml yaml;
@Autowired
private ChangeService changeService;
public MigrationService() {
}
......@@ -65,10 +70,20 @@ public class MigrationService {
private List<FlowChangeWrapper> detectActivityAddActions(List<Flow> oldFlows, List<Flow> newFlows) {
List<FlowChangeWrapper> result = new ArrayList<>();
//Flow Matching
Flow [][] matchingFlows = this.changeService.compareFlows(newFlows, oldFlows);
for(int i=0; i < matchingFlows.length; i++) {
result.addAll(compareFlowsForAddAction(matchingFlows[i][1], matchingFlows[i][0]));
}
//Flows miteinander vergleichen
/*
for(int i=0; i < oldFlows.size(); i++) {
result.addAll(compareFlowsForAddAction(oldFlows.get(i), newFlows.get(i)));
}
*/
return result;
}
......
......@@ -16,7 +16,7 @@ import { DeleteProjectComponent } from './components/delete-project/delete-proje
import { LoopsComponent } from './components/loops/loops.component';
import { LoopComponent } from './components/loop/loop.component';
import { UpdateProjectComponent } from './components/update-project/update-project.component';
import { MigrationOverviewComponent } from './migration-overview/migration-overview.component';
import { MigrationOverviewComponent } from './components/migration-overview/migration-overview.component';
const routes: Routes = [
......
......@@ -30,7 +30,7 @@ import { DeleteProjectComponent } from './components/delete-project/delete-proje
import { LoopsComponent } from './components/loops/loops.component';
import { LoopComponent } from './components/loop/loop.component';
import { UpdateProjectComponent } from './components/update-project/update-project.component';
import { MigrationOverviewComponent } from './migration-overview/migration-overview.component';
import { MigrationOverviewComponent } from './components/migration-overview/migration-overview.component';
@NgModule({
declarations: [
......
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { MigrationResultWrapper } from '../models/migration-result-wrapper';
import { MigrationService } from '../services/migration-service';
import { MigrationResultWrapper } from '../../models/migration-result-wrapper';
import { MigrationService } from '../../services/migration-service';
@Component({
selector: 'app-migration-overview',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment