MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / apply_code

Method apply_code

editor/script/text_editor.cpp:253–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253void TextEditor::apply_code() {
254 Ref<TextFile> text_file = edited_res;
255 if (text_file.is_valid()) {
256 text_file->set_text(code_editor->get_text_editor()->get_text());
257 }
258
259 Ref<JSON> json_file = edited_res;
260 if (json_file.is_valid()) {
261 json_file->parse(code_editor->get_text_editor()->get_text(), true);
262 }
263 code_editor->get_text_editor()->get_syntax_highlighter()->update_cache();
264}
265
266bool TextEditor::is_unsaved() {
267 const bool unsaved =

Callers 6

_go_to_tabMethod · 0.45
_resave_scriptsMethod · 0.45
_menu_optionMethod · 0.45
save_current_scriptMethod · 0.45
save_all_scriptsMethod · 0.45
apply_scriptsMethod · 0.45

Calls 7

get_text_editorMethod · 0.80
is_validMethod · 0.45
set_textMethod · 0.45
get_textMethod · 0.45
parseMethod · 0.45
update_cacheMethod · 0.45

Tested by

no test coverage detected