Package org.eclipse.sapphire.modeling.el

Examples of org.eclipse.sapphire.modeling.el.Function.evaluate()


                                                final Runnable refreshOp )
    {
        Function f = ( function == null ? Literal.NULL : function );
        f = FailSafeFunction.create( f, Literal.create( expectedType ), defaultValue );
       
        final FunctionResult fr = f.evaluate( new PartFunctionContext( this, element ) );
       
        if( refreshOp != null )
        {
            fr.attach
            (
View Full Code Here


        {
            this.id = def.getId().content();
           
            final Function labelFunction = FailSafeFunction.create( def.getLabel().content(), Literal.create( String.class ) );
           
            this.labelFunctionResult = labelFunction.evaluate( this.functionContext );
           
            this.labelFunctionResult.attach
            (
                new Listener()
                {
View Full Code Here

                }
            );
           
            final Function toolTipFunction = FailSafeFunction.create( def.getToolTip().content(), Literal.create( String.class ) );

            this.toolTipFunctionResult = toolTipFunction.evaluate( this.functionContext );

            this.toolTipFunctionResult.attach
            (
                new Listener()
                {
View Full Code Here

            this.description = def.getDescription().content();
           
            for( ImageReference image : def.getImages() )
            {
                final Function imageFunction = FailSafeFunction.create( image.getImage().content(), Literal.create( ImageData.class ) );
                final FunctionResult imageFunctionResult = imageFunction.evaluate( this.functionContext );
                final ImageData data = (ImageData) imageFunctionResult.value();
               
                if( data != null )
                {
                    this.images.add( data );
View Full Code Here

                        }
                    };
                   
                    f.init();
                   
                    return f.evaluate( this );
                }
                else if( element instanceof SapphireActionHandler && name.equalsIgnoreCase( "label" ) )
                {
                    return Literal.create( ( (SapphireActionHandler) element ).getLabel() ).evaluate( this );
                }
View Full Code Here

       
        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

       
        if( f != null )
        {
           
            f = FailSafeFunction.create( f, Literal.create( String.class ) );
            fr = f.evaluate( new ModelElementFunctionContext( nodePart.getLocalModelElement(), ls ));
        }
        return fr;
    }
   
    protected void handleConnectionListChange(Element connListParent, ListProperty listProperty)
View Full Code Here

            }
        }

        final ModelElementFunctionContext context = new ModelElementFunctionContext( context( Element.class ) );
       
        this.functionResult = function.evaluate( context );
       
        final Listener listener = new Listener()
        {
            @Override
            public void handle( final Event event )
View Full Code Here

        }
       
        final Element element = context( Element.class );
        final FunctionContext context = ( element == null ? new FunctionContext() : new ModelElementFunctionContext( element ) );
       
        this.ignoreCaseDifferencesFunctionResult = ignoreCaseDifferencesFunction.evaluate( context );
       
        this.ignoreCaseDifferencesFunctionResult.attach
        (
            new Listener()
            {
View Full Code Here

           
            if( function != null )
            {
                function = FailSafeFunction.create( function, Literal.create( Boolean.class ), Literal.create( Boolean.FALSE ) );
               
                final FunctionResult functionResult = function.evaluate( fnContext );
               
                functionResult.attach( functionResultListener );
                this.functionResults.add( functionResult );
            }
        }
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.