Repository: godotengine/godot
File: editor/script/script_editor_plugin.h (C/C++)

Code before:
	void register_syntax_highlighter(const Ref<EditorSyntaxHighlighter> &p_syntax_highlighter);
	void unregister_syntax_highlighter(const Ref<EditorSyntaxHighlighter> &p_syntax_highlighter);

	static void register_create_script_editor_function(CreateScriptEditorFunc p_func);

	ScriptEditor(WindowWrapper *p_wrapper);
};

class ScriptEditorPlugin : public EditorPlugin {
	GDCLASS(ScriptEditorPlugin, EditorPlugin);

	ScriptEditor *script_editor = nullptr;
	WindowWrapper *window_wrapper = nullptr;

	String last_editor;

	void _focus_another_editor();

	void _save_last_editor(const String &p_editor);
	void _window_visibility_changed(bool p_visible);

protected:
	void _notification(int p_what);

public:
	static bool open_in_external_editor(const String &p_path, int p_line, int p_col, bool ignore_project = false);

	virtual String get_plugin_name() const override { return TTRC("Script"); }
	bool has_main_screen() const override { return true; }
	virtual void edit(Object *p_object) override;
	virtual bool handles(Object *p_object) const override;
	virtual void make_visible(bool p_visible) override;
	virtual void selected_notify() override;

	virtual String get_unsaved_status(const String &p_for_scene) const override;
	virtual void save_external_data() override;
	virtual void apply_changes() override;

	virtual void set_window_layout(Ref<ConfigFile> p_layout) override;
	virtual void get_window_layout(Ref<ConfigFile> p_layout) override;

	virtual void get_breakpoints(List<String> *p_breakpoints) override;

	virtual void edited_scene_changed() override;

	ScriptEditorPlugin();
};


Review comment (suggestion):
```suggestion
	static bool open_in_external_editor(const String &p_path, int p_line, int p_col, bool p_ignore_project = false);
```

Code after:
	void register_syntax_highlighter(const Ref<EditorSyntaxHighlighter> &p_syntax_highlighter);
	void unregister_syntax_highlighter(const Ref<EditorSyntaxHighlighter> &p_syntax_highlighter);

	static void register_create_script_editor_function(CreateScriptEditorFunc p_func);

	ScriptEditor(WindowWrapper *p_wrapper);
};

class ScriptEditorPlugin : public EditorPlugin {
	GDCLASS(ScriptEditorPlugin, EditorPlugin);

	ScriptEditor *script_editor = nullptr;
	WindowWrapper *window_wrapper = nullptr;

	String last_editor;

	void _focus_another_editor();

	void _save_last_editor(const String &p_editor);
	void _window_visibility_changed(bool p_visible);

protected:
	void _notification(int p_what);

public:
	static bool open_in_external_editor(const String &p_path, int p_line, int p_col, bool p_ignore_project = false);

	virtual String get_plugin_name() const override { return TTRC("Script"); }
	bool has_main_screen() const override { return true; }
	virtual void edit(Object *p_object) override;
	virtual bool handles(Object *p_object) const override;
	virtual void make_visible(bool p_visible) override;
	virtual void selected_notify() override;

	virtual String get_unsaved_status(const String &p_for_scene) const override;
	virtual void save_external_data() override;
	virtual void apply_changes() override;

	virtual void set_window_layout(Ref<ConfigFile> p_layout) override;
	virtual void get_window_layout(Ref<ConfigFile> p_layout) override;

	virtual void get_breakpoints(List<String> *p_breakpoints) override;

	virtual void edited_scene_changed() override;

	ScriptEditorPlugin();
};