Search in sources :

Example 11 with SystemTypeImpl

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

the class ChangeInFile method getStatements.

// extracts the existing annex-statements in the component "sys" on .aadl script
private List<Statement> getStatements(SystemTypeImpl sys) {
    List<EObject> objs = sys.eContents();
    List<Statement> stmts = new ArrayList<Statement>();
    for (int i = 0; i < objs.size(); i++) {
        if (objs.get(i) instanceof DefaultAnnexSubclauseImpl) {
            if (!((DefaultAnnexSubclauseImpl) objs.get(i)).getName().equals("verdict")) {
                continue;
            }
            Verdict vd = ((VerdictContractSubclause) ((DefaultAnnexSubclauseImpl) objs.get(i)).getParsedAnnexSubclause()).getContract();
            stmts = vd.getElements();
            break;
        }
    }
    return stmts;
}
Also used : DefaultAnnexSubclauseImpl(org.osate.aadl2.impl.DefaultAnnexSubclauseImpl) Statement(com.ge.research.osate.verdict.dsl.verdict.Statement) EObject(org.eclipse.emf.ecore.EObject) ArrayList(java.util.ArrayList) Verdict(com.ge.research.osate.verdict.dsl.verdict.Verdict) VerdictContractSubclause(com.ge.research.osate.verdict.dsl.verdict.VerdictContractSubclause)

Aggregations

EObject (org.eclipse.emf.ecore.EObject)10 DefaultAnnexSubclauseImpl (org.osate.aadl2.impl.DefaultAnnexSubclauseImpl)6 Statement (com.ge.research.osate.verdict.dsl.verdict.Statement)5 Verdict (com.ge.research.osate.verdict.dsl.verdict.Verdict)5 VerdictContractSubclause (com.ge.research.osate.verdict.dsl.verdict.VerdictContractSubclause)5 ArrayList (java.util.ArrayList)5 SystemTypeImpl (org.osate.aadl2.impl.SystemTypeImpl)5 Resource (org.eclipse.emf.ecore.resource.Resource)4 ResourceSetImpl (org.eclipse.emf.ecore.resource.impl.ResourceSetImpl)4 CyberMissionImpl (com.ge.research.osate.verdict.dsl.verdict.impl.CyberMissionImpl)2 IEditorPart (org.eclipse.ui.IEditorPart)2 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)2 SystemImplementationImpl (org.osate.aadl2.impl.SystemImplementationImpl)2 CyberRelImpl (com.ge.research.osate.verdict.dsl.verdict.impl.CyberRelImpl)1 CyberReqImpl (com.ge.research.osate.verdict.dsl.verdict.impl.CyberReqImpl)1 StatementEditor (com.ge.research.osate.verdict.gui.StatementEditor)1 WzrdDashboard (com.ge.research.osate.verdict.gui.WzrdDashboard)1 IOException (java.io.IOException)1 List (java.util.List)1 ExecutionException (org.eclipse.core.commands.ExecutionException)1