Commit graph

87 commits

Author SHA1 Message Date
Danil Alexeev
87718d2a6e
Editor Help: Add syntax highlighting for code blocks 2024-03-09 00:02:31 +03:00
Danil Alexeev
af28f87791
Documentation: Add support for deprecated/experimental messages 2024-02-15 15:59:50 +03:00
Rémi Verschelde
391a8e5327
Merge pull request #85868 from KoBeWi/knowyourtiles
Add descriptions for tile properties
2024-02-13 11:24:42 +01:00
Micky
fbc584d4f2 Add color in built-in documentation for overridden properties 2024-02-11 17:30:54 +01:00
Riteo
f468e59efd GDExtension: add an interface for loading extra documentation
Adds two new GDExtension interface methods:
 - `editor_help_load_xml_from_utf8_chars`
 - `editor_help_load_xml_from_utf8_chars_and_len`

Both of these methods parse the XML passed into an extra documentation
container which, when needed, is merged into the main doc container.

Co-Authored-By: Rémi Verschelde <rverschelde@gmail.com>
2024-01-26 13:53:33 +01:00
Yuri Sizov
fc3f40f37d Improve engine startup/shutdown benchmarks
- Add contexts to give a better sense of benchmarked areas.
- Add missing benchmarks and adjust some begin/end points.
- Clean up names.
- Improve Android's internal benchmarks in a similar manner.

Co-authored-by: Fredia Huya-Kouadio <fhuya@meta.com>
2023-12-08 12:53:04 +01:00
kobewi
6e31c413b6 Add descriptions for tile properties 2023-12-07 16:57:34 +01:00
Pedro J. Estébanez
a1d8fc1af9 Polish & fix editor help cache generation
- Isolated the generation of extensions's docs. They're now not cached and refreshed as needed.
- Removed superfluous sorting of the class list.
- Removed some superfluous/unused elements.
- Renamed some items for clarity.
2023-11-02 13:46:37 +01:00
Yuri Sizov
9b03fb36f9 Improve threading in ClassDB and EditorHelp 2023-10-20 22:14:04 +02:00
Rémi Verschelde
1e544505be
Merge pull request #82691 from YuriSizov/rst-validate-with-exceptions
Validate `code` tags for class and member references
2023-10-04 15:42:42 +02:00
Michael Alexsander
ae91644c73
Revamp how documentation tooltips work 2023-10-03 17:40:51 -03:00
Yuri Sizov
cc0eebd9d8 Validate code tags for class and member references
This commit also adds means to manually disable warnings
in `code` tags where it's a false positive with the new
`skip-lint` attribute.

Warnings are now enabled on CI to prevent future errors.
2023-10-03 15:48:31 +02:00
Haoyu Qiu
e350034251 Avoid text substitution in EditorHelp messages 2023-09-05 23:15:34 +08:00
Danil Alexeev
eb391d3302
Display BitField[Enum] in docs to distinguish from Enum 2023-06-15 17:23:02 +03:00
ocean (they/them)
6783ff69c0 Improve and fix GDScript documentation generation & behavior
Removes documentation generation (docgen) from the GDScript compiler to
its own file. Adds support for GDScript enums and signal parameters and
quite a few other assorted fixes and improvements.
2023-04-21 10:17:30 -04:00
RedworkDE
692ad70fd7 C#: Do not use DocCache when generating glue code 2023-04-20 15:35:14 +02:00
Pedro J. Estébanez
f5602869da Cache classes editor help 2023-04-13 12:16:47 +02:00
Yuri Sizov
9fae65404a Streamline class icon resolution in the editor 2023-03-31 21:17:59 +02:00
Yuri Sizov
0eb3b49c39 Make EditorHelp respect font size settings 2023-02-11 20:09:57 +01:00
Yuri Sizov
bbbcd77217 Make use of a theme cache in EditorHelp and ensure it's updated
- Migrates the existing cache to the standard theme cache struct
- Moves some parts of the codebase to use cache instead of ad-hoc fetching
- Adds hooks to editor settings previously missing from theme regeneration
2023-02-11 20:09:35 +01:00
Rémi Verschelde
b342dcdf04
Remove some unused signals
Part of #37604.
2023-01-31 18:54:04 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Yuri Sizov
270c810343 Add more call-to-action notes when documentation is missing 2022-11-17 22:33:55 +03:00
Rémi Verschelde
fd6453c45e Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
This reverts commit 4b817a565c.

Fixes #64988.
Fixes #64997.

