Fix: imports, getPorts -> getPortsList

parent f2df86fe
......@@ -80,10 +80,10 @@ public class ClusterHelper {
// Sub Ros -> Sub Ros: do nothing, wrapper and therefore the mw does not affect this level
// Sub Ros -> Sub normal: handled(let comp connect)
private static ExpandedComponentInstanceSymbol createECISFromCluster(ExpandedComponentInstanceSymbol inst, Set<ExpandedComponentInstanceSymbol> cluster, String clusterName) {
Set<PortSymbol> curClusterPorts = cluster.stream().flatMap(ecis -> ecis.getPorts().stream()).collect(Collectors.toSet());
Set<PortSymbol> curClusterPorts = cluster.stream().flatMap(ecis -> ecis.getPortsList().stream()).collect(Collectors.toSet());
Set<PortSymbol> combinedPorts = new HashSet<>();
combinedPorts.addAll(curClusterPorts);
combinedPorts.addAll(inst.getPorts());
combinedPorts.addAll(inst.getPortsList());
Set<ConnectorSymbol> tmpConnectiors = inst.getConnectors().stream()
//remove all connections that use subcomponents not in cluster
......@@ -97,7 +97,7 @@ public class ClusterHelper {
return true;
})
//remove all connections super <-> cluster
.filter(c -> !(inst.getPorts().contains(c.getSourcePort()) || (inst.getPorts().contains(c.getTargetPort()))))
.filter(c -> !(inst.getPortsList().contains(c.getSourcePort()) || (inst.getPortsList().contains(c.getTargetPort()))))
.collect(Collectors.toSet());
Collection<PortSymbol> mwPorts = curClusterPorts.stream()
......
......@@ -3,8 +3,8 @@ package de.monticore.lang.monticar.generator.middleware.helpers;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ConnectorSymbol;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.PortSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.MiddlewareSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.RosConnectionSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.MiddlewareSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosConnectionSymbol;
import de.monticore.lang.monticar.generator.rosmsg.GeneratorRosMsg;
import de.monticore.lang.monticar.generator.rosmsg.RosMsg;
import de.se_rwth.commons.logging.Log;
......
......@@ -46,7 +46,7 @@ public class DummyMiddlewareGenImpl implements GeneratorImpl {
@Override
public boolean willAccept(ExpandedComponentInstanceSymbol componentInstanceSymbol) {
return componentInstanceSymbol.getPorts().stream()
return componentInstanceSymbol.getPortsList().stream()
.map(PortSymbol::getMiddlewareSymbol)
.filter(Optional::isPresent)
.map(Optional::get)
......
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.tagging.MiddlewareSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.MiddlewareSymbol;
import de.monticore.lang.tagging._symboltable.TagKind;
public class DummyMiddlewareSymbol extends MiddlewareSymbol {
......
......@@ -36,7 +36,7 @@ public class RosCppGenImpl implements GeneratorImpl {
@Override
public boolean willAccept(ExpandedComponentInstanceSymbol componentInstanceSymbol) {
return componentInstanceSymbol.getPorts().stream()
return componentInstanceSymbol.getPortsList().stream()
.filter(PortSymbol::isRosPort)
.count() > 0;
}
......
......@@ -2,7 +2,7 @@ package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.PortSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.RosToEmamTagSchema;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosToEmamTagSchema;
import de.monticore.lang.monticar.generator.middleware.helpers.ClusterHelper;
import de.monticore.lang.monticar.generator.middleware.impls.CPPGenImpl;
import de.monticore.lang.monticar.generator.middleware.impls.RosCppGenImpl;
......
......@@ -2,8 +2,8 @@ package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.PortSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.RosConnectionSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.RosToEmamTagSchema;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosConnectionSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosToEmamTagSchema;
import de.monticore.lang.monticar.generator.cpp.GeneratorCPP;
import de.monticore.lang.monticar.generator.cpp.TestConverter;
import de.monticore.lang.monticar.generator.middleware.impls.CPPGenImpl;
......@@ -160,9 +160,9 @@ public class GenerationTest extends AbstractSymtabTest {
.filter(c -> c.getSourcePort().equals(c.getTargetPort()))
.forEach(c -> System.out.println("Source = Target in comp "+c.getComponentInstance().get().getName()+":"+c.getSource() + " -> " + c.getTargetPort()));
componentInstanceSymbol.getPorts().forEach(p -> p.setMiddlewareSymbol(new RosConnectionSymbol()));
componentInstanceSymbol.getPortsList().forEach(p -> p.setMiddlewareSymbol(new RosConnectionSymbol()));
componentInstanceSymbol.getSubComponents().stream()
.flatMap(subc -> subc.getPorts().stream())
.flatMap(subc -> subc.getPortsList().stream())
.forEach(p -> p.setMiddlewareSymbol(new RosConnectionSymbol()));
......
......@@ -2,8 +2,8 @@ package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.PortSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.RosConnectionSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.RosToEmamTagSchema;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosConnectionSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosToEmamTagSchema;
import de.monticore.lang.monticar.generator.middleware.helpers.RosHelper;
import de.monticore.lang.monticar.generator.roscpp.helper.TagHelper;
import de.monticore.lang.tagging._symboltable.TaggingResolver;
......
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