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

Support editing JSON in ScriptEditor #72259

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

Paulb23
Copy link
Member

@Paulb23 Paulb23 commented Jan 28, 2023

Added support to edit JSON in the ScriptEditor with some base functionality.

Some parts of the ScriptEditor have been generalised to support this.

JSON file types are opened with the TextEditor class used for TextFiles, rather then duplicating this again (until this is refactored). The TextEditor will will report and highlight errors reported by the JSON parser.

Finally, added a basic JSONSyntaxHighlighter. The ScriptEditor previously used to only look at the script language, now if it is not a script it will look at the extension. This is to allow using the JSON highlighter for JSON files and PlainTextHighlighter for TextFiles.

supersedes #67739
closes #66820

@Paulb23 Paulb23 added this to the 4.0 milestone Jan 28, 2023
@Paulb23 Paulb23 requested a review from a team as a code owner January 28, 2023 15:32
@akien-mga
Copy link
Member

Needs rebase to pass CI, I fixed the GDScript test error.

@akien-mga akien-mga merged commit bed1ebd into godotengine:master Feb 14, 2023
@akien-mga
Copy link
Member

Thanks!

@Paulb23 Paulb23 deleted the json-editing branch February 14, 2023 18:06
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.

Double clicking JSON files in FileSystem tab throws errors
2 participants