Commit 536c4052 authored by Mingjun Li's avatar Mingjun Li
Browse files

Junittest for vhdl generator

refs 662
parent f99294be
......@@ -30,15 +30,14 @@ import org.fortiss.tooling.kernel.utils.EcoreUtils;
* @author ratiu
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating GREEN Hash: 8CED98E961C9088EB6839D250ECC8BC8
* @ConQAT.Rating GREEN Hash: 87BB75EE4561F2ECD97E0E1FD9D2AF0A
*/
public class BehaviorUtils {
/**
* Returns the {@link CodeSpecification} specification of a
* {@link Component} or null if no such specification is available. We
* assume that a component has AT MOST ONE {@link CodeSpecification}
* specification.
* Returns the {@link CodeSpecification} specification of a {@link Component} or null if no such
* specification is available. We
* assume that a component has AT MOST ONE {@link CodeSpecification} specification.
*
* @param component
* the component of which the code-specification should be
......@@ -60,13 +59,15 @@ public class BehaviorUtils {
* @return the corresponding data state variable or null, if it does not
* exist;
*/
public static DataStateVariable findVariableByNameFromList(
List<DataStateVariable> dsvList, String dsvName) {
for (DataStateVariable dsv : dsvList) {
if (dsv.getVariable().getIdentifier().equals(dsvName)) {
public static DataStateVariable findVariableByNameFromList(List<DataStateVariable> dsvList,
String dsvName) {
if(dsvList != null) {
for(DataStateVariable dsv : dsvList) {
if(dsv.getVariable().getIdentifier().equals(dsvName)) {
return dsv;
}
}
}
return null;
}
......
Supports Markdown
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