49 Commits

Author SHA1 Message Date
Vadim Godunko
efcc8e4994 Add dependency from vss_os.gpr 2025-07-31 04:09:13 +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
edee8a72b3 Fix DnD not opening files on windows
Use LSP.URIs API and avoid Glib.Convert.

eng/ide/gnatstudio#155
2023-11-20 10:13:03 +00:00
Maxim Reznik
10f667472a TC17-027 Use Spawn to launch HTML browser
to avoid breaking the PATH. Replace GPS.Environments with
Spawn.Environments.

Change-Id: I5ae6b0033e5e7b06445ba339f0014f9a0797b096
2021-11-05 09:59:19 +00:00
Vadim Godunko
c36d1cc87d U922-030 Remove use of libclang.
Change-Id: Ic771948d8e1bb86176e664e9795ef51dd4416b70
2021-10-19 21:49:29 +02:00
Nicolas Setton
90bb28354a Add bits to silence gpr warning about Python file
no-tn-check

Change-Id: Icea7f94de6042e380352fda4777ad929c0394d8b
2020-10-19 10:52:55 +02:00
Nicolas Setton
91ec7bd1f5 T921-005 Refine language server hook
Add parameters to the language_server_response_processed hook
so that clients can know which method, if any, was associated
to the response.

Use this to implement an utility wait_language_server that we
can use in testsuite drivers to wait for a response for the
right method: this is much safer than waiting for "any response"
and fiddle with timeouts in hope for the right one.

Use wait_language_server to stabilise some LSP tests.

(kernel.gpr): add Python to the sources list, since this contains
 hook.py

Rename the "data" parameter of language_server_response_processed
to "contents", since hooks.py generates code which uses a "Data"
variable which is sent to the callback instead of the real "data".

Change-Id: Ie5f96ff897ca8980784a19e407607e843f630430
2020-09-23 10:07:39 +02:00
Adrien Boulanger
eb597b74ce S405-039: Separate emblems for light and dark themes
Add new emblems for dark themes.
We want the 's' of spec to adapt to the theme color, however this
can't be done via Gtk's CSS and we don't want to use -symbolic
because we need to preserve the others colors.

Change-Id: I55b30163ba9c24017b2abe2ef77979bba53a6162
2019-07-02 10:26:08 +02:00
Nicolas Setton
2050bb66c0 Remove dependency on gnatcoll_gtk.gpr
First step to remove the GNATCOLL dependency on GtkAda: move
here the necessary bits.

For Q727-014


Change-Id: Id59682c672538b33544661204726f148a0c357d7
2017-07-28 16:55:34 +02:00
Andry Ogorodnik
a6dbc5e8a7 PB02-019 (1/3) Correcting for Documentation_Dir attribute
Also obsolete attribute was removed from IDE package

Change-Id: I432e142960d5f2398db9e88e305473afebcaeea3
2016-11-11 17:48:01 +01:00
Nicolas Setton
5177ac1d61 Rearrange projects and switches
... to make sure that gps_cli and gnatdoc can be invoked without
having to set LD_LIBRARY_PATH or use a wrapper.

(Makefile.in): make clean should also clean up in cli.
(cli/Makefile): add target 'clean'

(cli/cli.gpr): do not import Shared linker switches, not needed,
 and unnecessarily drag the clang dll.

Move the import of libclang from kernel_core to kernel.

Move the gtk+ C switches from shared.gpr to widgets.gpr, since
they are only useful there.

For O924-012.

Change-Id: Id0df3473d968d1f539886f3041cd6c64e11a1e06
2015-09-30 12:30:10 -04:00
Nicolas Setton
06a4fd6399 Transition gnatcoll out of the GPS build dir
No longer invoke recursively the GNATcoll configure,
no longer expect GNATcoll to be under gnatlib,
and expect GNATcoll projects to be found on the
standard project search paths.

For O827-030.

Change-Id: I9a271d288124ef8d9b2e296502b03096c08c00a4
2015-09-21 10:54:19 -04:00
Emmanuel Briot
aa72569e20 Generate code to support the hooks system
Most of the complex manual code to encode and decode python
parameters is now automatically generated. The API was in fact
simplified too, so that even the generated code is much simpler
than before.

This fixes a number of inconsistencies in our hooks, between
the doc that could be missing some parameters, or even in the way
some hooks were exported to python. For instance, compilation_finished
would export 5 parameters (category, target, mode, status), but
expect 7 when GPS.Hook.run() was called from python (which was never
done in our own plug-ins).

This also removes support for creating custom hook types from python.
This was never used in any of our plug-ins (only in tests), and complexifies
the implementation significantly.

Improve error messages for hooks, since we can more systematically
catch Ada and python exceptions.

(modules.py): do not support adding to the gps_started hook anymore. The
 proper alternative is to override setup(). Otherwise, when GPS calls
 gps_started, the local gps_started callback is added to the end of the
 callback queue, and will be run after the test's exit() function (in
 some tests like IA27_014), which might result in exceptions. It seems
 we had a problem before: running a hook would do a local copy of the list
 of callbacks, so any callback added during the run was not run; as a
 result, it is possible that the gps_started() functions from modules.py
 were not called properly. We no longer make this temporary copy
 (for efficiency)

Kernel.Open_Files is now implemented as a sorted set, instead of an array
 of Virtual_File. This provides a more efficient Contains operation. But
 we still need a specific sort order so that GC14_007 passes

M109-019 (1/2)

Change-Id: I1853c0a82b32c220d19da16e650953261d067630
2015-07-24 11:25:10 +02:00
Nicolas Setton
539b454a46 Fix location of shared.gpr
Change-Id: I9c24290abbc758c82fe8e2593f6c8c8cf4d47d9d
2014-09-12 11:44:45 -04:00
Nicolas Setton
930c4cf313 Cleanup: delete docgen2 and gnat.gpr
This is all dead code: docgen2 is now replaced by gnatdoc, and gnat.gpr
no longer contains any sources.
Adjust project files accordingly.

Change-Id: I2c56f27db9d6dd95057b417756bfbcef99cb0358
2014-09-11 16:46:39 -04:00
Emmanuel Briot
af07b410e5 Move the definition of menus from Ada to an XML file.
This gives better control on the order of menus, as well as open
 the way to moving the menus to application windows.
MA18-041

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@218586 936e1b1b-40f2-da11-902a-00137254ae57
2013-11-06 14:30:55 +00:00
Maxim Reznik
bc0bddf9f9 Fix 'with' clause for M227-043
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@215555 936e1b1b-40f2-da11-902a-00137254ae57
2013-09-12 12:54:45 +00:00
Nicolas Setton
a8529233a2 Add dependency on "gnatcoll_sqlite", which contains GNATCOLL.Xref.
L530-025.


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@190842 936e1b1b-40f2-da11-902a-00137254ae57
2012-06-13 12:52:14 +00:00
Nicolas Setton
fd0bb0f170 Add gnatcoll project containing the xref database.
Install the gnatinspect program, which will be used to
generate and update the database.
L530-025.


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@190623 936e1b1b-40f2-da11-902a-00137254ae57
2012-06-08 09:54:29 +00:00
Jerome Lambourg
e28bf85d64 * kernel.gpr:
Add dependency on Toolchains_Editor/Core

* gps-kernel.ads:
(Get_Toolchains_Manager, Set_Toolchains_Manager): New.

* toolchains.adb:
(Compute_Gprconfig_Compilers): Handle cases where the tools in the specified
 toolchain are not first on PATH. Handle the change of tools representation.
(Get_Command): Handle change of tool representation.
(Add_Compiler): Initialize the Base_Name attribute of the compiler. Better
 handling of user-defined compilers in a toolchain.
(Set_Compiler): Simplify now that Add_Compiler is handling user-defined
 compilers. Factorizes code between Add_Compiler and Set_Compiler.
(Is_Defined, Is_Base_Name): New.
(Is_Default): Correctly returns false when no compiler exist.
(Set_Command): Take care of the new fields and internal tools representation
 modifications.
(*): Handle internal tools representation modifications.
(Copy, Free): Simplify, now that tools are no more represented by string_access
(Get_Toolchain): Simplify and strengthen the handling of compilers retrieved
 from a project by using a temporary toolchain.
(Get_Native_Toolchain): Modify according to the change of profile for
 Set_Command.

* toolchains.ads:
(Get_Command): Slight change of profile to only accept valid tools.
(Set_Command): Add parameters for finer control over the command's origin and
 wether it needs to be saved in project files or not.
(Is_Defined, Is_Base_Name): New.
Modify private types to allow better control on what's the origin of a tool and
 wether it needs saving.

* toolchains_core.gpr:
Remove useless dependency over kernel

* toolchains_editor.adb:
(Create_Language_Page): Move global toolchains manager to kernel.
(Generate_Project): Factorize code, finer-grained handling of tools and
 compilers. In particular, save the tools/compilers when a full path is
 defined for them.
(On_Add_Click): Change according to Set_Command API change.
(On_Server_Changed): Reinitialize the kernel's manager.
(Register_Module): Properly initialize the kernel's manager.

Implement a finer-grained Is_Default handling, and the corresponding saved
 project.
Also moves Manager to the kernel for preparing JA05-018

For JA05-027




git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@165504 936e1b1b-40f2-da11-902a-00137254ae57
2010-10-06 12:36:02 +00:00
Arnaud Charlet
681642da8f Remove limited with and move non gui packages to kernel_core.gpr
(kernel/src_info, to be renamed kernel/core/src later).
Split gps-kernel-properties into gps-properties and gps-kernel-properties
Part of IA26-021


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@161661 936e1b1b-40f2-da11-902a-00137254ae57
2010-06-28 12:27:57 +00:00
Emmanuel Briot
80bf316b8f Set all Object_Dir and Library_Dir attributes in projects from the value in
gnatcoll_shared.gpr
This is for convenience when working with multiple branches in git:
 by changing the value (in a single place) on each branch, we can keep
 the build tree for each branch, and avoid extra recompilation when
 changing branches. For instance, one can set Object_Dir and Library_Dir
 to the following value in gnatcoll_shared.gpr (not checked in):
    for Object_Dir use "obj/" & External ("GIT_BRANCH", "");
    for Library_Dir use "lib/" & External ("GIT_BRANCH", "");
 provided the environment variable GIT_BRANCH is set automatically every
 time you change the branch (that's under control of the shell)

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@160904 936e1b1b-40f2-da11-902a-00137254ae57
2010-06-08 10:45:36 +00:00
Emmanuel Briot
2fe7057b56 (Extract Subprogram): move the code to compute the entities involved in
the refactoring into refactoring-services.
 This provides better reuse
This check in also includes an attempt at fixing project dependencies, so
 that refactoring_core is independent of GtkAda, but that requires more
 work in the kernel (see comment in kernel.gpr, which for now uses a
 limited with). That will be fixed as part of IA26-021

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@160827 936e1b1b-40f2-da11-902a-00137254ae57
2010-06-07 15:48:00 +00:00
Quentin Ochem
0e35d10f17 Moved all language packages from common to the language module.
For IA26-023.


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@155635 936e1b1b-40f2-da11-902a-00137254ae57
2010-01-22 15:05:10 +00:00
Pascal Obry
a06083dbdb Fix permissions
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@152738 936e1b1b-40f2-da11-902a-00137254ae57
2009-11-23 20:11:05 +00:00