This caused several regressions (#64988, #64997,
https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605)
which point at a flaw in the current logic:

- `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with
  `NOTIFCATION_THEME_CHANGED` as introduced in #62845.
- Some classes use their `THEME_CHANGED` to cache theme items in
  member variables (e.g. `style_normal`, etc.), and use those member
  variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE`
  notification is now deferred, they end up accessing invalid state and this
  can lead to not applying theme properly (e.g. for EditorHelp) or crashing
  (e.g. for EditorLog or CodeEdit).

So we need to go back to the drawing board and see if `THEME_CHANGED` can be
called earlier so that the previous logic still works?

Or can we refactor all engine code to make sure that:
- `ENTER_TREE` and similar do not depend on theme properties cached in member
  variables.
- Or `THEME_CHANGE` does trigger a general UI update to make sure that any
  bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE`
  does arrive for the first time. But that means having a temporary invalid
  (and possibly still crashing) state, and doing some computations twice
  which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-29 11:11:29 +02:00
Rémi Verschelde
dd9602e74c
Merge pull request #64847 from Mickeon/editor-docs-hierarchy-icons
Add type icons to editor docs' hierarchy
2022-08-28 17:09:34 +02:00
Aaron Record
4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
Micky
2b063eebee Add type icons to editor docs' hierarchy
The "Inherits" and "Inherited by" section of the docs now display the icon of each Object on the side.

Also scales the main class' icon to match title font
2022-08-25 11:45:05 +02:00
Yuri Sizov
a9098e6147 Add support for documenting built-in annotations 2022-07-04 20:21:39 +03:00
Yuri Rubinsky
c6f57c30c3 Fix help_title_font_size editor property to correctly apply to docs 2022-06-29 15:08:54 +03:00
bruvzg
96cc3c74da
Fix help links with threaded RTL. 2022-05-30 10:05:14 +03:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Rémi Verschelde
c273ddc3ee Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
Rémi Verschelde
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Aaron Franke
918b09cabc
Initialize bools in the headers in editor 2022-03-12 13:34:06 -06:00
Yuri Roubinsky
6e2c9f398c Fix theming of doc background 2022-01-30 09:49:24 +03:00
bruvzg
f13db28a5c
[Editor] Do not update editor help theme, if calculated margin hasn't changed. 2022-01-24 09:51:35 +02:00
Yuri Sizov
ba99cd40d1 Improve spacing in built-in class reference 2022-01-18 23:01:30 +03:00
reduz
df7636b19a
Generate editor docs on a thread
* The main generation could not be moved to a thread, as it instantiates
  classes to get default values, interacts with ProjectSettings, etc.
* Only uncompressing documentation and merging it is threaded.
* Seems to improve editor load times by 0.5 seconds.
2022-01-07 15:17:30 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Yuri Sizov
397e56964d Sort and group theme properties in docs, improve formatting for theme and enums 2021-12-01 21:02:20 +03:00
Aaron Franke
6772ebcea0
Move the docs for constructors and operators out of methods section 2021-10-29 12:34:57 -05:00
Marcel Admiraal
87a4ba492e Remove unimplemented methods 2021-10-21 18:44:25 +01:00
Yuri Roubinsky
1dda47c280 Added status bar and toggle scripts panel button to EditorHelp/VScripts 2021-09-15 11:35:03 +03:00
reduz
5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.

Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
Gregory Basile
8ab13f8ace Documentation search fixes
Updates rich_text_label so that the built-in documentation can be searched
Previously, it would only find the first result and would not select other results
Renames "_entered" functions to "_submitted"
2021-06-16 09:43:34 -07:00
Rémi Verschelde
b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Thakee Nathees
42bfa16996 Refactor DocData into core and editor (DocTools) parts 2020-12-02 00:48:39 +05:30
Thakee Nathees
d0e7d9b62f Documentation generation for GDScript
- ClassDoc added to GDScript and property reflection data were extracted
from parse tree

- GDScript comments are collected from tokenizer for documentation and
applied to the ClassDoc by the GDScript compiler

- private docs were excluded (name with underscore prefix and doesn't
have any doc comments)

- default values (of non exported vars), arguments are extraced from the
parser

- Integrated with GDScript 2.0 and new enums were added.

- merge conflicts fixed
2020-11-29 19:45:36 +05:30
Eric M
9c69281f87 Remove unused unhandled_key_input method in EditorHelp. Search popup and focus is handled by an external MenuButton shortcut. 2020-11-23 21:14:25 +10:00
Aaron Franke
02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00