Commit 23825da7 authored by Hernan Ponce de Leon's avatar Hernan Ponce de Leon
Browse files

[YELLOW] code reviewed

parent 96e186b8
BehaviorModelElementFactory.java 7e4e9de4fcac3790eb0664963dd2b403db1659d0 GREEN
ComponentArchitectureTransformationBase.java 8feabb8dc141d4e2c4d2f56526bffac06c6734ce GREEN
ComponentArchitectureUtils.java e12b02f1c5b844c97f2a7a5e783b07474865a5fa GREEN
ComponentArchitectureUtils.java a593a80e91148ba1324e5c84de0feeec60004a90 YELLOW
ComponentLibraryModelElementFactory.java 186b2e27e184cac8149ac28a28343ecd76ddf157 GREEN
ComponentLibraryUtils.java 69bb291f7c5c9fb037fcc6b938793df2b1281b26 GREEN
ComponentModelElementFactory.java 2f3e136e37f56f3675121fa9c3515cc083f10d12 GREEN
......@@ -8,5 +8,5 @@ ComponentProgramUtils.java ece02e69081cfdf558af7511927cd80294d2c018 GREEN
ComponentUtils.java 2cb3855a360ef58c2a49d7485d40841bc3070aa9 GREEN
FormalAnalysisTransformationUtils.java 72ea815b08d1a4ff8a0fa086902300bb3796de86 GREEN
GeneratorModelElementFactory.java e493ab2408fd1cd154960eca5cd09c1647321a7c GREEN
IComponentArchitectureTransformation.java 188583e21d0b28416c50bbae7a1b699ea570bec8 GREEN
SimulationUtils.java 79e0c0c32a060696fd1b092b514e9881e0ab7966 GREEN
IComponentArchitectureTransformation.java d4dbb9895aa4dcb23486013c0ea1db7e8411b02e GREEN
SimulationUtils.java 009faa681a95baf35e3d9552ef5300effaeb9fb5 GREEN
......@@ -16,6 +16,7 @@
package org.fortiss.af3.component.utils;
import static org.fortiss.af3.project.utils.ProjectUtils.getFileProject;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.getChildrenWithType;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickFirstInstanceOf;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.findContentElementByNameAndClass;
......@@ -42,7 +43,6 @@ import org.fortiss.af3.project.model.typesystem.IVariableDefinition;
import org.fortiss.tooling.base.model.element.IModelElementSpecification;
import org.fortiss.tooling.kernel.model.INamedElement;
import org.fortiss.tooling.kernel.service.ICommandStackService;
import org.fortiss.tooling.kernel.utils.EcoreUtils;
import org.fortiss.tooling.kernel.utils.KernelModelElementUtils;
/**
......@@ -237,10 +237,11 @@ public class ComponentArchitectureUtils {
*/
public static Component getEnclosingComponent(EObject element) {
EObject iterator = element;
while(iterator.eContainer() != null && !(iterator.eContainer() instanceof Component)) {
iterator = iterator.eContainer();
EObject container = iterator.eContainer();
while(container != null && !(container instanceof Component)) {
iterator = container;
}
return (Component)iterator.eContainer();
return (Component)container;
}
/**
......@@ -339,7 +340,7 @@ public class ComponentArchitectureUtils {
* @return the list with all sub-components
*/
public static EList<Component> getAllSubComponentRecursively(Component parent) {
return EcoreUtils.getChildrenWithType(parent, Component.class);
return getChildrenWithType(parent, Component.class);
}
/** Check if the component has the FMUBehaviorSpecification */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment