Examples of FunctionContext


Examples of com.dubture.twig.core.codeassist.context.FunctionContext

    public void apply(ICompletionReporter reporter) throws Exception
    {

        try {

            FunctionContext ctx = (FunctionContext) getContext();
            TwigModelAccess model = TwigModelAccess.getDefault();

            String prefix = ctx.getPrefix();
            SourceRange range = getReplacementRange(getContext());

            Function[] functions = model.getFunctions(ctx.getSourceModule()
                    .getScriptProject());

            for (Function function : functions) {
                if (CodeAssistUtils.startsWithIgnoreCase(
                        function.getElementName(), prefix)) {

                    function.setScriptProject(ctx.getSourceModule()
                            .getScriptProject());

                    reporter.reportType(function, "()", range);
                }
            }
View Full Code Here

Examples of com.gemstone.gemfire.cache.execute.FunctionContext

public class FunctionArgumentResolverTest {

  @Test
  public void testDefaultFunctionArgumentResolverWithNoArguments() {
    FunctionArgumentResolver functionArgumentResolver = new DefaultFunctionArgumentResolver();
    FunctionContext mockFunctionContext = mock(FunctionContext.class);

    when(mockFunctionContext.getArguments()).thenReturn(null);

    Object[] args = functionArgumentResolver.resolveFunctionArguments(mockFunctionContext);

    assertNotNull(args);
    assertEquals(0, args.length);
View Full Code Here

Examples of org.apache.tajo.engine.function.FunctionContext

        FunctionContext [] contexts = hashTable.get(keyTuple);
        for(int i = 0; i < aggFunctions.length; i++) {
          aggFunctions[i].merge(contexts[i], inSchema, tuple);
        }
      } else { // if the key occurs firstly
        FunctionContext contexts [] = new FunctionContext[aggFunctionsNum];
        for(int i = 0; i < aggFunctionsNum; i++) {
          contexts[i] = aggFunctions[i].newContext();
          aggFunctions[i].merge(contexts[i], inSchema, tuple);
        }
        hashTable.put(keyTuple, contexts);
View Full Code Here

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

    {
        if( this.visibilityFunctionResult == null )
        {
            if( this.visibilityFunctionInitializing )
            {
                this.visibilityFunctionResult = Literal.FALSE.evaluate( new FunctionContext() );
            }
            else
            {
                this.visibilityFunctionInitializing = true;
               
View Full Code Here

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

{
    @Test
   
    public void testWithArray()
    {
        FunctionContext context;
       
        context = new TestFunctionContext( new Object[] {} );
        testForExpectedValue( context, "${ Max( Collection ) }", null );

        context = new TestFunctionContext( new Object[] { "1" } );
View Full Code Here

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

{
    @Test
   
    public void testEmpty()
    {
        testForExpectedValue( new FunctionContext(), "${ List() }", list() );
    }
View Full Code Here

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

   
    @Test
   
    public void testSingleton()
    {
        testForExpectedValue( new FunctionContext(), "${ List( 'x' ) }", list( "x" ) );
    }
View Full Code Here

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

   
    @Test
   
    public void testWithList()
    {
        FunctionContext context;
       
        context = new TestFunctionContext( list() );
        testForExpectedValue( context, "${ Max( Collection ) }", null );

        context = new TestFunctionContext( list( "1" ) );
View Full Code Here

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

   
    @Test
   
    public void testWithSet()
    {
        FunctionContext context;
       
        context = new TestFunctionContext( set() );
        testForExpectedValue( context, "${ Max( Collection ) }", null );

        context = new TestFunctionContext( set( "1" ) );
View Full Code Here

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

   
    @Test
   
    public void testMultiple()
    {
        testForExpectedValue( new FunctionContext(), "${ List( 'x', 'y', 'z' ) }", list( "x", "y", "z" ) );
    }
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.