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

Method _goto_script_line

editor/script/script_editor_plugin.cpp:528–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526}
527
528void ScriptEditor::_goto_script_line(Ref<RefCounted> p_script, int p_line) {
529 Ref<Script> scr = Object::cast_to<Script>(*p_script);
530 if (scr.is_valid() && (scr->has_source_code() || scr->get_path().is_resource_file())) {
531 if (edit(p_script, p_line, 0)) {
532 EditorNode::get_singleton()->push_item(p_script.ptr());
533
534 ScriptEditorBase *current = _get_current_editor();
535 if (ScriptTextEditor *script_text_editor = Object::cast_to<ScriptTextEditor>(current)) {
536 script_text_editor->goto_line_centered(p_line);
537 } else if (current) {
538 current->goto_line(p_line);
539 }
540
541 _save_history();
542 }
543 }
544}
545
546void ScriptEditor::_set_execution(Ref<RefCounted> p_script, int p_line) {
547 Ref<Script> scr = Object::cast_to<Script>(*p_script);

Callers

nothing calls this directly

Calls 8

is_resource_fileMethod · 0.80
push_itemMethod · 0.80
is_validMethod · 0.45
has_source_codeMethod · 0.45
get_pathMethod · 0.45
ptrMethod · 0.45
goto_line_centeredMethod · 0.45
goto_lineMethod · 0.45

Tested by

no test coverage detected