Repository: godotengine/godot
File: editor/shader/shader_editor_plugin.cpp (C++)

Code before:

	shader_list = memnew(ItemList);
	shader_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
	shader_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
	shader_list->set_theme_type_variation("ItemListSecondary");
	shader_list->set_custom_minimum_size(Size2(100, 60) * EDSCALE);
	shader_list->connect(SceneStringName(item_selected), callable_mp(this, &ShaderEditorPlugin::_shader_selected).bind(true));
	shader_list->connect("item_clicked", callable_mp(this, &ShaderEditorPlugin::_shader_list_clicked));
	shader_list->set_allow_rmb_select(true);
	SET_DRAG_FORWARDING_GCD(shader_list, ShaderEditorPlugin);
	files_split->add_child(shader_list);

	shader_tabs = memnew(TabContainer);
	shader_tabs->set_custom_minimum_size(Size2(460, 300) * EDSCALE);
	shader_tabs->set_tabs_visible(false);
	shader_tabs->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	shader_tabs->set_v_size_flags(Control::SIZE_EXPAND_FILL);
	Ref<StyleBoxEmpty> empty(memnew(StyleBoxEmpty));
	shader_tabs->add_theme_style_override(SceneStringName(panel), empty);
	shader_tabs->hide();
	files_split->add_child(shader_tabs);

	file_menu = memnew(MenuButton);
	file_menu->set_flat(false);
	file_menu->set_theme_type_variation("FlatMenuButton");
	file_menu->set_text(TTR("File"));
	file_menu->set_h_size_flags(Control::SIZE_SHRINK_BEGIN);
	file_menu->set_v_size_flags(Control::SIZE_SHRINK_BEGIN);
	file_menu->set_switch_on_hover(true);
	file_menu->set_shortcut_context(files_split);
	file_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ShaderEditorPlugin::_menu_item_pressed));
	_setup_popup_menu(FILE, file_menu->get_popup());
	_set_file_specific_items_disabled(true);
	files_split->add_child(file_menu);

	shader_create_dialog = memnew(ShaderCreateDialog);
	shader_create_dialog->connect("shader_created", callable_mp(this, &ShaderEditorPlugin::_shader_created));
	shader_create_dialog->connect("shader_include_created", callable_mp(this, &ShaderEditorPlugin::_shader_include_created));
	shader_dock->add_child(shader_create_dialog);

	Ref<TextShaderLanguagePlugin> text_shader_lang(memnew(TextShaderLanguagePlugin));
	EditorShaderLanguagePlugin::register_shader_language(text_shader_lang);

	Ref<VisualShaderLanguagePlugin> visual_shader_lang(memnew(VisualShaderLanguagePlugin));
	EditorShaderLanguagePlugin::register_shader_language(visual_shader_lang);
}

ShaderEditorPlugin::~ShaderEditorPlugin() {
	EditorShaderLanguagePlugin::clear_registered_shader_languages();
	memdelete(file_menu);
}

Review comment (suggestion):
```suggestion
	file_menu->set_text(TTRC("File"));
```
If you are changing it anyway.

Code after:
	add_child(context_menu);

	shader_list = memnew(ItemList);
	shader_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
	shader_list->set_v_size_flags(Control::SIZE_EXPAND_FILL);
	shader_list->set_theme_type_variation("ItemListSecondary");
	shader_list->set_custom_minimum_size(Size2(100, 60) * EDSCALE);
	shader_list->connect(SceneStringName(item_selected), callable_mp(this, &ShaderEditorPlugin::_shader_selected).bind(true));
	shader_list->connect("item_clicked", callable_mp(this, &ShaderEditorPlugin::_shader_list_clicked));
	shader_list->set_allow_rmb_select(true);
	SET_DRAG_FORWARDING_GCD(shader_list, ShaderEditorPlugin);
	files_split->add_child(shader_list);

	shader_tabs = memnew(TabContainer);
	shader_tabs->set_custom_minimum_size(Size2(460, 300) * EDSCALE);
	shader_tabs->set_tabs_visible(false);
	shader_tabs->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	shader_tabs->set_v_size_flags(Control::SIZE_EXPAND_FILL);
	Ref<StyleBoxEmpty> empty;
	empty.instantiate();
	shader_tabs->add_theme_style_override(SceneStringName(panel), empty);
	shader_tabs->hide();
	files_split->add_child(shader_tabs);

	file_menu = memnew(MenuButton);
	file_menu->set_flat(false);
	file_menu->set_theme_type_variation("FlatMenuButton");
	file_menu->set_text(TTRC("File"));
	file_menu->set_h_size_flags(Control::SIZE_SHRINK_BEGIN);
	file_menu->set_v_size_flags(Control::SIZE_SHRINK_BEGIN);
	file_menu->set_switch_on_hover(true);
	file_menu->set_shortcut_context(files_split);
	file_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ShaderEditorPlugin::_menu_item_pressed));
	_setup_popup_menu(FILE, file_menu->get_popup());
	_set_file_specific_items_disabled(true);
	files_split->add_child(file_menu);

	shader_create_dialog = memnew(ShaderCreateDialog);
	shader_create_dialog->connect("shader_created", callable_mp(this, &ShaderEditorPlugin::_shader_created));
	shader_create_dialog->connect("shader_include_created", callable_mp(this, &ShaderEditorPlugin::_shader_include_created));
	shader_dock->add_child(shader_create_dialog);

	Ref<TextShaderLanguagePlugin> text_shader_lang;
	text_shader_lang.instantiate();
	EditorShaderLanguagePlugin::register_shader_language(text_shader_lang);

	Ref<VisualShaderLanguagePlugin> visual_shader_lang;
	visual_shader_lang.instantiate();
	EditorShaderLanguagePlugin::register_shader_language(visual_shader_lang);
}