Skip to content

Commit

Permalink
Issue #445: Deal with non-connected ports
Browse files Browse the repository at this point in the history
Signed-off-by: Ernesto Posse <ernesto.posse@lumenix.com>
  • Loading branch information
eposselumenix authored and Ernesto Posse committed May 1, 2024
1 parent 5219543 commit daf2885
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions bundles/com.zeligsoft.cx.codegen/src/codegen/debug.ext
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ private Void JavaInspect( int condition, Object obj ) :
private Object JavaDebugObj( Object obj, String msg ) :
JAVA com.zeligsoft.cx.codegen.internal.OawDebug.debug( java.lang.Object, java.lang.String )
;

String getNameOrId( Object obj ) :
JAVA com.zeligsoft.cx.codegen.internal.OawDebug.getNameOrId( java.lang.Object )
;

Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public boolean select(Viewer viewer, Object parentElement, Object element) {
}

// filter out CX Domain models
if (eObject.eResource() != null && domain.isReadOnly(eObject.eResource()) && ZDLUtil.isZDLConcept(eObject, ZDLNames.DOMAIN_MODEL)) {
if (eObject != null && eObject.eResource() != null && domain != null && domain.isReadOnly(eObject.eResource()) && ZDLUtil.isZDLConcept(eObject, ZDLNames.DOMAIN_MODEL)) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ public static Property getDataSpaceFromPerPort(Port port, Property deploymentPar
ConnectorEnd otherEnd = IDL3PlusUtil.getOtherEnd(port, ccmPart);
// While the other end is a border port, and not a dataspace, go up until we
// find one
while (otherEnd == null || isBorderPort(otherEnd)) {
while (otherEnd != null && isBorderPort(otherEnd)) {
// Here port is a delegated port
// Get the parent deployment part of the current part
deploymentPart = ZDeploymentUtil.getParentPart(deploymentPart);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ Void makeDDS4CCMConnectorFragment(DeploymentPart source, DeploymentPart target,
let compInstance = plan.instance.selectFirst( i | i.name.first().matches(sourceSN)) :

Debug(null, " Void makeDDS4CCMConnectorFragment(DeploymentPart source = " + source.name + ", DeploymentPart target = " + target.name + ", DeploymentPlan plan = " + getNameOrId(plan) + ", CCM::CCM_Deployment::DeploymentPlan deployment = " + deployment.name + ", DataSpace dataSpace = " + dataSpace.name + ", InterfacePort sourcePort = " + sourcePort.name + ", CCMConnector origConn = " + getNameOrId(origConn) + " ); idd = " + fragmentInstance.id) ->

// For the DDS Connector that connects them, for each provides and requires, create a connection where one endpoint is
// the facet/recept on the component, and the other is the connector fragment we just created.
// source is the component we are connecting to.
Expand Down

0 comments on commit daf2885

Please sign in to comment.