633 Commits

Author SHA1 Message Date
Anthony Leonardo Gracio
11672bc929 Update copyright year for GS sources
(no-issue-check)
2026-01-05 12:41:13 +00:00
Boulanger
720b78a283 Revamp Do_Not_Move_Cursor
- Change the type to Integer to refcount it when its frozen
  multiple times.
- Update the documentation: the cursor can move but we are not
  emitting cursor movements notifications.
- Remove LSP pref, disabling it is only slowing the process
2025-11-28 16:34:13 +00:00
Boulanger
6180cd36b7 Improve TextEdits performance
- Merge the concept of Avoid_Move_Cursor and Freeze_Cursor.
- Compute minimal edits only if for the TextEdits affecting a
cursor
- Freeze the cursor when applying TextEdits
- Fix condition in completion window where we are deleting the
window and then trying to access it.
- Fix wrong preference name in test (it was the same by default
for C++)

Closes eng/ide/gnatstudio#582
2025-11-28 16:34:13 +00:00
Vadim Godunko
29661563eb Replace String_Access by Virtual_String 2025-04-25 13:53:38 +00:00
Nicolas Setton
8ca702097b Add workarounds for coverage support
Provide bodies for some expression functions, and exclude some units
from coverage, to work around some gnatcoverage issues.
2025-04-25 09:42:14 +00:00
Boulanger
ef9ae149b0 Previous escape text was set too low.
The ALS can send a mix of markup and escape text, we should not
escape it a second time. At this point assume the providers are
sending proper text and don't escape it.

Add an escape at the python level for jedi

For eng/ide/gnatstudio#393
2024-11-07 13:42:04 +00:00
Boulanger
893bd3a3af Missing markup escape for completion documentation
Add a test.

Closes eng/ide/gnatstudio#393
2024-10-10 18:06:24 +02:00
Boulanger
585bd013c6 Defensive code for completion
Closes eng/ide/gnatstudio#344
2024-08-20 13:20:32 +00:00
Boulanger
ea4c9d139a Filter pretty print preferences depending on the engine
Rename Ident_Casing into Identifier_Casing because it was
to close to Indent_Casing.

Include a test.

Closes eng/ide/gnatstudio#140
2024-07-17 13:07:24 +00:00
Anthony Leonardo Gracio
cbce3dd1e5 Do not try to merge completion proposals with same text
This was useful before but now that accepting completion
proposals can execute different commands (i.e: auto-import
of missing with-clause), we can't merge the completion proposals
with the same text anymore.

For eng/ide/ada_language_server#1159
2024-06-06 08:57:32 +00:00
Anthony Leonardo Gracio
7c1ba23818 Revert "Merge branch 'topic/gs_56_bookmark_leaking_buffer' into 'master'"
This reverts merge request !195
2023-09-08 10:59:06 +00:00
Boulanger
64ac98f85a Remove Open_Buffer from Editor_Buffer_Factory
Opening a buffer without a view leaves the responsibility to the
caller to close the buffer manually.
=> this is unsafe: either we are closing a buffer shared
somewhere else or forgetting to close it (= leaking it)

The solution is to always use Buffer_Holder.
2023-09-07 11:37:05 +02:00
Adrien Boulanger
4d9d58a0e1 W228-019: Remove redundant parentheses
Found by -gnatyz
2023-02-28 16:36:38 +01:00
Anthony Leonardo Gracio
a5fc557bf0 Make all the completion managers refuse computing completion
from comments or strings.

We still keep the capability to change that in the future, in
case we want to provide some specifc completion providers for
strings and/or comments.

Closes eng/ide/ada_language_server#1111
2023-02-16 14:25:12 +00:00
Anthony Leonardo Gracio
41c30ab309 Update copyright year (no-tn-check)
Change-Id: Ie2cf22f9729f30d2228572a7296c23889be4c563
2023-01-03 11:39:28 +01:00
Anthony Leonardo Gracio
8ec170b0c9 VB24-012: Make sure to display doc for all items
Change-Id: I2c0040214bf9e7735e757c118954db422dbd5ebd
2022-12-20 14:14:14 +00:00
Andry Ogorodnik
8b9ffc9a93 VC02-006 Defensive code has been added.
To avoid fatal errors with GNAT Studio crashes in completions.

Change-Id: I71342aad47559fee66d330e9cf865073b9b362dd
2022-12-08 12:19:56 +00:00
Anthony Leonardo Gracio
4328110162 VB24-015: Don't propose aliases completion in strings
Add an automatic test for this.

Change-Id: I643d5487d7a39adbdba100b4fc11bcd2033c27f6
2022-11-30 16:53:21 +00:00
Anthony Leonardo Gracio
ab3050ad73 VB24-015: Avoid aliases completion within comments
Add an automatic test for this.

Change-Id: Ia6bf806b8366cf0338c308d12682e2cd2629cb16
2022-11-29 10:36:45 +01:00
Adrien Boulanger
9221bac825 V803-020: Add CompletionItem's textEdit support
The current completion was only inserting at the prefix or
replacing the prefix.
However, the LSP request can ask the client to delete more than
the prefix when using CompletionItem's textEdit.

Adapt test

Change-Id: If57ab2a09a3e569d1bf51fcfb4f6912afce11dfe
2022-08-31 11:30:09 +02:00
Anthony Leonardo Gracio
280f7cd3f2 Fix dev build
(no-tn-check)

Change-Id: Ia09332fbd68f2610bf2d0f703b9750e7fbaf81cb
2022-04-18 09:19:45 +00:00
Adrien Boulanger
1804f192f3 S712-022: Fix over-referenced Python object by Ada
Add free for Callback_Data/Subprogram_Type/List_Instances
Fix ownership transfer issue for Monitored_Command.
Fix over-referenced on widget by python (Editor_Overlay)

Add a test.

Change-Id: I5f6447e37928535f2b7085bcd1b102ee28e31c33
2022-03-31 12:34:25 +00:00
Anthony Leonardo Gracio
205ab5980b V325-032: Always hide computing iter after inserting proposals
Add an automatic test for this.

Change-Id: I7487ca721b0ce3a3afef89d5e4389969a949c9a3
2022-03-31 08:56:51 +00:00
Anthony Leonardo Gracio
c945d65018 Revert "Revert "V316-005: Support incomplete results for LSP completion""
This reverts commit f53fab3f29.

Change-Id: Ib8b88d6b8ee47775c186e0b78cdc395dd377d23e
Depends-On: I0c3010369b0eebffc7f3732511391bab5d40884c
2022-03-30 09:35:12 +00:00
Anthony Leonardo Gracio
f53fab3f29 Revert "V316-005: Support incomplete results for LSP completion"
This reverts commit 3db6ebc392.

Reason for revert: We need to adapt GB first

Change-Id: I4acb29299a3e0cdde79462404a899136975e5e01
2022-03-29 15:46:35 +00:00