#include "script_text_editor.h" #include "tools/editor/editor_settings.h" #include "os/keyboard.h"" #include "tools/editor/script_editor_debugger.h" Vector ScriptTextEditor::get_functions() { String errortxt; int line=-1,col; TextEdit *te=code_editor->get_text_edit(); String text = te->get_text(); List fnc; if (script->get_language()->validate(text,line,col,errortxt,script->get_path(),&fnc)) { //if valid rewrite functions to latest functions.clear(); for (List::Element *E=fnc.front();E;E=E->next()) { functions.push_back(E->get()); } } return functions; } void ScriptTextEditor::apply_code() { if (script.is_null()) return; // print_line("applying code"); script->set_source_code(code_editor->get_text_edit()->get_text()); script->update_exports(); } Ref