Package com.dubture.twig.core.codeassist.context

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


        contexts.add(new KeywordContext());
        contexts.add(new FilterContext());
        contexts.add(new VariableFieldContext());
        contexts.add(new TemplateVariablesContext());
        contexts.add(new QuotesContext());
        contexts.add(new FunctionContext());
        contexts.add(new TagContext());
        contexts.add(new TestContext());
        contexts.add(new BlocknameContext());

        IConfigurationElement[] config = Platform.getExtensionRegistry()
View Full Code Here

TOP

Related Classes of com.dubture.twig.core.codeassist.context.FunctionContext

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.