Commit graph

150 commits

Author SHA1 Message Date
James Buck
de49bec30e Re-enable script editor File menu shortcuts when the menu is hidden 2023-03-03 12:14:51 -06:00
Paulb23
a197d6ef4e Support editing JSON in ScriptEditor 2023-01-28 16:06:13 +00:00
kobewi
c0083e431b Cleanup unused engine code v2 2023-01-19 13:02:18 +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
trollodel
c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
trollodel
ba9e619b51 Use forward-declarations in EditorPlugin where possible 2022-11-11 20:25:51 +01:00
Eric M
d499071e5b Set the shortcut context for the edit/search/goto menus to the ScriptEditor so that shortcuts continue to work when FindReplaceBar is focused. 2022-10-25 19:52:42 +10:00
Rémi Verschelde
121e1df55b Merge pull request #66300 from KoBeWi/📝🧭
Split script navigation state and edit state
2022-10-05 08:30:49 +02:00
Rindbee
ab0314938e Implement GDScriptTextDocument::willSaveWaitUntil to clean up outdated documents before saving
Implement `GDScriptTextDocument::willSaveWaitUntil` to clean up outdated documents before saving,
then update the document in `GDScriptTextDocument::didSave`.
2022-10-04 15:38:57 +08:00
Rindbee
72a7d874b4 Fix the flickering of the line gutter icon when saving 2022-10-03 19:19:28 +08:00
kobewi
14435ebcee Split script navigation state and edit state 2022-09-25 23:06:39 +02:00
Rindbee
412e87349a Fix out of sync when the script is edited externally via lsp
Previously, external editing via lsp would modify the modified time of the script,
which caused the internal display of the script to not be refreshed when refocusing
the engine.

Now saving the script externally via lsp will automatically refresh the internal
display.
2022-09-25 23:30:35 +08:00
Rémi Verschelde
53d2a9acdd Merge pull request #63576 from KoBeWi/list_clicker
Simplify script list click logic
2022-09-21 15:38:41 +02:00
Twarit Waikar
4656ea8977 VCS: Port Godot 3.5's VCS features to GDExtension 2022-08-31 00:01:42 +05:30
kobewi
2855b591fb Simplify script list click logic 2022-08-30 13:38:03 +02:00
kobewi
1abdffe7a0 Replace Array return types with TypedArray 2 2022-08-23 23:21:32 +02:00
kobewi
8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
Rémi Verschelde
5b02415fd0
Merge pull request #55134 from KoBeWi/script_pillow_or_something
Always soft-reload scripts
2022-05-17 15:09:09 +02: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
Hugo Locurcio
180e5d3028
Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +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
f00803b8a5
Merge pull request #56695 from bruvzg/mod_unicode_input 2022-04-05 14:03:39 +02:00
bruvzg
d1207a0504
[Input] Add extra shortcut_input input processing step to process Unicode character input with Alt / Ctrl modifiers, after processing of shortcuts. 2022-04-05 13:46:45 +03:00
Yuri Roubinsky
5db47c5521 Fix lookup symbol in scripts which doesn't open a tab at first attempt 2022-04-05 10:18:45 +03: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
Rémi Verschelde
11572c6e30
Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
trollodel
05b56f316d Remove most EditorNode constructor parameters and fields 2022-02-14 14:16:24 +01:00
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
jmb462
71fb89390f Save script editor's function list split offset with the editor layout 2022-02-02 22:50:49 +01:00
Haoyu Qiu
e461e28c70 Disable ScriptEditor's menu items when they do nothing 2022-01-21 12:12:48 +08:00
Paulb23
f43f68f605 Convert TextEdit callbacks to Callable 2022-01-19 17:26:22 +00: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
kobewi
ca4c63d654 Always soft-reload scripts 2021-11-19 17:45:16 +01:00
kobewi
134e4d168b Improve save handling for built-in scripts 2021-11-07 23:51:12 +01:00
Marcel Admiraal
87a4ba492e Remove unimplemented methods 2021-10-21 18:44:25 +01:00
Paulb23
31c1215c25 Allow dragging TextFiles from the Filesystem dock 2021-10-12 18:16:08 +01:00
Paulb23
44e260e247 Allow breakpoints in closed files 2021-10-07 19:48:58 +01:00
Paulb23
bec8ae7ba6 Preserve script editor state through tab closes 2021-10-07 19:44:23 +01:00
Paulb23
6596c7bdc2 Add TextFile support across the editor 2021-09-30 13:29:29 +01:00
Hugo Locurcio
3143e7df69
Add history navigation in the script editor using extra mouse buttons
This feature is enabled by default, but it can be disabled in the editor
settings in case it interferes with other uses of the extra buttons
(such as push-to-talk in a VoIP program).
2021-09-25 13:33:07 +02:00
Rémi Verschelde
80e2c084cd
Merge pull request #52479 from KoBeWi/the_close_of_all_tabs
Don't stop closing on unsaved script
2021-09-20 13:16:05 +02:00
Yuri Roubinsky
1dda47c280 Added status bar and toggle scripts panel button to EditorHelp/VScripts 2021-09-15 11:35:03 +03:00
kobewi
8fe664fb4b Don't stop closing on unsaved script 2021-09-07 23:38:19 +02:00
Fabio Alessandrelli
58c30b2626
Merge pull request #51639 from Ev1lbl0w/gsoc21-dap
Implement more advanced features for DAP
2021-09-01 16:17:32 +02:00
Ev1lbl0w
292ed61c18 Implemented advanced features of DAP
Respect client "supportsVariableType" capability

Implement "breakpointLocations" request

Implement "restart" request

Implement "evaluate" request

Fix error messages not being shown, and improved wrong path message

Removed thread option and behavior

Implemented detailed inspection of complex variables

Fix "const"ness of functions

Added a configurable timeout for requests

Implement Godot custom data request/event

Implement syncing of breakpoints

Added support for debugging native platforms
2021-08-31 15:17:58 +01: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
reduz
3682978aee Replace BIND_VMETHOD by new GDVIRTUAL syntax
* New syntax is type safe.
* New syntax allows for type safe virtuals in native extensions.
* New syntax permits extremely fast calling.

Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`.
These will require API rework on a separate PR as they work different than the rest of the functions.

Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
2021-08-22 08:23:58 -03:00
Jihyun Yu
1c61245990 Auto-reload scripts with external editor 2021-08-17 21:43:45 +09:00
Rémi Verschelde
cb8f045de8
Merge pull request #49650 from KoBeWi/FindReplaceCrash
Fix crash with FindReplaceBar
2021-06-24 19:21:01 +02:00