Repository: godotengine/godot
File: editor/docks/filesystem_dock.h (C/C++)

Code before:
	Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
	bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
	void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
	void _get_drag_target_folder(String &target, bool &target_favorites, const Point2 &p_point, Control *p_from) const;

	void _preview_invalidated(const String &p_path);
	void _file_list_thumbnail_done(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, int p_index, const String &p_filename);
	void _tree_thumbnail_done(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, int p_update_id, ObjectID p_item);

	void _update_display_mode(bool p_force = false);

	Vector<String> _tree_get_selected(bool remove_self_inclusion = true, bool p_include_unselected_cursor = false) const;
	Vector<String> _file_list_get_selected() const;

	bool _is_file_type_disabled_by_feature_profile(const StringName &p_class);

	void _feature_profile_changed();
	void _project_settings_changed();
	static Vector<String> _remove_self_included_paths(Vector<String> selected_strings);

private:
	inline static FileSystemDock *singleton = nullptr;

public:
	static FileSystemDock *get_singleton() { return singleton; }
	static DependencyEditorOwners *get_owners_editor_singleton() { return singleton->owners_editor; }

protected:
	void _notification(int p_what);
	static void _bind_methods();

	virtual void update_layout(EditorDock::DockLayout p_layout) override;
	virtual void save_layout_to_config(Ref<ConfigFile> &p_layout, const String &p_section) const override;
	virtual void load_layout_from_config(const Ref<ConfigFile> &p_layout, const String &p_section) override;

public:
	static constexpr double ITEM_COLOR_SCALE = 1.75;
	static constexpr double ITEM_ALPHA_MIN = 0.1;
	static constexpr double ITEM_ALPHA_MAX = 0.15;
	static constexpr double ITEM_BG_DARK_SCALE = 0.3;

	static Color get_dir_icon_color(const String &p_dir_path, const Color &p_default);

	const HashMap<String, Color> &get_folder_colors() const;
	Dictionary get_assigned_folder_colors() const;

	Vector<String> get_selected_paths() const;
	Vector<String> get_uncollapsed_paths() const;

	String get_current_path() const;
	String get_current_directory() const;

Review comment (suggestion):
```suggestion
	static DependencyEditorOwners *get_owners_dialog() { return singleton->owners_editor; }
```
`singleton` does not really apply here, and it's inconsistent with other similar methods (e.g. EditorNode's `get_editor_data()`).
Also it's not editor, it's part of DependencyEditor.

Code after:

	Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
	bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
	void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
	void _get_drag_target_folder(String &target, bool &target_favorites, const Point2 &p_point, Control *p_from) const;

	void _preview_invalidated(const String &p_path);
	void _file_list_thumbnail_done(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, int p_index, const String &p_filename);
	void _tree_thumbnail_done(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, int p_update_id, ObjectID p_item);

	void _update_display_mode(bool p_force = false);

	Vector<String> _tree_get_selected(bool remove_self_inclusion = true, bool p_include_unselected_cursor = false) const;
	Vector<String> _file_list_get_selected() const;

	bool _is_file_type_disabled_by_feature_profile(const StringName &p_class);

	void _feature_profile_changed();
	void _project_settings_changed();
	static Vector<String> _remove_self_included_paths(Vector<String> selected_strings);

private:
	inline static FileSystemDock *singleton = nullptr;

public:
	static FileSystemDock *get_singleton() { return singleton; }
	static DependencyEditorOwners *get_owners_dialog() { return singleton->owners_editor; }

protected:
	void _notification(int p_what);
	static void _bind_methods();

	virtual void update_layout(EditorDock::DockLayout p_layout) override;
	virtual void save_layout_to_config(Ref<ConfigFile> &p_layout, const String &p_section) const override;
	virtual void load_layout_from_config(const Ref<ConfigFile> &p_layout, const String &p_section) override;

public:
	static constexpr double ITEM_COLOR_SCALE = 1.75;
	static constexpr double ITEM_ALPHA_MIN = 0.1;
	static constexpr double ITEM_ALPHA_MAX = 0.15;
	static constexpr double ITEM_BG_DARK_SCALE = 0.3;

	static Color get_dir_icon_color(const String &p_dir_path, const Color &p_default);

	const HashMap<String, Color> &get_folder_colors() const;
	Dictionary get_assigned_folder_colors() const;

	Vector<String> get_selected_paths() const;
	Vector<String> get_uncollapsed_paths() const;

	String get_current_path() const;