Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
EMADL2CPP
Commits
90d7057d
Commit
90d7057d
authored
Jan 22, 2019
by
Christopher Jan-Steffen Brix
Browse files
Write hashing files to file system
parent
c8eaeb92
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/emadl/generator/EMADLGenerator.java
View file @
90d7057d
...
...
@@ -137,6 +137,7 @@ public class EMADLGenerator {
fileContentMap
.
put
(
f
.
getFileName
(),
f
.
getFileContent
());
}
List
<
FileContent
>
fileContentsTrainingHashes
=
new
HashSet
<>();
for
(
ExpandedComponentInstanceSymbol
componentInstance
:
allInstances
)
{
ComponentSymbol
component
=
componentInstance
.
getComponentType
().
getReferencedSymbol
();
Optional
<
ArchitectureSymbol
>
architecture
=
component
.
getSpannedScope
().
resolve
(
""
,
ArchitectureSymbol
.
KIND
);
...
...
@@ -200,10 +201,15 @@ public class EMADLGenerator {
}
else
{
System
.
out
.
println
(
"Trainingfile not found."
);}
}
fileContents
.
add
(
new
FileContent
(
trainingHash
,
componentConfigFilename
+
".training_hash"
));
fileContentsTrainingHashes
.
add
(
new
FileContent
(
trainingHash
,
componentConfigFilename
+
".training_hash"
));
}
for
(
FileContent
fileContent
:
fileContentsTrainingHashes
)
{
emamGen
.
generateFile
(
fileContent
);
}
}
private
static
String
convertByteArrayToHexString
(
byte
[]
arrayBytes
)
{
StringBuffer
stringBuffer
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
arrayBytes
.
length
;
i
++)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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