Skip to content

Commit

Permalink
CommonDataStructureGenerator::debugDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-hickman-epistimis committed Feb 27, 2024
1 parent 64d4257 commit 32095c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions com.epistimis.uddl/src/com/epistimis/uddl/DefaultValue.xtend
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ import com.epistimis.uddl.util.ModelFilters
/**
* We can extract landmarks from the Measurement system associated with the measurement and use those for default values, if
* there are any. For enumerations, just take the enumeration name.
*
* We can also look at the Measurement system for things that don't have landmarks. Is there a general solution we can use that will provide
* defaults where possible, but fall back to hardcoded values here if no others are available? This could include a model containing just default values.
*/
class DefaultValue {
@Inject UddlQNP qnp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,14 @@ abstract class CommonDataStructureGenerator implements IGenerator2 {
processAnEntity(pEnt, fsa, context);
}
} else {
logger.warn("Cannot process unsupported Entity type: " + pce.toString);
logger.warn("Cannot process unsupported PlatformComposableElement: " + debugDescription(pce));
}

}

def debugDescription(EObject obj) {
return obj.fullyQualifiedName.toString() + " (type: " + obj.eClass.toString + ") defined in " + obj.eResource.URI.toString();
}
/**
* When creating a PDM header file, only include PlatformDataTypes. PlatformEntity gets a header per entity
*/
Expand Down Expand Up @@ -340,7 +343,7 @@ abstract class CommonDataStructureGenerator implements IGenerator2 {
return generateImportStatement(entType,ctx);
}
} else {
logger.error("Unable to cast PlatformComposableElement type: " + type.toString)
logger.error("Unable to generate include for PlatformComposableElement: " + debugDescription(type) );
}
/** If we get here, then it was already included */
return "";
Expand Down

0 comments on commit 32095c8

Please sign in to comment.