178 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
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
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
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
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
Anthony Leonardo Gracio
3db6ebc392 V316-005: Support incomplete results for LSP completion
Add needed bits to support LSP incomplete completion. Incomplete
completion lists does not list all the possible results for the
prefix that trigerred completion, thus needing a new request when
typing a new character.

Add an automatic test.

Change-Id: Ib1add94ac9e808af8be05fb2adac2ad3330a3cba
2022-03-29 11:06:31 +02:00
Anthony Leonardo Gracio
af4c8f2d41 Update copyright year
(no-tn-check)
(no-precommit-check)

Change-Id: Id71d3f84cd6ab219a37821da1460038f4eea525c
2022-01-03 15:09:31 +01:00
Vadim Godunko
c36d1cc87d U922-030 Remove use of libclang.
Change-Id: Ic771948d8e1bb86176e664e9795ef51dd4416b70
2021-10-19 21:49:29 +02:00
Andry Ogorodnik
bd66f79c64 UA04-044 Fix regression in the testsuite
Change-Id: I9ff16e423976af89dbb70af0d945bbce6f7ef35d
2021-10-07 11:49:08 +03:00
Andry Ogorodnik
a878b44e63 UA04-044 Fix 'access check failed' exception
Change-Id: I867c26e9df89c9e4a6a19e99a42050c9dcb659b4
2021-10-06 12:12:08 +02:00
Anthony Leonardo Gracio
b213ac187b U622-021: Support for LSP lazy completion
Add support for the completionItem/resolve request, which allows
to compute the 'detail' and 'documentation' completion item fields
lazily, when selection the items in the completion window.

Change-Id: I37a4a9a6df8b0d0641da11c450bfa39532252b76
2021-09-10 12:47:45 +02:00
Anthony Leonardo Gracio
a4b73b8006 U812-008: Add a new Start_Offset to completion context
And fix the issue with aliases completion, where we were proposing
aliases for dotted names.

An existing test has been adapted to cover this case.

Change-Id: I633da75e01482f4ac2eb8d8488270b333479eeea
2021-08-13 15:43:06 +02:00
Anthony Leonardo Gracio
b496a884f5 T727-021: Restore aliases completion with LSP
Aliases completion items are now available when LSP completion
is activated.

A new Get_Filter_Text function has been added to the completion API
for completion filtering: it avoids matching things in labels that
should not match (e.g: the '(alias)' suffix that is at the end of
alias completion items' labels).

An automatic test has been added.

Change-Id: I37e22cb774f6085b5d27c23c13a53580229a6e2a
2021-08-03 12:54:47 +02:00