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

Method _file_removed

editor/script/script_editor_plugin.cpp:3153–3173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3151}
3152
3153void ScriptEditor::_file_removed(const String &p_removed_file) {
3154 for (int i = 0; i < tab_container->get_tab_count(); i++) {
3155 ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
3156 if (!se) {
3157 continue;
3158 }
3159 if (se->edited_file_data.path == p_removed_file) {
3160 // The script is deleted with no undo, so just close the tab.
3161 _close_tab(i, false, false);
3162 }
3163 }
3164
3165 // Check closed.
3166 if (script_editor_cache->has_section(p_removed_file)) {
3167 Array breakpoints = _get_cached_breakpoints_for_script(p_removed_file);
3168 for (int breakpoint : breakpoints) {
3169 EditorDebuggerNode::get_singleton()->set_breakpoint(p_removed_file, (int)breakpoint + 1, false);
3170 }
3171 script_editor_cache->erase_section(p_removed_file);
3172 }
3173}
3174
3175void ScriptEditor::_update_find_replace_bar() {
3176 ScriptEditorBase *se = _get_current_editor();

Callers

nothing calls this directly

Calls 5

get_tab_controlMethod · 0.80
erase_sectionMethod · 0.80
get_tab_countMethod · 0.45
has_sectionMethod · 0.45
set_breakpointMethod · 0.45

Tested by

no test coverage detected