blob: c190de464221d0079150c0279580e934ffea264e [file] [log] [blame]
/**
********************************************************************************
* Copyright (c) 2018-2019 Robert Bosch GmbH.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Robert Bosch GmbH - initial API and implementation
********************************************************************************
*/
package templates.m2m.sw
import com.google.inject.Inject
import java.util.Map
import org.eclipse.app4mc.amalthea.model.CallGraph
import org.eclipse.app4mc.amalthea.model.Process
import templates.AbstractAmaltheaInchronTransformer
import com.google.inject.Singleton
@Singleton
class CallGraphTransformer extends AbstractAmaltheaInchronTransformer{
@Inject GraphEntryBaseTransformer graphEntryBaseTransformer
def void transformCallGraph(CallGraph amltGraph, Process amltTask,
Map<Process, com.inchron.realtime.root.model.Process> amltProcess_inchronProcessMap) {
val com.inchron.realtime.root.model.Process inchronProcess = amltProcess_inchronProcessMap.get(amltTask)
val inchronCallGraph = inchronModelFactory.createCallGraph
inchronProcess.callGraph = inchronCallGraph
amltGraph?.graphEntries?.forEach[amltGraphEntry|
var inchronGraphEntryBase= graphEntryBaseTransformer.transformGraphEntryBase(amltGraphEntry, amltTask,
amltProcess_inchronProcessMap)
inchronCallGraph.graphEntries.add(inchronGraphEntryBase)
]
}
}