Commit 1f7084c9 authored by Malte Heithoff's avatar Malte Heithoff
Browse files

Resolve Component even if it was lower case

parent adb6a0e8
......@@ -43,9 +43,11 @@ import de.monticore.lang.monticar.generator.pythonwrapper.symbolservices.data.Co
import de.monticore.lang.tagging._symboltable.TagSymbol;
import de.monticore.lang.tagging._symboltable.TaggingResolver;
import de.monticore.symboltable.Scope;
import de.se_rwth.commons.Names;
import de.se_rwth.commons.Splitters;
import de.se_rwth.commons.logging.Log;
import freemarker.template.TemplateException;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.SystemUtils;
import javax.xml.bind.DatatypeConverter;
......@@ -134,6 +136,12 @@ public class EMADLGenerator implements EMAMGenerator {
}
private EMAComponentInstanceSymbol resolveComponentInstanceSymbol(String qualifiedName, TaggingResolver symtab) {
String simpleName = Names.getSimpleName(qualifiedName);
if (!Character.isUpperCase(simpleName.charAt(0))) {
String packageName = qualifiedName.substring(0, qualifiedName.length() - simpleName.length() - 1);
qualifiedName = Names.getQualifiedName(packageName, StringUtils.capitalize(simpleName));
}
EMAComponentSymbol component = symtab.<EMAComponentSymbol>resolve(qualifiedName, EMAComponentSymbol.KIND).orElse(null);
List<String> splitName = Splitters.DOT.splitToList(qualifiedName);
......
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