Commit 5c4cdfe9 authored by Malte Heithoff's avatar Malte Heithoff
Browse files

PartialName Calculation

parent 8822ec5b
...@@ -305,8 +305,8 @@ public class ComponentConverterMethodGeneration { ...@@ -305,8 +305,8 @@ public class ComponentConverterMethodGeneration {
EMAPortInstanceSymbol constPort = connector.getSourcePort(); EMAPortInstanceSymbol constPort = connector.getSourcePort();
Variable v1 = new Variable(); Variable v1 = new Variable();
v1.setName(constPort.getConstantValue().get().getValueAsString()); v1.setName(constPort.getConstantValue().get().getValueAsString());
String targetName = NameHelper.calculatePartialName(connector.getTarget(), String targetName = NameHelper.calculatePartialName(connector.getTargetPort(),
currentComponentSymbol.getFullName()); currentComponentSymbol);
Variable v2 = PortConverter.getVariableForPortSymbol(connector, targetName, bluePrint); Variable v2 = PortConverter.getVariableForPortSymbol(connector, targetName, bluePrint);
...@@ -316,8 +316,8 @@ public class ComponentConverterMethodGeneration { ...@@ -316,8 +316,8 @@ public class ComponentConverterMethodGeneration {
EMAPortInstanceSymbol constPort = connector.getTargetPort(); EMAPortInstanceSymbol constPort = connector.getTargetPort();
Variable v2 = new Variable(); Variable v2 = new Variable();
v2.setName(constPort.getConstantValue().get().getValueAsString()); v2.setName(constPort.getConstantValue().get().getValueAsString());
String sourceName = NameHelper.calculatePartialName(connector.getSource(), String sourceName = NameHelper.calculatePartialName(connector.getSourcePort(),
currentComponentSymbol.getFullName()); currentComponentSymbol);
Variable v1 = PortConverter.getVariableForPortSymbol(connector, sourceName, bluePrint); Variable v1 = PortConverter.getVariableForPortSymbol(connector, sourceName, bluePrint);
...@@ -335,10 +335,10 @@ public class ComponentConverterMethodGeneration { ...@@ -335,10 +335,10 @@ public class ComponentConverterMethodGeneration {
List<Instruction> newInstructions = new LinkedList<>(); List<Instruction> newInstructions = new LinkedList<>();
for (EMAPortInstanceSymbol target : ConnectionHelper.targetsOf(source)) { for (EMAPortInstanceSymbol target : ConnectionHelper.targetsOf(source)) {
if (target.equals(source)) continue; if (target.equals(source)) continue;
String sourceName = NameHelper.calculatePartialName(source.getFullName(), String sourceName = NameHelper.calculatePartialName(source,
currentComponentSymbol.getFullName()); currentComponentSymbol);
String targetName = NameHelper.calculatePartialName(target.getFullName(), String targetName = NameHelper.calculatePartialName(target,
currentComponentSymbol.getFullName()); currentComponentSymbol);
Variable v1 = PortConverter.convertPortSymbolToVariable(source, sourceName, bluePrint); Variable v1 = PortConverter.convertPortSymbolToVariable(source, sourceName, bluePrint);
Variable v2 = PortConverter.convertPortSymbolToVariable(target, targetName, bluePrint); Variable v2 = PortConverter.convertPortSymbolToVariable(target, targetName, bluePrint);
if (!currentComponentSymbol.getIncomingPortInstances().contains(source)) if (!currentComponentSymbol.getIncomingPortInstances().contains(source))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment