Examples of ModelElementFunctionContext


Examples of org.eclipse.sapphire.modeling.el.ModelElementFunctionContext

    @Test
   
    public void testMatchesFunction()
    {
        final TestElement element = TestElement.TYPE.instantiate();
        final FunctionContext context = new ModelElementFunctionContext( element );
       
        final FunctionResult fr = ExpressionLanguageParser.parse( "${ Value.EncodeToXml }" ).evaluate( context );
       
        try
        {
View Full Code Here

Examples of org.eclipse.sapphire.modeling.el.ModelElementFunctionContext

    @Test
   
    public void InequalityOperator_ElementProperty_Null()
    {
        final TestElement element = TestElement.TYPE.instantiate();
        final FunctionContext context = new ModelElementFunctionContext( element );
       
        final FunctionResult fr = ExpressionLanguageParser.parse( "${ ChildElement != null }" ).evaluate( context );
       
        try
        {
View Full Code Here

Examples of org.eclipse.sapphire.modeling.el.ModelElementFunctionContext

    {
        final Element element = Element.TYPE.instantiate();
       
        try
        {
            final FunctionContext context = new ModelElementFunctionContext( element );
            final FunctionResult fr = ExpressionLanguageParser.parse( "${ This }" ).evaluate( context );
           
            try
            {
                assertSame( element, fr.value() );
View Full Code Here

Examples of org.eclipse.sapphire.modeling.el.ModelElementFunctionContext

       
        if( function != null )
        {
            function = FailSafeFunction.create( function, Literal.create( List.class ), Literal.create( Collections.emptyList() ) );
           
            this.functionResult = function.evaluate( new ModelElementFunctionContext( context( Element.class ) ) );
           
            this.functionResult.attach
            (
                new Listener()
                {
View Full Code Here

Examples of org.eclipse.sapphire.modeling.el.ModelElementFunctionContext

    @Test
   
    public void testMessageFunction()
    {
        final TestElement element = TestElement.TYPE.instantiate();
        final FunctionContext context = new ModelElementFunctionContext( element );
       
        final FunctionResult fr = ExpressionLanguageParser.parse( "${ IntegerValue.Validation.Message }" ).evaluate( context );
       
        try
        {
View Full Code Here

Examples of org.eclipse.sapphire.modeling.el.ModelElementFunctionContext

    @Test

    public void testMessageFunctionNull()
    {
        final TestElement element = TestElement.TYPE.instantiate();
        final FunctionContext context = new ModelElementFunctionContext( element );
       
        final FunctionResult fr = ExpressionLanguageParser.parse( "${ Message( null ) }" ).evaluate( context );
       
        try
        {
View Full Code Here

Examples of org.eclipse.sapphire.modeling.el.ModelElementFunctionContext

    @Test

    public void testMessageFunctionWrongType()
    {
        final TestElement element = TestElement.TYPE.instantiate();
        final FunctionContext context = new ModelElementFunctionContext( element );
       
        final FunctionResult fr = ExpressionLanguageParser.parse( "${ Message( 'abc' ) }" ).evaluate( context );
       
        try
        {
View Full Code Here

Examples of org.eclipse.sapphire.modeling.el.ModelElementFunctionContext

    @Test
   
    public void testUpperCaseFunction()
    {
        final TestElement element = TestElement.TYPE.instantiate();
        final FunctionContext context = new ModelElementFunctionContext( element );
       
        testForExpectedValue( context, "${ UpperCase( 'abc' ) }", "ABC" );
        testForExpectedValue( context, "${ 'abc'.UpperCase() }", "ABC" );
       
        element.setValue( "Test" );
View Full Code Here

Examples of org.eclipse.sapphire.modeling.el.ModelElementFunctionContext

    @Test

    public void testLowerCaseFunction()
    {
        final TestElement element = TestElement.TYPE.instantiate();
        final FunctionContext context = new ModelElementFunctionContext( element );
       
        testForExpectedValue( context, "${ LowerCase( 'ABC' ) }", "abc" );
        testForExpectedValue( context, "${ 'ABC'.LowerCase() }", "abc" );
       
        element.setValue( "Test" );
View Full Code Here

Examples of org.eclipse.sapphire.modeling.el.ModelElementFunctionContext

       
        if( f != null )
        {
           
            f = FailSafeFunction.create( f, Literal.create( String.class ) );
            fr = f.evaluate( new ModelElementFunctionContext( nodePart.getLocalModelElement(), ls ));
        }
        return fr;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.