use of org.finos.legend.pure.m3.serialization.grammar.m3parser.antlr.M3Parser.IdentifierContext in project legend-pure by finos.
the class AntlrContextToM3CoreInstance method definition.
public CoreInstance definition(DefinitionContext ctx, boolean useImportStubsInInstanceParser) throws PureParserException {
CoreInstance result = null;
ImportGroup importId = null;
if (ctx.imports() != null) {
importId = this.imports(ctx.imports());
if (this.oldState == null) {
this.hasImportChanged = true;
} else {
String importGroupID = importId._name();
RichIterable<? extends PackageableElement> oldImportGroups = this.oldState.getImportGroups().select(e -> importGroupID.equals(e._name()));
if (oldImportGroups.size() == 1) {
ImportGroup oldImportGroup = (ImportGroup) oldImportGroups.toList().get(0);
MutableSet<String> oldPaths = oldImportGroup._imports().collect(Import::_path, Sets.mutable.empty());
MutableSet<String> newPaths = importId._imports().collect(Import::_path, Sets.mutable.empty());
if (oldPaths.equals(newPaths)) {
this.hasImportChanged = false;
PackageInstance parent = (PackageInstance) this.processorSupport.package_getByUserPath("system::imports");
parent._children(parent._children().reject(e -> importGroupID.equals(e._name())));
parent._childrenAdd(oldImportGroup);
oldImportGroup._package(parent);
oldImportGroup.setSourceInformation(importId.getSourceInformation());
oldImportGroup._imports(importId._imports());
importId = oldImportGroup;
} else {
this.hasImportChanged = true;
}
} else {
this.hasImportChanged = true;
}
}
}
if (ctx.profile() != null) {
for (ProfileContext pCtx : ctx.profile()) {
if (this.hasImportChanged) {
result = this.profile(pCtx);
} else {
String importGroupID = importId._name();
String newContent = Lists.mutable.with(pCtx.start.getInputStream().getText(new Interval(pCtx.start.getStartIndex(), pCtx.stop.getStopIndex())).split("\\r?\\n")).makeString("", System.lineSeparator(), System.lineSeparator());
MutableList<CoreInstance> oldInstances = this.oldInstances.select(i -> (this.oldState != null) && this.oldState.instanceImportGroupInSourceEqualsNewImportGroup(i, importGroupID) && this.oldState.instanceContentInSourceEqualsNewContent(i, newContent), Lists.mutable.empty());
if (oldInstances.size() == 1) {
CoreInstance thisInstance = oldInstances.get(0);
this.oldInstances.remove(thisInstance);
SourceInformation newSourceInfo = this.sourceInformation.getPureSourceInformation(pCtx.getStart(), pCtx.qualifiedName().getStop(), pCtx.getStop());
if (thisInstance.getSourceInformation().getStartColumn() == newSourceInfo.getStartColumn()) {
this.offsetSourceInformationForInstanceAndChildren(thisInstance, newSourceInfo.getStartLine() - thisInstance.getSourceInformation().getStartLine());
PackageInstance packageInstance = this.buildPackage(pCtx.qualifiedName().packagePath());
((PackageableElement) thisInstance)._package(packageInstance);
packageInstance._childrenAdd((PackageableElement) thisInstance);
result = thisInstance;
} else {
result = this.profile(pCtx);
}
} else {
result = this.profile(pCtx);
}
}
this.coreInstancesResult.add(result);
}
}
if (ctx.classDefinition() != null) {
for (ClassDefinitionContext dCtx : ctx.classDefinition()) {
if (this.hasImportChanged) {
result = this.classParser(dCtx, importId, this.addLines);
} else {
String importGroupID = importId._name();
String newContent = Lists.mutable.with(dCtx.start.getInputStream().getText(new Interval(dCtx.start.getStartIndex(), dCtx.stop.getStopIndex())).split("\\r?\\n")).makeString("", System.lineSeparator(), System.lineSeparator());
List<CoreInstance> oldInstances = this.oldInstances.select(i -> (this.oldState != null) && this.oldState.instanceImportGroupInSourceEqualsNewImportGroup(i, importGroupID) && this.oldState.instanceContentInSourceEqualsNewContent(i, newContent), Lists.mutable.empty());
if (oldInstances.size() == 1) {
CoreInstance thisInstance = oldInstances.get(0);
this.oldInstances.remove(thisInstance);
SourceInformation newSourceInfo = this.sourceInformation.getPureSourceInformation(dCtx.getStart(), dCtx.qualifiedName().identifier().getStart(), dCtx.getStop());
if (thisInstance.getSourceInformation().getStartColumn() == newSourceInfo.getStartColumn()) {
this.offsetSourceInformationForInstanceAndChildren(thisInstance, newSourceInfo.getStartLine() - thisInstance.getSourceInformation().getStartLine());
PackageInstance packageInstance = this.buildPackage(dCtx.qualifiedName().packagePath());
((PackageableElement) thisInstance)._package(packageInstance);
packageInstance._childrenAdd((PackageableElement) thisInstance);
result = thisInstance;
} else {
result = this.classParser(dCtx, importId, this.addLines);
}
} else {
result = this.classParser(dCtx, importId, this.addLines);
}
}
this.coreInstancesResult.add(result);
}
}
if (ctx.measureDefinition() != null) {
for (org.finos.legend.pure.m3.serialization.grammar.m3parser.antlr.M3Parser.MeasureDefinitionContext dCtx : ctx.measureDefinition()) {
if (this.hasImportChanged) {
result = this.measureParser(dCtx, importId, this.addLines);
} else {
String importGroupID = importId._name();
String newContent = Lists.mutable.with(dCtx.start.getInputStream().getText(new Interval(dCtx.start.getStartIndex(), dCtx.stop.getStopIndex())).split("\\r?\\n")).makeString("", System.lineSeparator(), System.lineSeparator());
List<CoreInstance> oldInstances = this.oldInstances.select(i -> (this.oldState != null) && this.oldState.instanceImportGroupInSourceEqualsNewImportGroup(i, importGroupID) && this.oldState.instanceContentInSourceEqualsNewContent(i, newContent), Lists.mutable.empty());
Predicate2<CoreInstance, SourceInformation> matchesOldInstance = (oldMeasureInstance, newSourceInfo) -> {
if (newSourceInfo == null || oldMeasureInstance.getSourceInformation().getStartColumn() == newSourceInfo.getStartColumn()) {
PackageInstance packageInstance;
if (newSourceInfo != null) {
offsetSourceInformationForInstanceAndChildren(oldMeasureInstance, newSourceInfo.getStartLine() - oldMeasureInstance.getSourceInformation().getStartLine());
}
Function<String, IdentifierContext> newIdentifierContext = s -> new IdentifierContext(null, 1) {
@Override
public String getText() {
return s;
}
};
packageInstance = buildPackage(Lists.mutable.with(newIdentifierContext.valueOf(oldMeasureInstance.getValueForMetaPropertyToOne(M3Properties._package).getName())));
((PackageableElement) oldMeasureInstance)._package(packageInstance);
packageInstance._childrenAdd((PackageableElement) oldMeasureInstance);
return true;
}
return false;
};
CoreInstance oldMeasureInstance = ListIterate.detect(oldInstances, i -> Instance.instanceOf(i, M3Paths.Measure, this.processorSupport));
if (oldMeasureInstance != null) {
this.oldInstances.remove(oldMeasureInstance);
SourceInformation newSourceInfo = this.sourceInformation.getPureSourceInformation(dCtx.getStart(), dCtx.qualifiedName().identifier().getStart(), dCtx.getStop());
if (matchesOldInstance.accept(oldMeasureInstance, newSourceInfo)) {
MeasureInstance mI = (MeasureInstance) oldMeasureInstance;
result = mI;
MutableList<Unit> units = Lists.mutable.with(mI._canonicalUnit()).withAll(mI._nonCanonicalUnits());
for (Unit unit : units) {
PackageInstance packageInstance = buildPackage(Lists.mutable.withAll(dCtx.qualifiedName().packagePath() == null ? Lists.mutable.empty() : ListAdapter.adapt(dCtx.qualifiedName().packagePath().identifier())));
unit._package(packageInstance);
packageInstance._childrenAdd(unit);
}
} else {
result = this.measureParser(dCtx, importId, this.addLines);
}
} else {
result = this.measureParser(dCtx, importId, this.addLines);
}
}
MeasureInstance mI = (MeasureInstance) result;
List<Unit> allMeasureUnitInstances = Lists.mutable.<Unit>withAll(mI._nonCanonicalUnits()).with(mI._canonicalUnit()).toList();
this.coreInstancesResult.add(result);
this.coreInstancesResult.addAll(allMeasureUnitInstances);
}
}
if (ctx.association() != null) {
for (AssociationContext pCtx : ctx.association()) {
if (this.hasImportChanged) {
result = this.associationParser(pCtx, importId);
} else {
String importGroupID = importId._name();
String newContent = Lists.mutable.with(pCtx.start.getInputStream().getText(new Interval(pCtx.start.getStartIndex(), pCtx.stop.getStopIndex())).split("\\r?\\n")).makeString("", System.lineSeparator(), System.lineSeparator());
List<CoreInstance> oldInstances = this.oldInstances.select(i -> (this.oldState != null) && this.oldState.instanceImportGroupInSourceEqualsNewImportGroup(i, importGroupID) && this.oldState.instanceContentInSourceEqualsNewContent(i, newContent), Lists.mutable.empty());
if (oldInstances.size() == 1) {
CoreInstance thisInstance = oldInstances.get(0);
this.oldInstances.remove(thisInstance);
SourceInformation newSourceInfo = this.sourceInformation.getPureSourceInformation(pCtx.ASSOCIATION().getSymbol(), pCtx.qualifiedName().identifier().getStart(), pCtx.getStop());
if (thisInstance.getSourceInformation().getStartColumn() == newSourceInfo.getStartColumn()) {
this.offsetSourceInformationForInstanceAndChildren(thisInstance, newSourceInfo.getStartLine() - thisInstance.getSourceInformation().getStartLine());
PackageInstance packageInstance = this.buildPackage(pCtx.qualifiedName().packagePath());
((PackageableElement) thisInstance)._package(packageInstance);
packageInstance._childrenAdd((PackageableElement) thisInstance);
result = thisInstance;
} else {
result = this.associationParser(pCtx, importId);
}
} else {
result = this.associationParser(pCtx, importId);
}
}
this.coreInstancesResult.add(result);
}
}
if (ctx.enumDefinition() != null) {
for (EnumDefinitionContext pCtx : ctx.enumDefinition()) {
if (this.hasImportChanged) {
result = this.enumParser(pCtx, importId);
} else {
String importGroupID = importId._name();
String newContent = Lists.mutable.with(pCtx.start.getInputStream().getText(new Interval(pCtx.start.getStartIndex(), pCtx.stop.getStopIndex())).split("\\r?\\n")).makeString("", System.lineSeparator(), System.lineSeparator());
List<CoreInstance> oldInstances = this.oldInstances.select(i -> (this.oldState != null) && this.oldState.instanceImportGroupInSourceEqualsNewImportGroup(i, importGroupID) && this.oldState.instanceContentInSourceEqualsNewContent(i, newContent), Lists.mutable.empty());
if (oldInstances.size() == 1) {
CoreInstance thisInstance = oldInstances.get(0);
this.oldInstances.remove(thisInstance);
SourceInformation newSourceInfo = this.sourceInformation.getPureSourceInformation(pCtx.getStart(), pCtx.qualifiedName().identifier().getStart(), pCtx.getStop());
if (thisInstance.getSourceInformation().getStartColumn() == newSourceInfo.getStartColumn()) {
this.offsetSourceInformationForInstanceAndChildren(thisInstance, newSourceInfo.getStartLine() - thisInstance.getSourceInformation().getStartLine());
PackageInstance packageInstance = this.buildPackage(pCtx.qualifiedName().packagePath());
((PackageableElement) thisInstance)._package(packageInstance);
packageInstance._childrenAdd((PackageableElement) thisInstance);
result = thisInstance;
} else {
result = this.enumParser(pCtx, importId);
}
} else {
result = this.enumParser(pCtx, importId);
}
}
this.coreInstancesResult.add(result);
}
}
if (ctx.nativeFunction() != null) {
for (NativeFunctionContext pCtx : ctx.nativeFunction()) {
if (this.hasImportChanged) {
this.nativeFunction(pCtx, importId, "", this.coreInstancesResult);
} else {
String importGroupID = importId._name();
String newContent = Lists.mutable.with(pCtx.start.getInputStream().getText(new Interval(pCtx.start.getStartIndex(), pCtx.stop.getStopIndex())).split("\\r?\\n")).makeString("", System.lineSeparator(), System.lineSeparator());
List<CoreInstance> oldInstances = this.oldInstances.select(i -> (this.oldState != null) && this.oldState.instanceImportGroupInSourceEqualsNewImportGroup(i, importGroupID) && this.oldState.instanceContentInSourceEqualsNewContent(i, newContent), Lists.mutable.empty());
if (oldInstances.size() == 1) {
CoreInstance thisInstance = oldInstances.get(0);
this.oldInstances.remove(thisInstance);
SourceInformation newSourceInfo = this.sourceInformation.getPureSourceInformation(pCtx.NATIVE().getSymbol(), pCtx.qualifiedName().identifier().getStart(), pCtx.END_LINE().getSymbol());
if (thisInstance.getSourceInformation().getStartColumn() == newSourceInfo.getStartColumn()) {
this.functionCounter++;
this.offsetSourceInformationForInstanceAndChildren(thisInstance, newSourceInfo.getStartLine() - thisInstance.getSourceInformation().getStartLine());
PackageInstance packageInstance = this.buildPackage(pCtx.qualifiedName().packagePath());
((PackageableElement) thisInstance)._package(packageInstance);
packageInstance._childrenAdd((PackageableElement) thisInstance);
this.coreInstancesResult.add(thisInstance);
} else {
this.nativeFunction(pCtx, importId, "", this.coreInstancesResult);
}
} else {
this.nativeFunction(pCtx, importId, "", this.coreInstancesResult);
}
}
}
}
if (ctx.functionDefinition() != null) {
for (FunctionDefinitionContext pCtx : ctx.functionDefinition()) {
if (this.hasImportChanged) {
result = this.concreteFunctionDefinition(pCtx, importId, true, "", this.coreInstancesResult);
} else {
String importGroupID = importId._name();
String newContent = Lists.mutable.with(pCtx.start.getInputStream().getText(new Interval(pCtx.start.getStartIndex(), pCtx.stop.getStopIndex())).split("\\r?\\n")).makeString("", System.lineSeparator(), System.lineSeparator());
List<CoreInstance> oldInstances = this.oldInstances.select(i -> (this.oldState != null) && this.oldState.instanceImportGroupInSourceEqualsNewImportGroup(i, importGroupID) && this.oldState.instanceContentInSourceEqualsNewContent(i, newContent), Lists.mutable.empty());
if (oldInstances.size() == 1) {
CoreInstance thisInstance = oldInstances.get(0);
this.oldInstances.remove(thisInstance);
SourceInformation newSourceInfo = this.sourceInformation.getPureSourceInformation(pCtx.FUNCTION().getSymbol(), pCtx.qualifiedName().identifier().getStart(), pCtx.getStop());
if (thisInstance.getSourceInformation().getStartColumn() == newSourceInfo.getStartColumn()) {
this.functionCounter++;
this.offsetSourceInformationForInstanceAndChildren(thisInstance, newSourceInfo.getStartLine() - thisInstance.getSourceInformation().getStartLine());
PackageInstance packageInstance = this.buildPackage(pCtx.qualifiedName().packagePath());
((PackageableElement) thisInstance)._package(packageInstance);
packageInstance._childrenAdd((PackageableElement) thisInstance);
this.coreInstancesResult.add(thisInstance);
result = thisInstance;
} else {
result = this.concreteFunctionDefinition(pCtx, importId, true, "", this.coreInstancesResult);
}
} else {
result = this.concreteFunctionDefinition(pCtx, importId, true, "", this.coreInstancesResult);
}
}
}
}
if (ctx.instance() != null) {
for (InstanceContext pCtx : ctx.instance()) {
result = this.instanceParser(pCtx, true, importId, this.addLines, "", true, useImportStubsInInstanceParser);
this.coreInstancesResult.add(result);
}
}
this.newSourceInfoMap.forEachKeyValue(CoreInstance::setSourceInformation);
return result;
}
use of org.finos.legend.pure.m3.serialization.grammar.m3parser.antlr.M3Parser.IdentifierContext in project legend-pure by finos.
the class AntlrContextToM3CoreInstance method propertyExpression.
private CoreInstance propertyExpression(PropertyExpressionContext ctx, CoreInstance result, MutableList<ValueSpecification> parameters, MutableList<String> typeParametersNames, LambdaContext lambdaContext, String space, ImportGroup importId) {
parameters.clear();
boolean function = false;
IdentifierContext property = ctx.identifier();
CoreInstance parameter;
if (ctx.functionExpressionParameters() != null) {
function = true;
FunctionExpressionParametersContext fepCtx = ctx.functionExpressionParameters();
if (fepCtx.combinedExpression() != null) {
for (CombinedExpressionContext ceCtx : fepCtx.combinedExpression()) {
parameter = this.combinedExpression(ceCtx, "param", typeParametersNames, lambdaContext, spacePlusTabs(space, 4), true, importId, addLines);
parameters.add((ValueSpecification) parameter);
}
}
} else if (ctx.functionExpressionLatestMilestoningDateParameter() != null) {
function = true;
ListIterate.collect(ctx.functionExpressionLatestMilestoningDateParameter().LATEST_DATE(), terminalNode -> InstanceValueInstance.createPersistent(repository, sourceInformation.getPureSourceInformation(terminalNode.getSymbol()), null, null)._values(Lists.immutable.with(repository.newLatestDateCoreInstance())), parameters);
}
if (!function) {
SimpleFunctionExpressionInstance sfe = SimpleFunctionExpressionInstance.createPersistent(this.repository, this.sourceInformation.getPureSourceInformation(property.getStart()), null, null, importId, null);
InstanceValue instanceValue = this.doWrap(property, false);
// Going to become an auto-map lambda so set a name to be used for the lambda
instanceValue.setName(lambdaContext.getLambdaFunctionUniqueName());
instanceValue._multiplicity(this.getPureOne());
GenericTypeInstance gt = GenericTypeInstance.createPersistent(this.repository);
Type ti = (Type) this.processorSupport.package_getByUserPath("String");
gt._rawTypeCoreInstance(ti);
instanceValue._genericType(gt);
sfe._propertyName(instanceValue);
sfe._parametersValues(Lists.mutable.of((ValueSpecification) result));
result = sfe;
} else {
SimpleFunctionExpressionInstance sfe = SimpleFunctionExpressionInstance.createPersistent(this.repository, this.sourceInformation.getPureSourceInformation(property.getStart()), null, null, importId, null);
InstanceValue instanceValue = this.doWrap(property, false);
// Going to become an auto-map lambda so set a name to be used for the lambda
instanceValue.setName(lambdaContext.getLambdaFunctionUniqueName());
instanceValue._multiplicity(this.getPureOne());
GenericTypeInstance gt = GenericTypeInstance.createPersistent(this.repository);
Type ti = (Type) this.processorSupport.package_getByUserPath("String");
gt._rawTypeCoreInstance(ti);
instanceValue._genericType(gt);
sfe._qualifiedPropertyName(instanceValue);
sfe._parametersValues(Lists.mutable.of((ValueSpecification) result).withAll(parameters));
result = sfe;
}
return result;
}
use of org.finos.legend.pure.m3.serialization.grammar.m3parser.antlr.M3Parser.IdentifierContext in project legend-pure by finos.
the class AntlrContextToM3CoreInstance method atomicExpression.
private CoreInstance atomicExpression(AtomicExpressionContext ctx, MutableList<String> typeParametersNames, LambdaContext lambdaContext, String space, boolean wrapFlag, ImportGroup importId, boolean addLines) {
CoreInstance result;
ListIterable<CoreInstance> dsl;
GenericType genericType;
VariableExpression expr;
MutableList<VariableExpression> expressions = Lists.mutable.of();
if (ctx.instanceLiteralToken() != null) {
result = this.instanceLiteralToken(ctx.instanceLiteralToken(), wrapFlag);
} else if (ctx.dsl() != null) {
dsl = this.dsl(ctx.dsl(), importId);
if (dsl.size() > 1) {
throw new RuntimeException("Unexpected");
}
result = wrapFlag ? this.doWrap(dsl.getFirst()) : dsl.getFirst();
} else if (ctx.expressionInstance() != null) {
result = this.expressionInstanceParser(ctx.expressionInstance(), typeParametersNames, lambdaContext, importId, addLines, spacePlusTabs(space, 4));
} else if (ctx.unitInstance() != null) {
result = this.unitInstanceParser(ctx.unitInstance(), importId);
} else if (ctx.variable() != null) {
result = this.variable(ctx.variable());
} else if (ctx.type() != null) {
genericType = this.type(ctx.type(), typeParametersNames, "", importId, addLines);
result = InstanceValueInstance.createPersistent(this.repository, genericType, this.getPureOne());
} else if (ctx.lambdaFunction() != null) {
boolean hasLambdaParams = false;
if (ctx.lambdaFunction().lambdaParam() != null) {
for (int i = 0; i < ctx.lambdaFunction().lambdaParam().size(); i++) {
hasLambdaParams = true;
IdentifierContext idCtx = ctx.lambdaFunction().lambdaParam(i).identifier();
expr = this.lambdaParam(ctx.lambdaFunction().lambdaParam(i).lambdaParamType(), idCtx, typeParametersNames, space, importId);
expressions.add(expr);
}
}
result = this.lambdaPipe(ctx.lambdaFunction().lambdaPipe(), hasLambdaParams ? ctx.lambdaFunction().lambdaParam(0).getStart() : null, expressions, typeParametersNames, lambdaContext, space, wrapFlag, importId, addLines);
} else if (ctx.lambdaParam() != null && ctx.lambdaPipe() != null) {
expr = this.lambdaParam(ctx.lambdaParam().lambdaParamType(), ctx.lambdaParam().identifier(), typeParametersNames, space, importId);
expressions.add(expr);
result = this.lambdaPipe(ctx.lambdaPipe(), ctx.lambdaParam().getStart(), expressions, typeParametersNames, lambdaContext, space, wrapFlag, importId, addLines);
} else if (ctx.instanceReference() != null) {
result = this.instanceReference(ctx.instanceReference(), typeParametersNames, lambdaContext, importId, space, addLines);
} else {
// lambdaPipe
result = this.lambdaPipe(ctx.lambdaPipe(), null, expressions, typeParametersNames, lambdaContext, space, wrapFlag, importId, addLines);
}
return result;
}
use of org.finos.legend.pure.m3.serialization.grammar.m3parser.antlr.M3Parser.IdentifierContext in project legend-pure by finos.
the class AntlrContextToM3CoreInstance method typeParametersWithContravarianceAndMultiplicityParameters.
private void typeParametersWithContravarianceAndMultiplicityParameters(TypeParametersWithContravarianceAndMultiplicityParametersContext ctx, MutableList<String> typeParameterNames, MutableList<Boolean> contravariants, MutableList<String> multiplicityParameterNames) {
if (ctx.contravarianceTypeParameters() != null) {
for (ContravarianceTypeParameterContext tpCtx : ctx.contravarianceTypeParameters().contravarianceTypeParameter()) {
contravariants.add(tpCtx.MINUS() != null);
typeParameterNames.add(tpCtx.identifier().getText());
}
}
if (ctx.multiplictyParameters() != null) {
for (IdentifierContext mpCtx : ctx.multiplictyParameters().identifier()) {
multiplicityParameterNames.add(mpCtx.getText());
}
}
}
use of org.finos.legend.pure.m3.serialization.grammar.m3parser.antlr.M3Parser.IdentifierContext in project legend-pure by finos.
the class AntlrContextToM3CoreInstance method buildPackage.
private PackageInstance buildPackage(MutableList<IdentifierContext> paths) {
PackageInstance parent = (PackageInstance) this.repository.getTopLevel(M3Paths.Root);
if (parent == null) {
throw new RuntimeException("Cannot find Root in model repository");
}
if (paths == null || Iterate.isEmpty(paths)) {
return parent;
}
for (IdentifierContext childToken : paths) {
String childName = childToken.getText();
synchronized (parent) {
CoreInstance child = _Package.findInPackage(parent, childName);
if (child == null) {
PackageInstance package_ = PackageInstance.createPersistent(this.repository, childName, null);
package_._name(childName);
package_._package(parent);
package_._children(Lists.immutable.empty());
parent._childrenAdd(package_);
child = package_;
} else if (!(child instanceof PackageInstance)) {
throw new PureParserException(this.sourceInformation.getSourceName(), childToken.getStart().getLine(), childToken.getStart().getCharPositionInLine(), "'" + org.finos.legend.pure.m3.navigation.PackageableElement.PackageableElement.getUserPathForPackageableElement(child) + "' is a " + child.getClassifier().getName() + ", should be a Package", paths.collect(RuleContext::getText).makeString("::"));
}
parent = (PackageInstance) child;
}
}
return parent;
}
Aggregations