Unverified Commit f64cdd6e authored by sschneiders's avatar sschneiders Committed by GitHub
Browse files

Merge pull request #9 from EmbeddedMontiArc/remove-javadsl

Remove javadsl
parents 94c2e578 8f7c7162
<!--
******************************************************************************
MontiCAR Modeling Family, www.se-rwth.de
Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
All rights reserved.
This project is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
......@@ -11,9 +14,11 @@
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this project. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -25,15 +30,14 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc</artifactId>
<version>0.0.3</version>
<version>0.0.4</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
<properties>
<kotlin.version>1.1.51</kotlin.version>
<wagon.provider.version>2.6</wagon.provider.version>
<!-- DSLs -->
<javadsl.version>4.3.9</javadsl.version>
<cd4a.version>1.3.10</cd4a.version>
......@@ -42,10 +46,9 @@
<se-commons.version>1.7.7</se-commons.version>
<mc.grammars.assembly.version>0.0.6-SNAPSHOT</mc.grammars.assembly.version>
<languages.version>4.0.1-SNAPSHOT</languages.version>
<SIUnit.version>0.0.6-SNAPSHOT</SIUnit.version>
<struct.version>0.0.3-SNAPSHOT</struct.version>
<Common-MontiCar.version>0.0.3</Common-MontiCar.version>
<SIUnit.version>0.0.7</SIUnit.version>
<struct.version>0.0.4</struct.version>
<Common-MontiCar.version>0.0.4</Common-MontiCar.version>
<!-- .. Libraries .................................................. -->
<guava.version>18.0</guava.version>
......@@ -196,12 +199,6 @@
<version>${languages.version}</version>
</dependency>
<dependency>
<groupId>de.monticore</groupId>
<artifactId>javaDSL</artifactId>
<version>${javadsl.version}</version>
</dependency>
<!-- .. Test Libraries ............................................... -->
<dependency>
<groupId>junit</groupId>
......@@ -223,29 +220,18 @@
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>org.jscience</groupId>
<artifactId>jscience</artifactId>
<version>${jscience.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jre8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<!-- == BUILD INFRASTRUCTURE ============================================
<!-- == BUILD INFRASTRUCTURE ============================================
<ciManagement>
<system>Jenkins CI</system>
<url>http://ci.se.rwth-aachen.de/view/montiarc/</url>
......@@ -309,38 +295,6 @@
</plugin>
<!-- Other Configuration -->
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<configuration>
<jvmTarget>1.8</jvmTarget>
</configuration>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<sourceDirs>
<source>src/main/java</source>
<source>target/generated-sources/monticore/sourcecode</source>
<source>src/main/kotlin</source>
</sourceDirs>
</configuration>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.plugin}</version>
......@@ -444,26 +398,22 @@
<configuration>
</configuration>
</plugin>
<plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<format>xml</format>
<maxmem>256m</maxmem>
<aggregate>true</aggregate>
<instrumentation>
<excludes>
<exclude>de/monticore/lang/embeddedmontiarc/embeddedmontiarc/_parser/*.class</exclude>
<exclude>de/monticore/lang/embeddedmontiarc/embeddedmontiarc/_visitor/*.class</exclude>
<exclude>de/monticore/lang/embeddedmontiarc/embeddedmontiarc/_od/*.class</exclude>
<exclude>de/monticore/lang/embeddedmontiarc/embeddedmontiarc/_cocos/*.class</exclude>
<exclude>de/monticore/lang/embeddedmontiarc/embeddedmontiarc/_ast/*.class</exclude>
</excludes>
</instrumentation>
<format>xml</format>
<maxmem>256m</maxmem>
<aggregate>true</aggregate>
<instrumentation>
<excludes>
<exclude>target/**</exclude>
</excludes>
</instrumentation>
</configuration>
</plugin>
</plugins>
</plugin>
</plugins>
</build>
<distributionManagement>
......@@ -481,9 +431,17 @@
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<format>xml</format>
<instrumentation>
<excludes>
<exclude>target/**</exclude>
</excludes>
</instrumentation>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
\ No newline at end of file
</project>
......@@ -29,16 +29,21 @@ import de.monticore.lang.montiarc.tagging._symboltable.TaggingScopeSpanningSymbo
import de.monticore.lang.monticar.common2._ast.ASTParameter;
import de.monticore.lang.monticar.mcexpressions._ast.ASTExpression;
import de.monticore.lang.monticar.si._symboltable.ResolutionDeclarationSymbol;
import de.monticore.lang.monticar.ts.MCFieldSymbol;
import de.monticore.lang.monticar.ts.MCTypeSymbol;
import de.monticore.symboltable.ImportStatement;
import de.monticore.symboltable.SymbolKind;
import de.monticore.symboltable.modifiers.AccessModifier;
import de.monticore.symboltable.types.JFieldSymbol;
import de.monticore.symboltable.types.JTypeSymbol;
import de.monticore.symboltable.types.references.ActualTypeArgument;
import de.se_rwth.commons.logging.Log;
import javax.annotation.Nullable;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import static com.google.common.base.Preconditions.checkArgument;
......@@ -94,7 +99,7 @@ public class ComponentSymbol extends TaggingScopeSpanningSymbol {
/**
* @param parameterType configuration parameter to add
*/
public void addConfigParameter(JFieldSymbol parameterType) {
public void addConfigParameter(MCFieldSymbol parameterType) {
if (referencedComponent.isPresent())
referencedComponent.get().addConfigParameter(parameterType);
else {
......@@ -247,7 +252,7 @@ public class ComponentSymbol extends TaggingScopeSpanningSymbol {
/**
* @param typeParameter generic type parameter to add
*/
public void addFormalTypeParameter(JTypeSymbol formalTypeParameter) {
public void addFormalTypeParameter(MCTypeSymbol formalTypeParameter) {
if (referencedComponent.isPresent()) {
referencedComponent.get().addFormalTypeParameter(formalTypeParameter);
} else {
......@@ -256,10 +261,10 @@ public class ComponentSymbol extends TaggingScopeSpanningSymbol {
}
}
public List<JTypeSymbol> getFormalTypeParameters() {
final Collection<JTypeSymbol> resolvedTypes =
referencedComponent.orElse(this).getSpannedScope().resolveLocally(JTypeSymbol.KIND);
return resolvedTypes.stream().filter(JTypeSymbol::isFormalTypeParameter)
public List<MCTypeSymbol> getFormalTypeParameters() {
final Collection<MCTypeSymbol> resolvedTypes =
referencedComponent.orElse(this).getSpannedScope().resolveLocally(MCTypeSymbol.KIND);
return resolvedTypes.stream().filter(MCTypeSymbol::isFormalTypeParameter)
.collect(Collectors.toList());
}
......@@ -512,14 +517,14 @@ public class ComponentSymbol extends TaggingScopeSpanningSymbol {
/**
* @return configParameters
*/
public List<JFieldSymbol> getConfigParameters() {
public List<MCFieldSymbol> getConfigParameters() {
if (referencedComponent.isPresent()) {
return referencedComponent.get().getConfigParameters();
} else {
final Collection<JFieldSymbol> resolvedAttributes = getMutableSpannedScope()
.resolveLocally(JFieldSymbol.KIND);
final List<JFieldSymbol> parameters = sortSymbolsByPosition(resolvedAttributes.stream()
.filter(JFieldSymbol::isParameter).collect(Collectors.toList()));
final Collection<MCFieldSymbol> resolvedAttributes = getMutableSpannedScope()
.resolveLocally(MCFieldSymbol.KIND);
final List<MCFieldSymbol> parameters = sortSymbolsByPosition(resolvedAttributes.stream()
.filter(MCFieldSymbol::isParameter).collect(Collectors.toList()));
return parameters;
}
}
......@@ -528,7 +533,7 @@ public class ComponentSymbol extends TaggingScopeSpanningSymbol {
* @return List of configuration parameters that are to be set during instantiation with the given
* visibility
*/
public Collection<JFieldSymbol> getConfigParameters(AccessModifier visibility) {
public Collection<MCFieldSymbol> getConfigParameters(AccessModifier visibility) {
// no need to check for reference, as getParameres() does so.
return getConfigParameters().stream()
.filter(s -> s.getAccessModifier().includes(visibility))
......
......@@ -109,7 +109,7 @@ public class ConstantPortSymbol extends PortSymbol {
} else if (node.getBoolLiteral().isPresent()) {
constantPortSymbol.initConstantPortSymbol(node.getBoolLiteral().get());
String typeName;
typeName = "Boolean";
typeName = "B";
constantPortSymbol.setTypeReference(symbolTableCreator.initTypeRefGeneralType(typeName));
} else {
Log.info("Case not handled", "ConstantPortInit");
......
......@@ -25,8 +25,8 @@ import de.monticore.symboltable.MutableScope;
import de.monticore.symboltable.Symbol;
import de.monticore.symboltable.resolving.CommonResolvingFilter;
import de.monticore.symboltable.resolving.ResolvingFilter;
import de.monticore.symboltable.types.JFieldSymbol;
import de.monticore.symboltable.types.JTypeSymbol;
import de.monticore.lang.monticar.ts.MCFieldSymbol;
import de.monticore.lang.monticar.ts.MCTypeSymbol;
import de.se_rwth.commons.logging.Log;
import java.util.Collection;
......@@ -63,11 +63,11 @@ public class EMAComponentBuilder extends de.monticore.lang.montiarc.montiarc._sy
private static final ResolvingFilter<ComponentSymbol> componentResolvingFilter =
CommonResolvingFilter.create(ComponentSymbol.KIND);
private static final ResolvingFilter<JTypeSymbol> jTypeSymbolResolvingGilter =
CommonResolvingFilter.create(JTypeSymbol.KIND);
private static final ResolvingFilter<MCTypeSymbol> jTypeSymbolResolvingGilter =
CommonResolvingFilter.create(MCTypeSymbol.KIND);
private static final ResolvingFilter<JFieldSymbol> jAttributeResolvingFilter =
CommonResolvingFilter.create(JFieldSymbol.KIND);
private static final ResolvingFilter<MCFieldSymbol> jAttributeResolvingFilter =
CommonResolvingFilter.create(MCFieldSymbol.KIND);
private static final ResolvingFilter<ComponentInstanceSymbol> componentInstanceResolvingFilter =
CommonResolvingFilter.create(ComponentInstanceSymbol.KIND);
......@@ -189,76 +189,76 @@ public class EMAComponentBuilder extends de.monticore.lang.montiarc.montiarc._sy
////////////////////////// formal type parameters //////////////////////////////////////////////
public static EMAComponentBuilder addFormalTypeParameter(ComponentSymbol cs, JTypeSymbol formalTypeParameter) {
public static EMAComponentBuilder addFormalTypeParameter(ComponentSymbol cs, MCTypeSymbol formalTypeParameter) {
if (!formalTypeParameter.isFormalTypeParameter()) {
Log.error(String.format("%s is not a formal type parameter. JTypeSymbol#isFormalTypeParameter() is false.",
Log.error(String.format("%s is not a formal type parameter. MCTypeSymbol#isFormalTypeParameter() is false.",
SymbolPrinter.printFormalTypeParameters(formalTypeParameter)));
}
addResolverIfMissing(cs, jTypeSymbolResolvingGilter, formalTypeParameter);
return getInstance();
}
public static EMAComponentBuilder addFormalTypeParameters(ComponentSymbol cs, JTypeSymbol... formalTypeParameter) {
for (JTypeSymbol f : formalTypeParameter) {
public static EMAComponentBuilder addFormalTypeParameters(ComponentSymbol cs, MCTypeSymbol... formalTypeParameter) {
for (MCTypeSymbol f : formalTypeParameter) {
addFormalTypeParameter(cs, f);
}
return getInstance();
}
public static EMAComponentBuilder addFormalTypeParameters(ComponentSymbol cs, Collection<JTypeSymbol> formalTypeParameter) {
public static EMAComponentBuilder addFormalTypeParameters(ComponentSymbol cs, Collection<MCTypeSymbol> formalTypeParameter) {
formalTypeParameter.stream().forEachOrdered(f -> addFormalTypeParameter(cs, f));
return getInstance();
}
public static EMAComponentBuilder removeFormalTypeParameter(ComponentSymbol cs, JTypeSymbol formalTypeParameter) {
public static EMAComponentBuilder removeFormalTypeParameter(ComponentSymbol cs, MCTypeSymbol formalTypeParameter) {
((MutableScope) cs.getSpannedScope()).remove(formalTypeParameter);
return getInstance();
}
public static EMAComponentBuilder removeFormalTypeParameters(ComponentSymbol cs, JTypeSymbol... formalTypeParameter) {
for (JTypeSymbol f : formalTypeParameter) {
public static EMAComponentBuilder removeFormalTypeParameters(ComponentSymbol cs, MCTypeSymbol... formalTypeParameter) {
for (MCTypeSymbol f : formalTypeParameter) {
removeFormalTypeParameter(cs, f);
}
return getInstance();
}
public static EMAComponentBuilder removeFormalTypeParameters(ComponentSymbol cs, Collection<JTypeSymbol> formalTypeParameter) {
public static EMAComponentBuilder removeFormalTypeParameters(ComponentSymbol cs, Collection<MCTypeSymbol> formalTypeParameter) {
formalTypeParameter.stream().forEachOrdered(f -> removeFormalTypeParameter(cs, f));
return getInstance();
}
////////////////////////// config parameters //////////////////////////////////////////////
public static EMAComponentBuilder addConfigParameter(ComponentSymbol cs, JFieldSymbol configParameter) {
public static EMAComponentBuilder addConfigParameter(ComponentSymbol cs, MCFieldSymbol configParameter) {
addResolverIfMissing(cs, jAttributeResolvingFilter, configParameter);
return getInstance();
}
public static EMAComponentBuilder addConfigParameters(ComponentSymbol cs, JFieldSymbol... configParameter) {
for (JFieldSymbol c : configParameter) {
public static EMAComponentBuilder addConfigParameters(ComponentSymbol cs, MCFieldSymbol... configParameter) {
for (MCFieldSymbol c : configParameter) {
addConfigParameter(cs, c);
}
return getInstance();
}
public static EMAComponentBuilder addConfigParameters(ComponentSymbol cs, Collection<JFieldSymbol> configParameter) {
public static EMAComponentBuilder addConfigParameters(ComponentSymbol cs, Collection<MCFieldSymbol> configParameter) {
configParameter.stream().forEachOrdered(c -> addConfigParameter(cs, c));
return getInstance();
}
public static EMAComponentBuilder removeConfigParameter(ComponentSymbol cs, JFieldSymbol configParameter) {
public static EMAComponentBuilder removeConfigParameter(ComponentSymbol cs, MCFieldSymbol configParameter) {
((MutableScope) cs.getSpannedScope()).remove(configParameter);
return getInstance();
}
public static EMAComponentBuilder removeConfigParameters(ComponentSymbol cs, JFieldSymbol... configParameter) {
for (JFieldSymbol c : configParameter) {
public static EMAComponentBuilder removeConfigParameters(ComponentSymbol cs, MCFieldSymbol... configParameter) {
for (MCFieldSymbol c : configParameter) {
removeConfigParameter(cs, c);
}
return getInstance();
}
public static EMAComponentBuilder removeConfigParameters(ComponentSymbol cs, Collection<JFieldSymbol> configParameter) {
public static EMAComponentBuilder removeConfigParameters(ComponentSymbol cs, Collection<MCFieldSymbol> configParameter) {
configParameter.stream().forEachOrdered(c -> removeConfigParameter(cs, c));
return getInstance();
}
......
......@@ -20,20 +20,24 @@
*/
package de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable;
import de.monticore.java.symboltable.JavaSymbolFactory;
import de.monticore.java.symboltable.JavaTypeSymbol;
import de.monticore.java.symboltable.JavaTypeSymbolReference;
import de.monticore.lang.monticar.resolution._ast.ASTResolutionDeclaration;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc.types.TypesPrinter;
import de.monticore.lang.monticar.resolution._ast.ASTTypeArgument;
import de.monticore.lang.monticar.ts.MCTypeSymbol;
import de.monticore.lang.monticar.ts.MontiCarSymbolFactory;
import de.monticore.lang.monticar.ts.MontiCarTypeSymbol;
import de.monticore.lang.monticar.ts.references.MontiCarTypeSymbolReference;
import de.monticore.lang.monticar.types2._ast.ASTComplexArrayType;
import de.monticore.lang.monticar.types2._ast.ASTComplexReferenceType;
import de.monticore.lang.monticar.types2._ast.ASTNamingResolution;
import de.monticore.lang.monticar.types2._ast.ASTSimpleReferenceType;
import de.monticore.lang.monticar.types2._ast.ASTType;
import de.monticore.lang.monticar.types2._ast.ASTTypeParameters;
import de.monticore.lang.monticar.types2._ast.ASTTypeVariableDeclaration;
import de.monticore.lang.monticar.types2._ast.ASTWildcardType;
import de.monticore.symboltable.GlobalScope;
import de.monticore.symboltable.ImportStatement;
import de.monticore.symboltable.Scope;
import de.monticore.symboltable.types.JTypeSymbol;
import de.monticore.symboltable.types.references.ActualTypeArgument;
//import de.monticore.types.TypesPrinter;
//import de.monticore.types.types._ast.*;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc.types.TypesPrinter;
import de.monticore.lang.monticar.types2._ast.*;
import de.se_rwth.commons.logging.Log;
import javax.annotation.Nullable;
......@@ -48,10 +52,10 @@ import java.util.stream.Collectors;
* @author Robert Heim
*/
public class EMAJavaHelper extends de.monticore.lang.montiarc.montiarc._symboltable.JavaHelper {
private final static JavaSymbolFactory jSymbolFactory = new JavaSymbolFactory();
private final static MontiCarSymbolFactory jSymbolFactory = new MontiCarSymbolFactory();
/**
* Adds the TypeParameters to the JavaTypeSymbol if the class or interface declares TypeVariables.
* Adds the TypeParameters to the MontiCarTypeSymbol if the class or interface declares TypeVariables.
* Example:
* <p>
* class Bla<T, S extends SomeClass<T> & SomeInterface>
......@@ -60,11 +64,11 @@ public class EMAJavaHelper extends de.monticore.lang.montiarc.montiarc._symbolta
*
* @param typeSymbol
* @param optionalTypeParameters
* @return JavaTypeSymbol list to be added to the scope
* @return MontiCarTypeSymbol list to be added to the scope
*/
// TODO see JavaSymbolTableCreator.addTypeParameters(...),
// see ComponentSymbol addFormalTypeParameters etc.
protected static List<JTypeSymbol> addTypeParametersToType(
protected static List<MCTypeSymbol> addTypeParametersToType(
ComponentSymbol typeSymbol,
Optional<ASTTypeParameters> optionalTypeParameters, Scope currentScope) {
if (optionalTypeParameters.isPresent()) {
......@@ -76,7 +80,7 @@ public class EMAJavaHelper extends de.monticore.lang.montiarc.montiarc._symbolta
// new type parameter
// TypeParameters/TypeVariables are seen as type declarations.
// For each variable instantiate a JavaTypeSymbol.
// For each variable instantiate a MontiCarTypeSymbol.
//TODO FIX if not present
if (astTypeParameter.getResolutionDeclaration().get().getTypeName() != null) {
final String typeVariableName = astTypeParameter.getResolutionDeclaration().get().getTypeName();
......@@ -100,7 +104,7 @@ public class EMAJavaHelper extends de.monticore.lang.montiarc.montiarc._symbolta
}
private static void addFormalTypeParameter(String typeVariableName, ASTTypeVariableDeclaration astTypeParameter, Scope currentScope, ComponentSymbol typeSymbol) {
JavaTypeSymbol javaTypeVariableSymbol = jSymbolFactory.createTypeVariable(typeVariableName);
MontiCarTypeSymbol javaTypeVariableSymbol = jSymbolFactory.createTypeVariable(typeVariableName);
// TODO implement
// // init type parameter
// if (astTypeParameter.getTypeBound().isPresent()) {
......@@ -120,7 +124,7 @@ public class EMAJavaHelper extends de.monticore.lang.montiarc.montiarc._symbolta
}
/**
* Adds the given ASTTypes as interfaces to the JavaTypeSymbol. The JavaTypeSymbol can be a type
* Adds the given ASTTypes as interfaces to the MontiCarTypeSymbol. The MontiCarTypeSymbol can be a type
* variable. Interfaces may follow after the first extended Type. We treat the first Type also as
* interface even though it may be a class.
* <p>
......@@ -133,10 +137,10 @@ public class EMAJavaHelper extends de.monticore.lang.montiarc.montiarc._symbolta
*/
// TODO this is implemented in JavaDSL, but reimplemented because of ArcTypeSymbol. This should
// somehow be extracted and implemented only once
protected static void addInterfacesToTypeEMA(JavaTypeSymbol arcTypeSymbol,
protected static void addInterfacesToTypeEMA(MontiCarTypeSymbol arcTypeSymbol,
List<ASTType> astInterfaceTypeList, Scope currentScope) {
for (ASTType astInterfaceType : astInterfaceTypeList) {
JavaTypeSymbolReference javaInterfaceTypeSymbolReference = new JavaTypeSymbolReference(
MontiCarTypeSymbolReference javaInterfaceTypeSymbolReference = new MontiCarTypeSymbolReference(
TypesPrinter.printTypeWithoutTypeArgumentsAndDimension(astInterfaceType), currentScope,
0);
List<ActualTypeArgument> actualTypeArguments = new ArrayList<>();
......@@ -150,8 +154,8 @@ public class EMAJavaHelper extends de.monticore.lang.montiarc.montiarc._symbolta
ASTComplexReferenceType astComplexReferenceType = (ASTComplexReferenceType) astInterfaceType;
for (ASTSimpleReferenceType astSimpleReferenceType : astComplexReferenceType
.getSimpleReferenceTypes()) {
// TODO javaInterfaceTypeSymbolReference.getEnclosingScope().resolve("Boolean", JTypeSymbol.KIND).get()
// javaInterfaceTypeSymbolReference.getEnclosingScope().resolve("Boolean", JTypeSymbol.KIND))
// TODO javaInterfaceTypeSymbolReference.getEnclosingScope().resolve("Boolean", MCTypeSymbol.KIND).get()
// javaInterfaceTypeSymbolReference.getEnclosingScope().resolve("Boolean", MCTypeSymbol.KIND))
if (astSimpleReferenceType.getTypeArguments().isPresent()) {
for (ASTTypeArgument argument : astSimpleReferenceType.getTypeArguments().get().getTypeArguments()) {
......@@ -183,10 +187,10 @@ public class EMAJavaHelper extends de.monticore.lang.montiarc.montiarc._symbolta
if (argument instanceof ASTSimpleReferenceType) {
ASTSimpleReferenceType simpleArg = (ASTSimpleReferenceType) argument;
String name = simpleArg.getNames().stream().collect(Collectors.joining("."));
Optional<JTypeSymbol> symbol = symbolTable.resolve(name, JTypeSymbol.KIND);
Optional<MCTypeSymbol> symbol = symbolTable.resolve(name, MCTypeSymbol.KIND);
if (symbol.isPresent() && symbol.get().getEnclosingScope() != null) {
if (typeArgument == null) {
typeArgument = new ActualTypeArgumentASTElement(isLowerBound, isUpperBound, new JavaTypeSymbolReference(
typeArgument = new ActualTypeArgumentASTElement(isLowerBound, isUpperBound, new MontiCarTypeSymbolReference(
symbol.get().getName(),
symbol.get().getEnclosingScope(), dim)).setAstTypeArguments(argument);
......
......@@ -20,18 +20,18 @@
*/
package de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable;
import java.util.Optional;
import de.monticore.ast.ASTNode;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc.unit.constant.EMAConstantValue;
import de.monticore.symboltable.types.references.JTypeReference;
import de.monticore.lang.monticar.ts.references.MCTypeReference;
import de.se_rwth.commons.logging.Log;
import java.util.Optional;
public class EMAPortBuilder {
protected Optional<Boolean> incoming = Optional.empty();
protected Optional<String> name = Optional.empty();
protected Optional<JTypeReference> typeReference = Optional.empty();
protected Optional<MCTypeReference> typeReference = Optional.empty();
protected Optional<EMAConstantValue> constantValue = Optional.empty();
protected Optional<ASTNode> astNode = Optional.empty();
......@@ -65,7 +65,7 @@ public class EMAPortBuilder {
return this;
}
public EMAPortBuilder setTypeReference(JTypeReference typeReference) {
public EMAPortBuilder setTypeReference(MCTypeReference typeReference) {
this.typeReference = Optional.of(typeReference);
return this;
}
......
......@@ -22,6 +22,7 @@ package de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable;
import com.google.common.collect.ImmutableSet;
import de.monticore.ast.ASTNode;
import de.monticore.lang.monticar.ts.MontiCarTypeSymbol;
import de.monticore.lang.montiarc.tagging._symboltable.TagSymbol;
import de.monticore.lang.monticar.si._symboltable.ResolutionDeclarationSymbol;
import de.monticore.lang.monticar.types2._symboltable.UnitNumberResolutionSymbol;
......@@ -31,9 +32,9 @@ import de.monticore.lang.montiarc.tagging._symboltable.TagSymbolCreator;
import de.monticore.lang.montiarc.tagging._symboltable.TagableModelingLanguage;
import de.monticore.modelloader.ModelingLanguageModelLoader;