| 1919 | } |
| 1920 | |
| 1921 | Vector<String> ScriptEditor::_get_breakpoints() { |
| 1922 | Vector<String> ret; |
| 1923 | HashSet<String> loaded_scripts; |
| 1924 | for (int i = 0; i < tab_container->get_tab_count(); i++) { |
| 1925 | ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i)); |
| 1926 | if (!se) { |
| 1927 | continue; |
| 1928 | } |
| 1929 | |
| 1930 | Ref<Script> scr = se->get_edited_resource(); |
| 1931 | if (scr.is_null()) { |
| 1932 | continue; |
| 1933 | } |
| 1934 | |
| 1935 | String base = scr->get_path(); |
| 1936 | loaded_scripts.insert(base); |
| 1937 | if (base.is_empty() || base.begins_with("local://")) { |
| 1938 | continue; |
| 1939 | } |
| 1940 | |
| 1941 | PackedInt32Array bpoints = se->get_breakpoints(); |
| 1942 | for (int32_t bpoint : bpoints) { |
| 1943 | ret.push_back(base + ":" + itos((int)bpoint + 1)); |
| 1944 | } |
| 1945 | } |
| 1946 | |
| 1947 | // Load breakpoints that are in closed scripts. |
| 1948 | Vector<String> cached_editors = script_editor_cache->get_sections(); |
| 1949 | for (const String &E : cached_editors) { |
| 1950 | if (loaded_scripts.has(E)) { |
| 1951 | continue; |
| 1952 | } |
| 1953 | |
| 1954 | Array breakpoints = _get_cached_breakpoints_for_script(E); |
| 1955 | for (int breakpoint : breakpoints) { |
| 1956 | ret.push_back(E + ":" + itos((int)breakpoint + 1)); |
| 1957 | } |
| 1958 | } |
| 1959 | return ret; |
| 1960 | } |
| 1961 | |
| 1962 | void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) { |
| 1963 | HashSet<String> loaded_scripts; |
nothing calls this directly
no test coverage detected