Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2Cpp
Commits
5c4cdfe9
Commit
5c4cdfe9
authored
Jan 20, 2021
by
Malte Heithoff
Browse files
PartialName Calculation
parent
8822ec5b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/generator/cpp/converter/ComponentConverterMethodGeneration.java
View file @
5c4cdfe9
...
@@ -305,8 +305,8 @@ public class ComponentConverterMethodGeneration {
...
@@ -305,8 +305,8 @@ public class ComponentConverterMethodGeneration {
EMAPortInstanceSymbol
constPort
=
connector
.
getSourcePort
();
EMAPortInstanceSymbol
constPort
=
connector
.
getSourcePort
();
Variable
v1
=
new
Variable
();
Variable
v1
=
new
Variable
();
v1
.
setName
(
constPort
.
getConstantValue
().
get
().
getValueAsString
());
v1
.
setName
(
constPort
.
getConstantValue
().
get
().
getValueAsString
());
String
targetName
=
NameHelper
.
calculatePartialName
(
connector
.
getTarget
(),
String
targetName
=
NameHelper
.
calculatePartialName
(
connector
.
getTarget
Port
(),
currentComponentSymbol
.
getFullName
()
);
currentComponentSymbol
);
Variable
v2
=
PortConverter
.
getVariableForPortSymbol
(
connector
,
targetName
,
bluePrint
);
Variable
v2
=
PortConverter
.
getVariableForPortSymbol
(
connector
,
targetName
,
bluePrint
);
...
@@ -316,8 +316,8 @@ public class ComponentConverterMethodGeneration {
...
@@ -316,8 +316,8 @@ public class ComponentConverterMethodGeneration {
EMAPortInstanceSymbol
constPort
=
connector
.
getTargetPort
();
EMAPortInstanceSymbol
constPort
=
connector
.
getTargetPort
();
Variable
v2
=
new
Variable
();
Variable
v2
=
new
Variable
();
v2
.
setName
(
constPort
.
getConstantValue
().
get
().
getValueAsString
());
v2
.
setName
(
constPort
.
getConstantValue
().
get
().
getValueAsString
());
String
sourceName
=
NameHelper
.
calculatePartialName
(
connector
.
getSource
(),
String
sourceName
=
NameHelper
.
calculatePartialName
(
connector
.
getSource
Port
(),
currentComponentSymbol
.
getFullName
()
);
currentComponentSymbol
);
Variable
v1
=
PortConverter
.
getVariableForPortSymbol
(
connector
,
sourceName
,
bluePrint
);
Variable
v1
=
PortConverter
.
getVariableForPortSymbol
(
connector
,
sourceName
,
bluePrint
);
...
@@ -335,10 +335,10 @@ public class ComponentConverterMethodGeneration {
...
@@ -335,10 +335,10 @@ public class ComponentConverterMethodGeneration {
List
<
Instruction
>
newInstructions
=
new
LinkedList
<>();
List
<
Instruction
>
newInstructions
=
new
LinkedList
<>();
for
(
EMAPortInstanceSymbol
target
:
ConnectionHelper
.
targetsOf
(
source
))
{
for
(
EMAPortInstanceSymbol
target
:
ConnectionHelper
.
targetsOf
(
source
))
{
if
(
target
.
equals
(
source
))
continue
;
if
(
target
.
equals
(
source
))
continue
;
String
sourceName
=
NameHelper
.
calculatePartialName
(
source
.
getFullName
()
,
String
sourceName
=
NameHelper
.
calculatePartialName
(
source
,
currentComponentSymbol
.
getFullName
()
);
currentComponentSymbol
);
String
targetName
=
NameHelper
.
calculatePartialName
(
target
.
getFullName
()
,
String
targetName
=
NameHelper
.
calculatePartialName
(
target
,
currentComponentSymbol
.
getFullName
()
);
currentComponentSymbol
);
Variable
v1
=
PortConverter
.
convertPortSymbolToVariable
(
source
,
sourceName
,
bluePrint
);
Variable
v1
=
PortConverter
.
convertPortSymbolToVariable
(
source
,
sourceName
,
bluePrint
);
Variable
v2
=
PortConverter
.
convertPortSymbolToVariable
(
target
,
targetName
,
bluePrint
);
Variable
v2
=
PortConverter
.
convertPortSymbolToVariable
(
target
,
targetName
,
bluePrint
);
if
(!
currentComponentSymbol
.
getIncomingPortInstances
().
contains
(
source
))
if
(!
currentComponentSymbol
.
getIncomingPortInstances
().
contains
(
source
))
...
...
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