Package org.eclipse.sapphire.modeling.el

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


    @Test

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


    @Test

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

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

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

    @Test

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

    @Test

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

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

                    function = Literal.FALSE;
                }
            }
        }

        final ModelElementFunctionContext context = new ModelElementFunctionContext( context( Element.class ) );
       
        this.functionResult = function.evaluate( context );
       
        final Listener listener = new Listener()
        {
View Full Code Here

            Sapphire.service( LoggingService.class ).log( e );
            ignoreCaseDifferencesFunction = Literal.FALSE;
        }
       
        final Element element = context( Element.class );
        final FunctionContext context = ( element == null ? new FunctionContext() : new ModelElementFunctionContext( element ) );
       
        this.ignoreCaseDifferencesFunctionResult = ignoreCaseDifferencesFunction.evaluate( context );
       
        this.ignoreCaseDifferencesFunctionResult.attach
        (
View Full Code Here

    private final List<FunctionResult> functionResults = new ArrayList<FunctionResult>();
   
    @Override
    protected void initEnablementService()
    {
        final ModelElementFunctionContext fnContext = new ModelElementFunctionContext( context( Element.class ) );
       
        final Listener functionResultListener = new Listener()
        {
            @Override
            public void handle( final Event event )
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.