Examples of findFunction()


Examples of org.erlide.engine.model.erlang.IErlModule.findFunction()

            final String moduleName = resolveMacroValue(moduleName0, module);
            final IErlModule module2 = findModule(model, project, moduleName, modulePath,
                    scope);
            if (module2 != null) {
                module2.open(null);
                final IErlFunction function = module2.findFunction(erlangFunction);
                if (function != null) {
                    return function;
                }
                return null;
            }
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule.findFunction()

            IErlModule module;
            try {
                module = ErlangEngine.getInstance().getModel().findModule(moduleName);

                final IErlFunction f = module.findFunction(new ErlangFunction(fs
                        .getLabel(), fs.getArity()));

                editor.setSelection(f);

            } catch (final ErlModelException e) {
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule.findFunction()

        final IErlModule module = findModule(r.module);
        if (module == null) {
            return null;
        }
        module.open(null);
        return module.findFunction(new ErlangFunction(r.function, r.arity));
    }

    @Override
    public IErlModule findModule(final String moduleName, final String modulePath)
            throws ErlModelException {
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule.findFunction()

        final String mName = ((StatsTreeObject) getParent()).getLabel();
        IErlModule m;
        try {
            m = ErlangEngine.getInstance().getModel().findModule(mName);
            final IErlFunction f = m.findFunction(new ErlangFunction(getLabel(),
                    getArity()));

            lineStart = f.getLineStart();
        } catch (final ErlModelException e) {
            ErlLogger.error(e);
View Full Code Here

Examples of org.erlide.engine.model.erlang.IErlModule.findFunction()

                    if (e instanceof IErlFunctionClause) {
                        final IErlFunctionClause clause = (IErlFunctionClause) e;
                        clauseHead = clause.getFunctionName() + clause.getHead();
                    }
                } else if (function != null) {
                    final IErlFunction f = module.findFunction(function);
                    if (f != null) {
                        lineNumber = f.getLineStart() + 1;
                        clauseHead = f.getFunctionName() + f.getHead();
                    }
                }
View Full Code Here

Examples of org.teiid.query.function.FunctionLibrary.findFunction()

        }

        // Create a function of the two constants and evaluate it
        Expression combinedConst = null;
        FunctionLibrary funcLib = this.metadata.getFunctionLibrary();
        FunctionDescriptor descriptor = funcLib.findFunction(oppFunc, new Class[] { rightExpr.getType(), const1.getType() });
        if (descriptor == null){
            //See defect 9380 - this can be caused by const2 being a null Constant, for example (? + 1) < null
            return criteria;
        }
View Full Code Here

Examples of org.teiid.query.function.FunctionLibrary.findFunction()

        if(!(formatExpr instanceof Constant)) {
            return crit;
        }
        String format = (String)((Constant)formatExpr).getValue();
        FunctionLibrary funcLib = this.metadata.getFunctionLibrary();
        FunctionDescriptor descriptor = funcLib.findFunction(inverseFunction, new Class[] { rightExpr.getType(), formatExpr.getType() });
        if(descriptor == null){
            return crit;
        }
      Object value = ((Constant)rightExpr).getValue();
      try {
View Full Code Here

Examples of org.teiid.query.function.FunctionLibrary.findFunction()

      Expression[] args = function.getArgs();
        Class<?>[] types = new Class[args.length];
        for(int i=0; i<args.length; i++) {
            types[i] = args[i].getType();
        }
      FunctionDescriptor descriptor = funcLibrary.findFunction(actualName, types);
      function.setFunctionDescriptor(descriptor);
    }
   
    Integer code = FUNCTION_MAP.get(functionLowerName);
    if (code != null) {
View Full Code Here

Examples of org.teiid.query.function.FunctionLibrary.findFunction()

      case 0: { //space(x) => repeat(' ', x)
        Function result = new Function(SourceSystemFunctions.REPEAT,
            new Expression[] {new Constant(" "), function.getArg(0)}); //$NON-NLS-1$
        //resolve the function
        FunctionDescriptor descriptor =
          funcLibrary.findFunction(SourceSystemFunctions.REPEAT, new Class[] { DataTypeManager.DefaultDataClasses.STRING, DataTypeManager.DefaultDataClasses.INTEGER});
        result.setFunctionDescriptor(descriptor);
        result.setType(DataTypeManager.DefaultDataClasses.STRING);
        function = result;
        break;
      }
View Full Code Here

Examples of org.teiid.query.function.FunctionLibrary.findFunction()

      case 1: {//from_unixtime(a) => timestampadd(SQL_TSI_SECOND, a, new Timestamp(0))
        Function result = new Function(FunctionLibrary.TIMESTAMPADD,
            new Expression[] {new Constant(NonReserved.SQL_TSI_SECOND), function.getArg(0), new Constant(new Timestamp(0)) });
        //resolve the function
        FunctionDescriptor descriptor =
          funcLibrary.findFunction(FunctionLibrary.TIMESTAMPADD, new Class[] { DataTypeManager.DefaultDataClasses.STRING, DataTypeManager.DefaultDataClasses.INTEGER, DataTypeManager.DefaultDataClasses.TIMESTAMP });
        result.setFunctionDescriptor(descriptor);
        result.setType(DataTypeManager.DefaultDataClasses.TIMESTAMP);
        function = result;
        break;
      }
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.