Commit Graph

290 Commits

Author SHA1 Message Date
Rémi Verschelde 33f3511241
Merge pull request #87293 from YuriSizov/editor-theme-a-rehashed-follow-up
Improve editor theme generation after the refactor
2024-01-18 16:34:50 +01:00
Yuri Sizov c027aecc2e Merge pull request #86676 from rune-scape/sparse-script-reload
GDScript: Hot-reload changed scripts only
2024-01-17 18:52:54 +01:00
Yuri Sizov 45eedba1fa Improve editor theme generation after the refactor 2024-01-17 15:16:53 +01:00
Yuri Sizov 95b27fe8c7 Reorganize code related to editor theming
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.

Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.

All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
2024-01-16 11:57:45 +01:00
kobewi 0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
Rémi Verschelde 4baa634937
Merge pull request #84895 from rsubtil/fix_dap_race_condition
Prevent race condition on initial breakpoints from DAP
2024-01-09 15:30:44 +01:00
Rémi Verschelde 6c390b620d
Merge pull request #84445 from Rubonnek/add-const-references-clang-tidy
Add const references detected by clang-tidy
2024-01-04 14:25:33 +01:00
rune-scape cde478bda6 Hot-reload only changed scripts 2024-01-02 17:56:52 -08:00
msreis f1cc14d525 Fix missing time for some script functions in profiler
Fixes the issue by adding a mechanism by which the functions that were
previously disappearing can be profiled too. This is optional with
an editor setting, since collecting more information naturally slows the engine
further while profiling.

Fixes #23715, #40251, #29049
2023-12-19 19:42:21 +01:00
Wilson E. Alvarez a3cb1b096f
Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
Ricardo Subtil 485342408b Prevent race condition on initial breakpoints from DAP 2023-11-14 15:56:03 +00:00
Rémi Verschelde c2d410a19e
Merge pull request #82868 from SaracenOne/multi_session_debugger_fixes
Fix debugger behaviour with multi-session debugging
2023-10-16 10:38:58 +02:00
Saracen 3700ce7318 Fix right-click menu position for the debugger breakpoint tree. 2023-10-06 19:47:19 +01:00
Saracen 3defc17646 Fix debugger behaviour with multi-session debugging:
Fixes script editor debug menu on sessions other than 1
Fixes breakpoint toggle from menu in sessions other than 1
Removes execution display when switching to non-breaked sessions
2023-10-06 19:20:37 +01:00
Yuri Sizov 4bd569be95 Replace flat buttons with flat-styled buttons with a visible pressed state 2023-09-19 22:36:29 +02:00
A Thousand Ships 75ee58fd04 [Editor] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-15 20:15:39 +02:00
Yuri Sizov 8ecc0c4f47 Fix accessing editor theme items throughout the UI
This also exposes `EditorInterface::get_editor_theme`.
2023-09-15 14:51:01 +02:00
Yuri Sizov d8ff69d53c Extract ScriptInstance to simplify includes
This allows to include script_instance.h directly in the
generated gdvirtual.gen.inc, and remove excessive includes
from the codebase.

This should also allow Resource to use GDVIRTUAL macros,
which wasn't possible previously due to a circular dependency.
2023-09-06 22:54:38 +02:00
kobewi 6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
Yuri Sizov 2445414aa0 Avoid unnecessary inspector updates when loading or switching scenes
This should result in some noticeable performance improvements,
aside from fixing bugs due to conflicts in logic.
This also simplifies some related code identified while debugging.
2023-08-12 13:32:59 +02:00
Chia-Hsiang Cheng 8da66412f6 Avoid retrieving the object ID of a Nil variable 2023-08-04 22:38:43 +08:00
Rémi Verschelde 8b6c867c81
Merge pull request #79280 from raulsntos/dotnet/better-push-error
C#: Improve `GD.PushError` and `GD.PushWarning`
2023-08-03 14:46:44 +02:00
Juan Linietsky 5e512b705e Support threads in the script debugger
* This implementation adds threads on the side of the client (script debugger).
* Some functions of the debugger are optimized.
* The profile is also now thread safe using atomics.
* The editor can switch between multiple threads when debugging.

This PR adds threaded support for the script language debugger. Every thread has its own thread local data and it will connect to the debugger using multiple thread IDs.
This means that, now, the editor can receive multiple threads entering debug mode at the same time.
2023-07-26 12:06:45 +02:00
Hendrik Brucker 7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
Raul Santos 13ab2b6f4f
C#: Improve `GD.PushError` and `GD.PushWarning`
- Use the name, file path and line number of the caller that invokes
`GD.PushError` and `GD.PushWarning` instead of the location in the C++
`runtime_interop.cpp` file.
- Improvements to getting the C# stack trace.
  - Use C# type keywords for built-in types in method declarations.
  - Remove extra space before each parameter in method declarations.
  - Skip one more frame to avoid `NativeInterop.NativeFuncs`.
  - Skip methods annotated with the `[StackTraceHidden]` attribute.
- Improvements to `ScriptEditorDebugger` when source is in project.
  - Avoid overriding error metadata when the source is inside the
project file.
  - Use the source function in the title when the source is inside
the project file.

Users that use these methods would expect the reported location printed
by these methods to correspond to a location in their project source files.
Specifically, they'd expect to see the file path and line number at which
they call these methods, and not the location of the C++ code (which is
always the same). Now, these methods are a lot more useful since users
can know which line in their source code printed the error/warning.
2023-07-11 11:19:11 +02:00
Rémi Verschelde 080d471e98
Merge pull request #75200 from Calinou/debugger-editor-settings-add-property-hints
Add property hints for debugger/profiler editor settings
2023-06-19 21:39:10 +02:00
Fabio Alessandrelli 7b170d12cf
Merge pull request #75836 from rsubtil/bugfix-dap_windows_path
Fix DAP path mismatch on Windows
2023-06-19 16:38:19 +02:00
Rémi Verschelde 2d6b880987
i18n: Sync translations with Weblate (now tracking 4.1 strings) 2023-06-12 14:57:08 +02:00
samar-01 d9e64d7001 Changed error tree initialization to allow reselection 2023-06-10 22:47:16 -04:00
VolTer 6f1adb72db Fix profilers' GUI trees 2023-06-03 11:47:59 +02:00
Aaron Franke 74361b3d50
Rename the Debugger's stack debug section to Stack Trace 2023-05-11 21:22:24 -05:00
Hendrik Brucker dc46163b12 Improve editor state persistence 2023-05-11 04:17:03 +02:00
Rémi Verschelde b3bb92ae5e
CI: Use gh-cli for changed files, and workaround codespell skip list bug
For PRs, this should give a more accurate list, as the previous method would
diff to the tip of the `master` branch, which could include new commits (and
thus changed files) not present in the PR branch.

codespell's `--skip` option doesn't work at all with folders when used
together with an explicit list of paths to work with, so let's not use it.
2023-05-08 15:36:17 +02:00
Juan Linietsky 273a6eeb66 Redo how the remote filesystem works
Instead of reading files over the network, the new version uses a local file cache and only updates files when it changes.

The original remote filesystem was created 14 years ago, when ethernet was faster than hard drives or even flash. Also, mobile devices have a very small amount of storage.
Nowadays, this is no longer the case so the approach is changed to using a persistent cache in the target device.

Co-authored-by: m4gr3d
2023-05-08 11:57:54 +02:00
Yuri Sizov 8a74d8438f Extract editor run toolbar into its own component
- Simplify and update its logic.
- Simplify EditorScript.
- Improve EditorNode and other relevant includes.
- Fix scene-based path in the movie writer when
reloading a scene.
2023-04-19 17:12:28 +02:00
Danil Alexeev 36bedd341a
Fix misuses of error macros 2023-04-18 10:20:48 +03:00
Rémi Verschelde c5d9470c7c
Merge pull request #75765 from YuriSizov/editor-node-optimize-includes
Improve includes of `EditorNode` (and everything else)
2023-04-11 19:40:24 +02:00
Ricardo Subtil 4be4eeea3a Poll LSP/DAP clients for connection status updates 2023-04-09 12:36:01 +01:00
Ricardo Subtil b8ae1c218c Fix DAP path mismatch on Windows 2023-04-08 19:59:01 +01:00
Yuri Sizov 4154039832 Improve includes of EditorNode (and everything else)
Also start organizing editor-specific GUI components
into a dedicated folder, `editor/gui`.
Also move `editor_file_server` next to the rest of debugger classes.
2023-04-07 18:59:49 +02:00
Yuri Sizov 9b500ab53c Fix premature theme item access in editor tools 2023-04-03 18:01:11 +02:00
kobewi f289e74966 Refresh filesystem when saving remote branch 2023-03-24 19:38:08 +01:00
Hugo Locurcio f575ca09ae
Add property hints for debugger/profiler editor settings
This also adds descriptions for those settings.
2023-03-22 01:07:31 +01:00
Yuri Sizov 239eb31c90 Make sure Script Debugger is updated with the editor theme 2023-03-10 18:16:00 +01:00
Haoyu Qiu 84aee17901 Improvements and fixes based on Weblate comments
* Description of `ui_text_submit` action should be "Submit Text" instead of "Text Submitted".
* Spell out "Animation" instead of using "Anim.".
* Treat "Max" as regular word instead of writing "Max.".
* Use generic "Set %s" for action name instead of a dedicated "Set target_position".
* Add translator comment for:
    * "Inclusive" and "Self" in the profiler.
    * Places where it needs the context about being an editor progress label.
    * "Duplicated Animation Name" since it's refering to the new name of a duplicated animation.
    * Disambiguation of "View Plane Transform", "Paste Selects" and "Display Normal".
* Fix wrong undo action name for renaming an input action.
* Fix missing end quote in a shader error message.
* In class reference:
    * Fix duplicated "if" in the description of `signf()`.
    * Fix mismatched example output in `String.operator %()`.
    * Fix typo in the description of `Decal.texture_emission`.
    * Unify description of `String.match()` and `StringName.match()`.
2023-02-13 15:22:18 +08:00
Pedro J. Estébanez 31a4a0002e Pace debugger draw requests 2023-02-07 12:10:28 +01:00
Paul Joannon 0fb1cef42f
Restore missing info in the error tooltips 2023-01-28 12:34:12 +01:00
Paul Joannon c93eec4139
Better error display in debugger panel
- Use the right stack frame info as title of the error.
- Use the actual C# exception type as error for exceptions raised from C#.
- Show the right language instead of always **C++ Error**.
2023-01-27 10:01:55 +01:00
kobewi b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
bruvzg 5406b001ca
Move remote debug buttons to a single menu. 2023-01-14 22:25:35 +02:00