Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
af3
AF3
Commits
f7cc0239
Commit
f7cc0239
authored
Dec 04, 2019
by
Alexander Diewald
Browse files
Merge branch '3888' into 'master'
Platform-Exp.-Converter: Fix containment resolution. See merge request af3/af3!264
parents
c27babfb
c9dd953c
Changes
4
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.exploration.ui/src/org/fortiss/af3/exploration/ui/perspective/synthesis/.ratings
View file @
f7cc0239
DeploymentSynthesisViewBackend.java df1b02a7a1bda52effda366ad1b47e06c6dc58d7 GREEN
PlatformSynthesisViewBackend.java
ea74030685642c70ae73e97bb10c4c9932e00c94
GREEN
PlatformSynthesisViewBackend.java
40058024c841b27d75c41fa8080493664395b352
GREEN
ScheduleSynthesisViewBackend.java 597320941b651a4c53e313e00ae3b345f111726e GREEN
org.fortiss.af3.exploration.ui/src/org/fortiss/af3/exploration/ui/perspective/synthesis/PlatformSynthesisViewBackend.java
View file @
f7cc0239
...
...
@@ -29,7 +29,8 @@ import static org.fortiss.tooling.kernel.ui.util.MessageUtilsExtended.showErrorI
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
EcoreUtils
.
getFirstParentWithType
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
KernelModelElementUtils
.
runAsCommand
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
LoggingUtils
.
showInfo
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
UniqueIDUtils
.
fixMissingIDs
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
UniqueIDUtils
.
getLargestID
;
import
static
org
.
fortiss
.
tooling
.
kernel
.
utils
.
UniqueIDUtils
.
prepareIDs
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
...
...
@@ -168,7 +169,6 @@ public class PlatformSynthesisViewBackend extends PlatformSynthesisViewGUI {
try
{
dbs
.
explore
(
new
DSEResultAdapter
(),
getTotalTimeout
());
runAsCommand
(
dse
,
()
->
fixMissingIDs
(
pm
.
getCurrentlySelectedDSE
(),
dse
));
}
catch
(
Exception
ex
)
{
showErrorInUIThread
(
"Error executing the DSE."
,
ex
.
getMessage
());
}
...
...
@@ -220,6 +220,12 @@ public class PlatformSynthesisViewBackend extends PlatformSynthesisViewGUI {
"solution was found (or infeasibility was detected)."
);
return
;
}
else
{
DSE
dse
=
IDSEPerspectiveManager
.
INSTANCE
.
getCurrentlySelectedDSE
();
prepareIDs
(
solution
,
dse
,
getLargestID
(
dse
));
// Unchecked cast: It is not possible to get here without an ExplorationStep being the
// current one upfront.
ExplorationStep
expStep
=
(
ExplorationStep
)
dse
.
getCurrentStep
();
getRunner
().
run
(()
->
expStep
.
setSolution
(
solution
));
prepareResultVisualization
(
solution
);
}
}
...
...
org.fortiss.af3.exploration/src/org/fortiss/af3/exploration/solutionconverter/platform/.ratings
View file @
f7cc0239
PlatformConnectorInstanceConverter.java 073e050ad673f41e9d012de01c1aee6fdd04e4ce GREEN
PlatformExecUnitInstantiationConverter.java
6a003e2fbc3fc115ad39578c87ddd64f23da9593
GREEN
PlatformExecUnitInstantiationConverter.java
cd360ac1bb1d719da3761455f95549bcb0411a3f
GREEN
PlatformTransmissionConnectionConverter.java 365a2fb563e4ed36a1b159dfa3bcce47216a935c GREEN
org.fortiss.af3.exploration/src/org/fortiss/af3/exploration/solutionconverter/platform/PlatformExecUnitInstantiationConverter.java
View file @
f7cc0239
...
...
@@ -24,6 +24,7 @@ import java.util.HashSet;
import
java.util.Set
;
import
org.fortiss.af3.exploration.dseml.model.expression.SuperSet
;
import
org.fortiss.af3.exploration.model.specification.ContainedByElement
;
import
org.fortiss.af3.exploration.model.specification.InstanceOfElement
;
import
org.fortiss.af3.exploration.solutionconverter.DSESolutionArtifacts
;
import
org.fortiss.af3.exploration.solutionconverter.DSESolutionConverterBase
;
...
...
@@ -77,7 +78,9 @@ public class PlatformExecUnitInstantiationConverter
templateExecUnits
.
add
(
templateExecUnit
);
// Add the instance (copy).
IHierarchicElementContainer
currentParent
=
templateExecUnit
.
getContainer
();
ContainedByElement
containmentSpec
=
getAndRemoveSpec
(
instExecUnit
,
ContainedByElement
.
class
);
IHierarchicElementContainer
currentParent
=
containmentSpec
.
getFutureContainerRef
();
currentParent
.
getContainedElements
().
add
(
instExecUnit
);
}
...
...
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