Skip to content
Snippets Groups Projects
Commit 879ff254 authored by Nikolaus Huber's avatar Nikolaus Huber
Browse files

renaming

git-svn-id: https://se1.informatik.uni-wuerzburg.de/usvn/svn/code/code/DMM/trunk@10504 9e42b895-fcda-4063-8a3b-11be15eb1bbd
parent 486ad829
No related branches found
No related tags found
No related merge requests found
...@@ -229,7 +229,7 @@ public class DmmModelActionHandler implements IActionHandler { ...@@ -229,7 +229,7 @@ public class DmmModelActionHandler implements IActionHandler {
RuntimeEnvironment re = null; RuntimeEnvironment re = null;
switch (adaptableEntity.eClass().getClassifierID()) { switch (adaptableEntity.eClass().getClassifierID()) {
case ResourcelandscapePackage.RUNTIME_ENVIRONMENT: case ResourcelandscapePackage.RUNTIME_ENVIRONMENT:
re = DmmModelChanger.scaleOutRuntimeEnvironmentInstance((RuntimeEnvironment) adaptableEntity); re = DmmModelChanger.createNewRuntimeEnvironmentInstance((RuntimeEnvironment) adaptableEntity);
break; break;
case ContainerrepositoryPackage.CONTAINER_TEMPLATE: case ContainerrepositoryPackage.CONTAINER_TEMPLATE:
re = scaleOutContainerTemplate((ContainerTemplate) adaptableEntity); re = scaleOutContainerTemplate((ContainerTemplate) adaptableEntity);
...@@ -256,8 +256,7 @@ public class DmmModelActionHandler implements IActionHandler { ...@@ -256,8 +256,7 @@ public class DmmModelActionHandler implements IActionHandler {
return removedRe; return removedRe;
} }
/** Implements similar behavior as scaleOutRuntimeEnvironment() /** Creates a new RuntimeEnvironment. If you want to scale an attribute of the ContainerTemplate,
* because if you want to scale an attribute of the ContainerTemplate,
* ModelVariableConfigurationRange must be used. However, here we are * ModelVariableConfigurationRange must be used. However, here we are
* scaling a ModelEntityConfigurationRange. * scaling a ModelEntityConfigurationRange.
*/ */
...@@ -266,7 +265,7 @@ public class DmmModelActionHandler implements IActionHandler { ...@@ -266,7 +265,7 @@ public class DmmModelActionHandler implements IActionHandler {
Container referringContainer = template.getReferringContainers().get(0); Container referringContainer = template.getReferringContainers().get(0);
if (referringContainer != null && referringContainer instanceof RuntimeEnvironment) { if (referringContainer != null && referringContainer instanceof RuntimeEnvironment) {
return DmmModelChanger.scaleOutRuntimeEnvironmentInstance((RuntimeEnvironment) referringContainer); return DmmModelChanger.createNewRuntimeEnvironmentInstance((RuntimeEnvironment) referringContainer);
} else { } else {
logger.error("Cannot scale " + referringContainer); logger.error("Cannot scale " + referringContainer);
} }
......
...@@ -113,7 +113,7 @@ public class DmmModelChanger { ...@@ -113,7 +113,7 @@ public class DmmModelChanger {
* the {@link RuntimeEnvironment} to copy * the {@link RuntimeEnvironment} to copy
* @return * @return
*/ */
public static RuntimeEnvironment scaleOutRuntimeEnvironmentInstance(RuntimeEnvironment runtimeEnvironment) { public static RuntimeEnvironment createNewRuntimeEnvironmentInstance(RuntimeEnvironment runtimeEnvironment) {
RuntimeEnvironment newRuntimeEnvironment = EcoreUtil.copy(runtimeEnvironment); RuntimeEnvironment newRuntimeEnvironment = EcoreUtil.copy(runtimeEnvironment);
newRuntimeEnvironment.setId(EcoreUtil.generateUUID()); newRuntimeEnvironment.setId(EcoreUtil.generateUUID());
newRuntimeEnvironment.setName(newRuntimeEnvironment.getName() + COPY_MARK); newRuntimeEnvironment.setName(newRuntimeEnvironment.getName() + COPY_MARK);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment