253 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
Anthony Leonardo Gracio
8413306af2 Remove unused code after Project Properties removal
For eng/ide/gnatstudio#569
2025-11-17 10:54:10 +00:00
Boulanger
9acb839117 Revamp the source editor formatting provider
Create one for the construct engine and put it as the same level
as the LSP one. Both providers are supporting two requests:
OnTypeFormatting and OnRangeFormatting. There is no more concept
of indent vs format: these are internal settings/preferences
inside the providers.

Create preferences to choose the provider for each requests.
Create a preference to not move the cursor during formatting.

For eng/ide/gnatstudio#522
2025-05-14 11:30:03 +02: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
41c30ab309 Update copyright year (no-tn-check)
Change-Id: Ie2cf22f9729f30d2228572a7296c23889be4c563
2023-01-03 11:39:28 +01:00
Nicolas Setton
8dfb192a3b T730-041 Add support for '//' for C comments
Add a preference to control this.
Add a test.

Change-Id: I8ce18806cc7c4f0c9c663af3353cf8d787582950
2022-01-05 11:18:48 +00: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
e2e60670f3 U609-029 Indent selection.
- autoindent* actions renamed to format* to follow actual
  functionality that they do, corresponding changes in menu,
  key shortcuts etc.

- added 'indent selection' action that only indent
  current line/selection

- added 'Action on new line' preference for C/CPP to control
  whether we do formatting or indenting when a new line has
  been added.

- corresponding changes in tests

no-precommit-check

Change-Id: I245f1fa7dc6190c7e39bdced6fdba83d5f0356c1
2021-06-24 18:21:43 +02:00
Andry Ogorodnik
9117d07251 U115-025 clangd formatting options file.
Placing clangd formatting options file into top source directory
 (clangd-format looks for it here).

Correcting file updating when preferences are changed.

New test has been added to test the fact that all preferences are
 taken into account by clangd and work properly.

Change-Id: I86e566b1ac3697dcc3338b365f5d52430f8099e0
2021-01-19 16:54:03 +02:00
Andry Ogorodnik
ad835ae6c6 TC09-020 Create .clang-format for clangd.
Change-Id: I3aa3056eca18b4576553725bba9e1305a1e628b8
2021-01-13 14:55:14 +01:00
Anthony Leonardo Gracio
63c2e9d9c9 Update copyright year
(no-tn-check)
(no-precommit-check)

Change-Id: I50abdaba131d76d914f1df9a53f013ec8f48ca68
2021-01-11 17:22:37 +01:00
Andry Ogorodnik
d9993c6c21 S903-025 Rename GPS to GNAT Studio in comments, strings
Depends-On: If8db363de9c59b395772b715a838e3a785b568d7
Change-Id: I509eebd12037a49e0ff751220c7f6911b7480694
2020-10-28 12:03:44 +01:00
Nicolas Setton
42a9cfd556 T430-047 Register standard C++ extensions
Recognize extra extensions for the C++ language. This allows
navigation to open external C++ includes that use these extensions,
highlight these files with the C++ highlighter, and enables
navigation within those files.

This allows to support using the boost project without
having to create a .gpr file just to recognize the .hpp
extensions.


Change-Id: Idf54d37b17894ae961ac0c7d159810067c267344
2020-05-07 15:20:33 +02:00
Andry Ogorodnik
57986a24b3 R910-034 Support textDocument/rangeFormatting
Formatting selected range of code.

Change-Id: Ib7184eb2db6169e82aa4071550a9b21122d943ff
2020-04-28 18:16:35 +02:00
Anthony Leonardo Gracio
3280b48faf T302-003: Be able to disable libclang completely
Change-Id: I006d1dad15cf53178cd6dd5b1f7c58d6bf13abf8
2020-03-11 11:07:04 +01:00
Adrien Boulanger
4f4904c818 Update Copyright 2019 => 2020.
(no-tn-check)

Change-Id: I7b854142151c6fc934c80c14dbe085e8bc7f6bb7
2020-01-07 10:45:26 +01:00
Adrien Boulanger
ce63644601 SB07-008: Fix tabulations preferences in editors
The preferences related to tabulations in editors were assuming
tab = 8 spaces which is wrong. Correctly use the indentation
level set by the user.

Add pango to modify the way the tabs are represented.

Disable C indent preference by default to have an uniform
behavior between version (the preference was doing nothing
in most of the case)

Add a test.

Change-Id: I33dc589bda5e8af0ec9a1ba7a4fa3a14cc6cc912
2020-01-06 10:03:25 +01:00
Nicolas Setton
d39a93eff9 S904-002 replace GPS by GNAT Studio in file headers
Change-Id: Icee628af75e0f1bd471a627c987b8024d999eb4b
2019-09-09 12:39:04 +02:00
Vadim Godunko
ac8ea09066 S709-021 Cleanup from pragma Warnings (Off).
Change-Id: I0bc913375d85a15ad2b70c3712c76047bca33c90
2019-07-30 18:08:42 +02:00
Vadim Godunko
20567d607c S603-050 Remove use of anonymous access type for return value
Change-Id: I4debf1b143e221caa8171c4a65f3fc670cbdc2fe
2019-06-05 19:04:29 +02:00
Adrien Boulanger
7ec7389ab9 S225-041: Synchronize the definition of a block.
The definition of a foldable block should be the same than the
highlighted block. 

The only block foldable in C are Compound and if Statement.

Change-Id: Iba0eb911ca05092ef02e97fe1d4f56fc21e8a6ca
2019-03-05 18:31:22 +01:00
Vadim Godunko
fcdc828109 S211-047 Remove use of local objects of anonymous access types.
Change-Id: Ic4e7b3093c207fda6d51053eb8a08695ce950a4b
2019-02-19 22:16:58 +03:00
Anthony Leonardo Gracio
22cf269538 Update copyright year
(no-tn-check)

Change-Id: I27c5f49b41225d056dbc326411dd77b9516a766b
2019-01-03 16:37:00 +01:00
Andry Ogorodnik
e09a6c2e21 R126-010 Properties/Traces has been added
Change-Id: Ief2494f6e619d6466e6050d928f328fd192bd134
2018-02-14 11:26:14 +01:00