Commit b1391a86 authored by Lars Hermerschmidt's avatar Lars Hermerschmidt
Browse files

generator cleanup2

parent b66a6d92
#Generated by Maven
#Mon Oct 27 20:06:36 CET 2014
version=0.0.1-SNAPSHOT
groupId=de.se_rwth.montisecarc
artifactId=montiSecArcBE
......@@ -28,5 +28,16 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="src/main/grammars">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="target/generated-sources/monticore/sourcecode">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
eclipse.preferences.version=1
mcConfigurationFile=/home/lars/eclipse/default/lang2/mc.cfg
outputDirectory=/home/lars/eclipse/default/lang2/target/generated-sources/monticore/sourcecode
symbolTableDirectory=/home/lars/eclipse/default/lang2/target/generated-sources/monticore/symboltable
mcConfigurationFile=/home/lars/studArbeiten/ma-paff/git/03.Implementierung/montiSecArcFE/mc.cfg
outputDirectory=/home/lars/studArbeiten/ma-paff/git/03.Implementierung/montiSecArcFE/target/generated-sources/monticore/sourcecode
symbolTableDirectory=/home/lars/studArbeiten/ma-paff/git/03.Implementierung/montiSecArcFE/target/generated-sources/monticore/symboltable
......@@ -17,11 +17,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
......
......@@ -9,8 +9,8 @@
<artifactId>generator</artifactId>
<properties>
<monticore.version>2.0.6</monticore.version>
<!-- <umlp.version>1.6.0</umlp.version> -->
<!-- <monticore.version>2.0.6</monticore.version> -->
<!-- <umlp.version>1.6.0</umlp.version> -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
......@@ -32,18 +32,34 @@
<dependencies>
<dependency>
<groupId>de.se.rwth.secarc.lang</groupId>
<artifactId>montiSecArc-lang</artifactId>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.se_rwth.montisecarc</groupId>
<version>0.0.1-SNAPSHOT</version>
<artifactId>montiSecArcBE</artifactId>
</dependency>
<dependency>
<groupId>de.se.rwth.secarc.lang</groupId>
<artifactId>montiSecArcBE</artifactId>
<groupId>de.se_rwth.montisecarc</groupId>
<artifactId>montiSecArcFE</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>de.monticore.lang.common</groupId>
<artifactId>common-values</artifactId>
<version>1.9.0</version>
</dependency>
<!-- .. MontiCore .................................................... -->
<dependency>
<groupId>de.monticore</groupId>
......@@ -76,40 +92,40 @@
</dependency>
<!-- UML/P Languages -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.cdjava.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.odjava.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.scjava.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.sdjava.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.tcjava.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.ocl.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.cdjava.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.odjava.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.scjava.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.sdjava.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.tcjava.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>de.monticore.lang.umlp</groupId> -->
<!-- <artifactId>de.umlp.ocl.fe</artifactId> -->
<!-- <version>${umlp.version}</version> -->
<!-- </dependency> -->
</dependencies>
</project>
package demo;
package secarc.gen;
import java.util.HashMap;
import java.util.Map;
import java.util.Collection;
import java.util.Iterator;
import secarc._ast.ASTSecArcFilterComponent;
import mc.ast.ASTNode;
import mc.codegen.TemplateCalculator;
import mc.codegen.TemplateOperator;
import mc.umlp.cd._ast.ASTCDClass;
public class Constants extends TemplateCalculator<ASTNode> {
public static final Map<String, String> types = new HashMap<String, String>();
public Constants() {
types.put("String", "TEXT");
types.put("int", "INT");
types.put("float", "FLOAT");
System.out.println("Generator is running!!!!!!!!!!!!!!!!!!!!!!!");
}
@Override
public boolean calc(ASTNode ast, TemplateOperator op) {
op.setValue("constants", this);
ASTSecArcFilterComponent component = (ASTSecArcFilterComponent)ast;
component.get_Children();
component.getPorts();
traverse(0, ast); //TODO use InheritanceVisitor instead
return true;
}
public String getType(String key) {
return (types.get(key));
private void traverse (int depth, ASTNode ast) {
String prefix="";
for(int d = depth;d>0;d--) {
prefix=prefix+" ";
}
System.out.println(prefix + ast.getClass());
Collection<ASTNode> nodes = ast.get_Children();
Iterator<ASTNode> it = nodes.iterator();
while(it.hasNext()) {
ASTNode node = it.next();
traverse(depth+1, node);
}
}
}
......@@ -6,29 +6,30 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<classpathentry kind="src" output="target/classes" path="src/main/models">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<classpathentry kind="src" output="target/classes" path="target/generated-sources">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
......
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.source=1.7
......@@ -132,11 +132,11 @@
<buildIncrementally>false</buildIncrementally>
<arguments>
<argument>-analysis ALL parse</argument>
<!-- <argument>-analysis ALL parse</argument> -->
<!-- <argument>-analysis ALL javakeys</argument> -->
<!-- <argument>-synthesis ALL createModelnameFiles</argument> -->
<argument>-check ALL default</argument>
<argument>-generator cd.SQLMain secarc._ast.ASTSecArcIdentity</argument>
<!-- <argument>-check ALL default</argument> -->
<!-- nur für refactoring sind ist der generierte Java Code wieder
im Model Path -->
......@@ -147,9 +147,9 @@
<argument>-analysis ALL init</argument>
<argument>-analysis ALL createExported</argument>
<argument>-synthesis ALL prepareCheck</argument>
<argument>-synthesis arcd preCheckTransformation</argument>
<!-- <argument>-synthesis arcd preCheckTransformation</argument>-->
<argument>-synthesis ALL check</argument>
<argument>-generator cd.SQLMain secarc._ast.ASTSecArcIdentity</argument>
<!-- CoCo aus UML/P -->
<!-- <argument>-check ALL default</argument> -->
......
......@@ -18,9 +18,9 @@ component Usability_Roles {
//access userData (user),
// data2 (bla);
identity weak server -> control;
//identity weak server -> control;
component Control control{
access admin;
//access admin;
}
//component secarc.usability.DataStorage dataStore;
}
......
package sensorcloud.demo;
classdiagram Company {
class Person {
+ String name;
}
class BankAccount {
+ String bankName;
+ String blz;
+ int accountNr;
}
class Address {
+ String name;
+ String street;
+ String city;
}
class Task {
+ String name;
+ int timeSpend;
}
association Person -> Address [*];
association Person -> BankAccount [*];
association [*] Person <-> Task [*];
}
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