Search in sources :

Example 6 with InputConstraint

use of edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.InputConstraint in project AGREE by loonwerks.

the class InputConstraintHelper method unparse.

public String unparse(final InputConstraint ic) {
    if (ic == null) {
        return "";
    }
    // If the input constraint is not part of a resource, copy the constraint, add it to a temporary resource, and then unparse.
    if (ic.eResource() == null) {
        final InputConstraint copy = EcoreUtil.copy(ic);
        createResource().getContents().add(copy);
        return unparse(copy);
    } else {
        return serializer.serialize(ic);
    }
}
Also used : InputConstraint(edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.InputConstraint)

Aggregations

InputConstraint (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.InputConstraint)6 Display (org.eclipse.swt.widgets.Display)3 InputConstraintStandaloneSetup (edu.uah.rsesc.aadlsimulator.xtext.InputConstraintStandaloneSetup)2 TestReferenceTypeResolver (edu.uah.rsesc.aadlsimulator.xtext.TestReferenceTypeResolver)2 ConstRefExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.ConstRefExpression)2 ElementRefExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.ElementRefExpression)2 InputConstraintHelper (edu.uah.rsesc.aadlsimulator.xtext.util.InputConstraintHelper)2 ResultType (edu.uah.rsesc.aadlsimulator.xtext.util.ResultType)2 Stream (java.util.stream.Stream)2 EObject (org.eclipse.emf.ecore.EObject)2 SimulationEngineState (edu.uah.rsesc.aadlsimulator.SimulationEngineState)1 SimulationProperty (edu.uah.rsesc.aadlsimulator.agree.SimulationProperty)1 AGREEPropertyStatus (edu.uah.rsesc.aadlsimulator.agree.engine.AGREEPropertyStatus)1 BeforeStepForwardEvent (edu.uah.rsesc.aadlsimulator.ui.events.BeforeStepForwardEvent)1 SimulatorState (edu.uah.rsesc.aadlsimulator.ui.services.SimulatorState)1 BinaryExpression (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.BinaryExpression)1 BooleanLiteral (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.BooleanLiteral)1 InputConstraintFactory (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.InputConstraintFactory)1 InputConstraintPackage (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.InputConstraintPackage)1 IntegerLiteral (edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.IntegerLiteral)1