| 1960 | } |
| 1961 | |
| 1962 | void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) { |
| 1963 | HashSet<String> loaded_scripts; |
| 1964 | for (int i = 0; i < tab_container->get_tab_count(); i++) { |
| 1965 | ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i)); |
| 1966 | if (!se) { |
| 1967 | continue; |
| 1968 | } |
| 1969 | |
| 1970 | Ref<Script> scr = se->get_edited_resource(); |
| 1971 | if (scr.is_null()) { |
| 1972 | continue; |
| 1973 | } |
| 1974 | |
| 1975 | String base = scr->get_path(); |
| 1976 | loaded_scripts.insert(base); |
| 1977 | if (base.is_empty() || base.begins_with("local://")) { |
| 1978 | continue; |
| 1979 | } |
| 1980 | |
| 1981 | PackedInt32Array bpoints = se->get_breakpoints(); |
| 1982 | for (int32_t bpoint : bpoints) { |
| 1983 | p_breakpoints->push_back(base + ":" + itos((int)bpoint + 1)); |
| 1984 | } |
| 1985 | } |
| 1986 | |
| 1987 | // Load breakpoints that are in closed scripts. |
| 1988 | Vector<String> cached_editors = script_editor_cache->get_sections(); |
| 1989 | for (const String &E : cached_editors) { |
| 1990 | if (loaded_scripts.has(E)) { |
| 1991 | continue; |
| 1992 | } |
| 1993 | |
| 1994 | Array breakpoints = _get_cached_breakpoints_for_script(E); |
| 1995 | for (int breakpoint : breakpoints) { |
| 1996 | p_breakpoints->push_back(E + ":" + itos((int)breakpoint + 1)); |
| 1997 | } |
| 1998 | } |
| 1999 | } |
| 2000 | |
| 2001 | void ScriptEditor::_members_overview_selected(int p_idx) { |
| 2002 | int line = members_overview->get_item_metadata(p_idx); |
no test coverage detected