public static void addNeededVariables(final Set<String> neededVars, @Nullable final String formulaString) {
        if (formulaString == null) {
            return;
        }
        final Formula compiledFormula = Formula.safeCompile(formulaString);
        if (compiledFormula == null) {
            return;
        }
        neededVars.addAll(compiledFormula.getNeededVariables());
    }
Shows a function selection dialog, and upon user selection pastes the function into the formula field given by 'formulaView'
main/src/main/java/cgeo/geocaching/utils/formulas/FormulaUtils.java