| 132 | //////////////////////////////////////////////////////////////////////////////// |
| 133 | |
| 134 | Vector<String> ScriptTextEditor::get_functions() { |
| 135 | CodeEdit *te = code_editor->get_text_editor(); |
| 136 | String text = te->get_text(); |
| 137 | List<String> fnc; |
| 138 | |
| 139 | if (script->get_language()->validate(text, script->get_path(), &fnc)) { |
| 140 | //if valid rewrite functions to latest |
| 141 | functions.clear(); |
| 142 | for (const String &E : fnc) { |
| 143 | functions.push_back(E); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | return functions; |
| 148 | } |
| 149 | |
| 150 | void ScriptTextEditor::apply_code() { |
| 151 | if (script.is_null()) { |
nothing calls this directly
no test coverage detected