Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2Middleware
Commits
f0ddb969
Commit
f0ddb969
authored
Sep 17, 2019
by
Alexander David Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version up; Write preprocessed models to file
parent
5aed51e2
Pipeline
#184318
failed with stages
in 1 minute and 39 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
pom.xml
pom.xml
+3
-3
src/main/java/de/monticore/lang/monticar/generator/middleware/DistributedTargetGenerator.java
...icar/generator/middleware/DistributedTargetGenerator.java
+17
-0
No files found.
pom.xml
View file @
f0ddb969
...
...
@@ -10,7 +10,7 @@
<groupId>
de.monticore.lang.monticar
</groupId>
<artifactId>
embedded-montiarc-math-middleware-generator
</artifactId>
<version>
0.0.2
7
-SNAPSHOT
</version>
<version>
0.0.2
8
-SNAPSHOT
</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
...
...
@@ -20,12 +20,12 @@
<!-- .. SE-Libraries .................................................. -->
<se-commons.version>
1.7.7
</se-commons.version>
<embedded-montiarc.version>
0.1.1
4
-SNAPSHOT
</embedded-montiarc.version>
<embedded-montiarc.version>
0.1.1
6
-SNAPSHOT
</embedded-montiarc.version>
<Embedded-montiarc-math-generator.version>
0.1.14-SNAPSHOT
</Embedded-montiarc-math-generator.version>
<Embedded-montiarc-math-roscpp-generator.version>
0.1.6-SNAPSHOT
</Embedded-montiarc-math-roscpp-generator.version>
<EMADL2CPP.version>
0.3.6-SNAPSHOT
</EMADL2CPP.version>
<EMADL.version>
0.2.10-SNAPSHOT
</EMADL.version>
<embedded-montiarc-component-clustering.version>
0.0.
2
-SNAPSHOT
</embedded-montiarc-component-clustering.version>
<embedded-montiarc-component-clustering.version>
0.0.
3
-SNAPSHOT
</embedded-montiarc-component-clustering.version>
<!-- .. Libraries .................................................. -->
<guava.version>
18.0
</guava.version>
...
...
src/main/java/de/monticore/lang/monticar/generator/middleware/DistributedTargetGenerator.java
View file @
f0ddb969
...
...
@@ -2,6 +2,7 @@
package
de.monticore.lang.monticar.generator.middleware
;
import
de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol
;
import
de.monticore.lang.embeddedmontiarc.helper.SymbolPrinter
;
import
de.monticore.lang.monticar.clustering.AutomaticClusteringHelper
;
import
de.monticore.lang.monticar.clustering.ClusteringResult
;
import
de.monticore.lang.monticar.clustering.ClusteringResultList
;
...
...
@@ -16,6 +17,7 @@ import de.monticore.lang.monticar.generator.middleware.impls.*;
import
de.monticore.lang.monticar.generator.middleware.templates.compile.CompilationGenerator
;
import
de.monticore.lang.tagging._symboltable.TaggingResolver
;
import
de.se_rwth.commons.logging.Log
;
import
org.apache.commons.io.FileUtils
;
import
java.io.File
;
import
java.io.IOException
;
...
...
@@ -105,6 +107,10 @@ public class DistributedTargetGenerator{
middlewareTagGen
.
setGenerationTargetPath
(
generationTargetPath
+
"emam/"
);
middlewareTagGen
.
setClusteringResults
(
clusteringResults
);
files
.
addAll
(
middlewareTagGen
.
generate
(
componentInstanceSymbol
,
taggingResolver
));
File
file
=
saveModel
(
componentInstanceSymbol
);
files
.
add
(
file
);
}
files
.
addAll
(
completeGenerator
.
generate
(
componentInstanceSymbol
,
taggingResolver
));
...
...
@@ -112,6 +118,17 @@ public class DistributedTargetGenerator{
return
files
;
}
private
File
saveModel
(
EMAComponentInstanceSymbol
componentInstance
)
throws
IOException
{
String
name
=
componentInstance
.
getName
().
substring
(
0
,
1
).
toUpperCase
()
+
componentInstance
.
getName
().
substring
(
1
);
String
pathname
=
generationTargetPath
+
"/emam/model/"
+
name
+
".emam"
;
Log
.
info
(
"Writing component into file: "
+
pathname
,
"files"
);
String
modelData
=
SymbolPrinter
.
printEMAComponentInstanceAsEMAComponent
(
componentInstance
);
File
file
=
new
File
(
pathname
);
file
.
getParentFile
().
mkdirs
();
FileUtils
.
write
(
file
,
modelData
,
"UTF-8"
);
return
file
;
}
private
EMAComponentInstanceSymbol
preprocessing
(
EMAComponentInstanceSymbol
genComp
)
{
EMAComponentInstanceSymbol
componentInstanceSymbol
=
genComp
;
if
(
clusteringParameters
!=
null
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment