Search in sources :

Example 1 with SystemImplementationImpl

use of org.osate.aadl2.impl.SystemImplementationImpl in project VERDICT by ge-high-assurance.

the class WzrdDashboard method checkIfSystem.

// check if component corr. to selected button is "top-level" (i.e. invoking .aadl contains a corresponding .impl element)
private boolean checkIfSystem(SystemTypeImpl sys) {
    boolean sysLevel = false;
    String systemName;
    TreeIterator<EObject> tree = sys.eResource().getAllContents();
    while (tree.hasNext()) {
        EObject tmp = tree.next();
        if (tmp instanceof SystemImplementationImpl) {
            systemName = ((SystemImplementationImpl) tmp).getTypeName();
            if (sys.getName().equals(systemName)) {
                sysLevel = true;
                break;
            }
        }
    }
    return sysLevel;
}
Also used : SystemImplementationImpl(org.osate.aadl2.impl.SystemImplementationImpl) EObject(org.eclipse.emf.ecore.EObject)

Example 2 with SystemImplementationImpl

use of org.osate.aadl2.impl.SystemImplementationImpl in project VERDICT by ge-high-assurance.

the class StatementEditor method checkIfSystem.

// check if a component is "top-level" system
private boolean checkIfSystem(SystemTypeImpl sys) {
    boolean sysLevel = false;
    String systemName;
    TreeIterator<EObject> tree = sys.eResource().getAllContents();
    while (tree.hasNext()) {
        EObject tmp = tree.next();
        if (tmp instanceof SystemImplementationImpl) {
            systemName = ((SystemImplementationImpl) tmp).getTypeName();
            if (sys.getName().equals(systemName)) {
                sysLevel = true;
                break;
            }
        }
    }
    return sysLevel;
}
Also used : SystemImplementationImpl(org.osate.aadl2.impl.SystemImplementationImpl) EObject(org.eclipse.emf.ecore.EObject)

Aggregations

EObject (org.eclipse.emf.ecore.EObject)2 SystemImplementationImpl (org.osate.aadl2.impl.SystemImplementationImpl)2