Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose update_docs_from_script method #92916

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

Naros
Copy link
Contributor

@Naros Naros commented Jun 8, 2024

Currently, ScriptEditor is not exposed to GDExtension.

So for any implementation of ScriptExtension and ScriptLanguageExtension that supports documentation, if the user has opened the documentation for a specific script and the user later modifies the script, there is no way to synchronize the changes with the documentation view that's embedded within the ScriptEditor framework.

Exposing update_docs_from_script(Script&) allows such integrators to trigger a sync of the script's documentation should it already be opened in the ScriptEditor interface so that the documentation view works the same as the script editor integration does for C# and GDScript.

@AThousandShips
Copy link
Member

I'd say this should be discussed in a proposal to find the need and discuss the best way to go about this

@Naros
Copy link
Contributor Author

Naros commented Jun 8, 2024

Hi @AThousandShips, I would say the best way should be to properly expose ScriptEditor to GDExtension. This would expose a lot of the inner workings of ScriptEditor to any derived implementation, including things like help, documentation, etc.

I believe this would require new methods on the GDExtension interface for this to work, @dsnopek can confirm. My concern there would be that would likely not be something we'd likely backport to Godot 4.2, and we have a strict requirement to support Godot 4.2 and 4.3. So when looking at a solution that can easily be backported, this seemed like a more logical approach, but I can certainly understand your PoV.

@AThousandShips
Copy link
Member

AThousandShips commented Jun 8, 2024

Meant to open a proposal here

And I also mean discussing other solutions, including non-source changes etc., and that's best discussed, along with assessing the need, in a proposal

Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't an area of the engine I'm very familiar with, but exposing this makes sense to me.

@akien-mga akien-mga merged commit f5bf9b6 into godotengine:master Sep 12, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants