Package org.eclipse.sapphire.modeling.el

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


            this.messageFunction = messageFunction;
           
            Function ruleFunction = ExpressionLanguageParser.parse( rule );
            ruleFunction = FailSafeFunction.create( ruleFunction, Boolean.class, false );
           
            this.ruleFunctionResult = ruleFunction.evaluate( new ModelElementFunctionContext( element ) );
        }
View Full Code Here


       
        public Status validation()
        {
            if( ( (Boolean) this.ruleFunctionResult.value() ) == false )
            {
                final FunctionResult messageFunctionResult = this.messageFunction.evaluate( new ModelElementFunctionContext( this.element ) );
               
                try
                {
                    return Status.createStatus( this.severity, (String) messageFunctionResult.value() );
                }
View Full Code Here

               
                if( function != null )
                {
                    function = FailSafeFunction.create( function, Literal.create( String.class ) );
                   
                    final ModelElementFunctionContext context = new ModelElementFunctionContext( context( Element.class ) );
                   
                    this.functionResult = function.evaluate( context );
                   
                    final Listener listener = new Listener()
                    {
View Full Code Here

               
                if( function != null )
                {
                    function = FailSafeFunction.create( function, Literal.create( String.class ) );
                   
                    final ModelElementFunctionContext context = new ModelElementFunctionContext( context( Element.class ) );
                   
                    this.functionResult = function.evaluate( context );
                   
                    final Listener listener = new Listener()
                    {
View Full Code Here

        }
        else
        {
            function = FailSafeFunction.create( function, Literal.create( VersionConstraint.class ), null );
           
            this.functionResult = function.evaluate( new ModelElementFunctionContext( element ) );
           
            this.functionResult.attach
            (
                new Listener()
                {
View Full Code Here

        }
        else
        {
            versionFunction = FailSafeFunction.create( versionFunction, Literal.create( Version.class ), null );
           
            this.versionFunctionResult = versionFunction.evaluate( new ModelElementFunctionContext( element ) );
           
            this.versionFunctionResult.attach
            (
                new Listener()
                {
                    @Override
                    public void handle( final Event event )
                    {
                        refresh();
                    }
                }
            );
        }

        Function versionedFunction = null;
       
        try
        {
            versionedFunction = ExpressionLanguageParser.parse( versionCompatibilityTargetAnnotation.versioned() );
        }
        catch( Exception e )
        {
            Sapphire.service( LoggingService.class ).log( e );
        }
       
        if( versionedFunction == null )
        {
            versionedFunction = Literal.NULL;
            this.versionedFunctionResult = versionedFunction.evaluate( new FunctionContext() );
        }
        else
        {
            versionedFunction = FailSafeFunction.create( versionedFunction, Literal.create( String.class ), null );
           
            this.versionedFunctionResult = versionedFunction.evaluate( new ModelElementFunctionContext( element ) );
           
            this.versionedFunctionResult.attach
            (
                new Listener()
                {
View Full Code Here

               
                if( function != null )
                {
                    function = FailSafeFunction.create( function, Literal.create( String.class ) );
                   
                    final ModelElementFunctionContext context = new ModelElementFunctionContext( context( Element.class ) );
                   
                    this.functionResult = function.evaluate( context );
                   
                    final Listener listener = new Listener()
                    {
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.el.ModelElementFunctionContext

Copyright © 2018 www.massapicom. 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.