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

Method _set_execution

editor/script/script_editor_plugin.cpp:546–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544}
545
546void ScriptEditor::_set_execution(Ref<RefCounted> p_script, int p_line) {
547 Ref<Script> scr = Object::cast_to<Script>(*p_script);
548 if (scr.is_valid() && (scr->has_source_code() || scr->get_path().is_resource_file())) {
549 for (int i = 0; i < tab_container->get_tab_count(); i++) {
550 ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
551 if (!se) {
552 continue;
553 }
554
555 if ((scr.is_valid() && se->get_edited_resource() == p_script) || se->get_edited_resource()->get_path() == scr->get_path()) {
556 se->set_executing_line(p_line);
557 }
558 }
559 }
560}
561
562void ScriptEditor::_clear_execution(Ref<RefCounted> p_script) {
563 Ref<Script> scr = Object::cast_to<Script>(*p_script);

Callers

nothing calls this directly

Calls 8

is_resource_fileMethod · 0.80
get_tab_controlMethod · 0.80
is_validMethod · 0.45
has_source_codeMethod · 0.45
get_pathMethod · 0.45
get_tab_countMethod · 0.45
get_edited_resourceMethod · 0.45
set_executing_lineMethod · 0.45

Tested by

no test coverage detected