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

Method _apply_editor_settings

editor/script/script_editor_plugin.cpp:3087–3118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3085}
3086
3087void ScriptEditor::_apply_editor_settings() {
3088 textfile_extensions.clear();
3089 const Vector<String> textfile_ext = ((String)(EDITOR_GET("docks/filesystem/textfile_extensions"))).split(",", false);
3090 for (const String &E : textfile_ext) {
3091 textfile_extensions.insert(E);
3092 }
3093
3094 trim_trailing_whitespace_on_save = EDITOR_GET("text_editor/behavior/files/trim_trailing_whitespace_on_save");
3095 trim_final_newlines_on_save = EDITOR_GET("text_editor/behavior/files/trim_final_newlines_on_save");
3096 convert_indent_on_save = EDITOR_GET("text_editor/behavior/files/convert_indent_on_save");
3097
3098 members_overview_enabled = EDITOR_GET("text_editor/script_list/show_members_overview");
3099 help_overview_enabled = EDITOR_GET("text_editor/help/show_help_index");
3100 external_editor_active = EDITOR_GET("text_editor/external/use_external_editor");
3101 _update_members_overview_visibility();
3102 _update_help_overview_visibility();
3103
3104 _update_autosave_timer();
3105
3106 _update_script_names();
3107
3108 ScriptServer::set_reload_scripts_on_save(EDITOR_GET("text_editor/behavior/files/auto_reload_and_parse_scripts_on_save"));
3109
3110 for (int i = 0; i < tab_container->get_tab_count(); i++) {
3111 ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
3112 if (!se) {
3113 continue;
3114 }
3115
3116 se->update_settings();
3117 }
3118}
3119
3120void ScriptEditor::_filesystem_changed() {
3121 _update_script_names();

Callers

nothing calls this directly

Calls 6

splitMethod · 0.80
get_tab_controlMethod · 0.80
clearMethod · 0.45
insertMethod · 0.45
get_tab_countMethod · 0.45
update_settingsMethod · 0.45

Tested by

no test coverage detected