Commit Graph

209 Commits

Author SHA1 Message Date
Nicolas Setton
0400c91a18 Remove unused uses of GNATCOLL.VFS
Change-Id: Id858888d77eb2448418b02b1349aa687e63aeabc
2015-05-14 20:49:23 +02:00
Emmanuel Briot
13ab4050fa Project Properties dialog can now be displayed for uneditable projects
O130-023

Change-Id: I4485026c90a962a13b2af1a30627abb1610b789e
2015-02-04 19:43:02 +01:00
Raphael Amiard
232b9746e9 Merging branch 'topic/libclang_tasking'
Change-Id: Ie0ab98553ae2d9b14b38cd6fcf7c32b692fa5d88
2015-02-02 13:29:42 +01:00
Emmanuel Briot
be098d1c4a Reorganize the Project Properties dialog
We no longer use a notebook (which might contain other notebooks for
instance in the switches or naming pages). Instead, we use a tree, as
we do in the preferences dialog.
Each page for the switches has its own entry in the tree. However,
wizards and the file setting editor still use a notebook for the
switches.
Rename and reorganize some of the pages in the Project Properties
dialog (splitting the largest pages when possible).

Move the Toolchain settings to a separate page in the Project Properties
Code moved from toolchains/ui to prj_viewer to avoid cyclic
dependency.
Disabling compilation for a language is no longer done in the list of
languages, but in the Toolchains page via a new checkbox.
When a language has an invalid compiler, the name of the language is no
longer highlighted in red in the list of languages.

O119-023 (1/2)

Change-Id: I6dd90f2f000bdf4fa1ab5093ff8a9e93643d55bd
2015-01-29 11:09:29 +01:00
Emmanuel Briot
fa7748c367 Update copyright notices to 2015
Change-Id: Ida4e6137317bd53ef0a556edffaafe4022c74e2a
2015-01-05 15:45:56 +01:00
Raphael Amiard
af57077669 libclang: Cosmetic and minor fixing phase
Adding comments everywhere, and wrapping every clang_* function into a
more idiomatic Ada name.

Change-Id: Ie03c906013e5331bcea2f9a108f9a6af16546f75
2014-12-10 15:30:47 +01:00
Raphael Amiard
ad77eb696a Libclang integration
- Add the base of the Translation_Unit cache API in Language.Libclang
- Add the first implementation of the libclang tree in
  Language.Libclang_Tree
- Extend libclang bindings

Change-Id: Ib767acaa81d2933fa0270b103b2133849150457a
2014-12-09 18:02:57 +01:00
Nicolas Setton
09efdb2fbf Initial revision for libclang completion
Change-Id: Ia79a4d0ba4b843717c4eea29f8e1083ef9cf0921
2014-12-09 18:02:55 +01:00
Emmanuel Briot
76f80aa5ba Add support for specifing object file extension for languages
The goal is to be able to set it to "-" for languages that have no
object files. This is used to avoid naming collisions when
GNATCOLL.Projects.Library_Files finds a ".*li" file and tries to
find which project it belongs to. For instance, the plugin unicode.py
had the result that the file unicode.ali in the xmlada install was
though to belong to the plugins.gpr project, and thus unicode.ali
was never returned, and thus its cross references never parsed.

This object file suffix can be set either in GPS plugins like
languages.py, or explicitly in project files, which was done here
so that gnatinspect is not confused.

N304-018

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@224037 936e1b1b-40f2-da11-902a-00137254ae57
2014-03-04 13:46:40 +00:00
Emmanuel Briot
ec8702349c Update copyright notices to 2014
N103-019

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@221487 936e1b1b-40f2-da11-902a-00137254ae57
2014-01-06 10:29:22 +00:00
Emmanuel Briot
18a9ac7d95 Remove traces.ads
This package was obsolete and replaced with GNATCOLL.Traces
Exceptions are now sent to "<name>.EXCEPTIONS" streams, and are
 always displayed in the testsuite.
Remove a number of exception handlers in gtk+ callbacks, which were
 no longer necessary since GtkAda has its own exception handlers.
M910-019

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@215445 936e1b1b-40f2-da11-902a-00137254ae57
2013-09-11 10:57:08 +00:00
Emmanuel Briot
5e977081b3 Remove Apply, OK and Cancel from the preferences dialog.
Instead, changes are now applied on the fly as soon as one of the
 settings is modified.
Remove design/tests/theme.1, since GPS themes are no longer used
 anyway.
M617-030

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/branches/global/gtk3/gps@211613 936e1b1b-40f2-da11-902a-00137254ae57
2013-06-18 18:17:45 +00:00
Automatic merge
4ca9cab486 Update copyright notice, merging changes from trunk.
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/branches/global/gtk3/gps@200408 936e1b1b-40f2-da11-902a-00137254ae57
2013-01-08 11:02:54 +00:00
Automatic merge
f31ab95e31 Merge changes from trunk.
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/branches/global/gtk3/gps@196565 936e1b1b-40f2-da11-902a-00137254ae57
2012-10-15 16:25:49 +00:00
Automatic merge
3036f93937 merging automatically changes 193641 to 193642
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/branches/global/gtk3/gps@193643 936e1b1b-40f2-da11-902a-00137254ae57
2012-08-24 12:36:21 +00:00
Nicolas Setton
67686b6e87 Make use of the simplified API for Combo_Box_Text.
L511-036.



git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/branches/global/gtk3/gps@191681 936e1b1b-40f2-da11-902a-00137254ae57
2012-07-03 10:24:54 +00:00
Arnaud Charlet
bc634b7c2d Replace Gtk_Combo by Gtk_Combo_Box.
Part of L511-036


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/branches/global/gtk3/gps@191541 936e1b1b-40f2-da11-902a-00137254ae57
2012-07-02 10:19:51 +00:00
Javier Miranda
14baeb4ada * src_editor/src/completion_module.adb
(Character_Added_Hook_Callback): Enable C/C++ completion when '(' is pressed.

* completion/core/src/completion-c-constructs_extractor.ads
(C_Completion_Proposal): Adding flags to the completion proposal to
 identify requests of completion with parameters.
(Get_Completion): overridden
(Get_Label): overridden
(To_Completion_Id): overridden

* completion/core/src/completion-c-constructs_extractor.adb
(Get_Completion_Root.Add_Proposal_With_Params): New subprogram.
(Get_Completion_Root.Add_Scope_Proposal): Skip entities associated with
 foreign languages.
(Get_Completion): Extended inherited functionality. Needed to handle
 functions with parameters and single parameters.
(Get_Label): Generate the label "<entity> without params" when the proposal
 requests the completion of the parameters of a subprogram call and the entity
 of the proposal has no parameters; generate the label "params of <entity>" when
 the proposal requests the completion with parameters and the entity of the
 proposal has parameters; otherwise generate the label "<entity>".
(To_Completion_Id): Extend identification of C_Completion_Proposals to
 avoid filtering proposals that have the same Name. Required because it
 is frequent to have arguments with the same name in different functions.

* cpp_module/src/cpp_semantic_tree.adb
(Parse_Expression_Backward.Handle_Token): Do not stop parsing if the
 first token is a left-parenthesis.

* kernel/src_info/entities.ads
Adding documentation.

For KA27-013

[C/C++] Adding smart completion of parameters

This patch extends the functionality of the smart completion of
C and C++ entities. For example, when dynamic smart completion
is enabled and the left parenthesis is entered in the buffer as
part of a function call, GPS suggests the automatic completion
of the parameters of the target functions.


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@189727 936e1b1b-40f2-da11-902a-00137254ae57
2012-05-18 08:16:03 +00:00
Javier Miranda
865d7c047a * completion/core/src/completion-c-constructs_extractor.adb
(Add_Scope_Proposals): Fix bug which added the same proposal several
 times to the list of proposals. This bug causes a crash when the
 second occurrence of a proposal is removed because its associated
 memory is already freed.

* cpp_module/src/cpp_semantic_tree.adb
(Handle_Token): Remove initialization of Stop to False because it
 causes missbehavior when trying to complete entities located at
 the beginning of a C/C++ file.

* language/src/language-cpp.adb
(Prev_Char): If we arrive to the beginning of the file then set
 the values of Index and Word_Begin appropriately to ensure that
 the scanner returns the whole text of the first word of the file.
(Scan): Incorporate the underscore as valid suffix of an identifier.
 Needed to propose proper completions of entities with Dynamic
 Smart Completion support enabled.

Part of KA27-013


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@187746 936e1b1b-40f2-da11-902a-00137254ae57
2012-03-28 19:21:51 +00:00
Javier Miranda
d5b1533a3d * cpp_module/src/cpp_semantic_tree.ads
* cpp_module/src/cpp_semantic_tree.adb
New files

* kernel/src_info/entities.adb
(Is_Container_Array): Adding C++ Class types

* completion/core/completion_core.gpr
Adding dependency on cpp_module

* language/src/language-cpp.ads
(Parse_Tokens_Backward): New overriding subprogram.
(Tok_xxx): New CPP tokens

* language/src/language-cpp.adb
(The_Keywords): New declaration
(Is_Keyword): New subprogram.
(Parse_Tokens_Backward): New overriding subprogram.

* src_editor/src/completion_module.adb
(Auto_Complete_Ada_Keyword): Disable this functionality if the buffer
 does not have an Ada source program.

Part of KA27-013


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@187131 936e1b1b-40f2-da11-902a-00137254ae57
2012-03-18 18:56:58 +00:00
Emmanuel Briot
8afbc32596 Update license to GPL version 3
Update copyright notice to 2012
KC20-002

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@182685 936e1b1b-40f2-da11-902a-00137254ae57
2011-12-20 09:35:10 +00:00
Javier Miranda
a7e8fcbc09 * cpp_module/src/cpp_module.adb
(Create_CPP_Handler): Do not launch c++filt subprocess.

* kernel/src_info/ali_parser.ads
(ALI_Handler_Record.Launch_Unmangle_Subprocess): New field.

* kernel/src_info/ali_parser.adb
(Create_Ali_Handler): Add default value of new field.
(CPP_Unmangled_Name): Handle lazy creation of the subprocess executing c++filt
(ALI_Handler_Record.Destroy): Terminate execution of c++filt subprocess.

* kernel/src/gps-kernel.adb
(Kernel_Handle_Record.Destroy): Enable call to remove the language handlers.

Part of K907-014
For KA27-015

[GPS] Launch c++filt lazily

This patch completes the initial implementation of navigation through
entities imported from C++ handling the creation of the c++filt in a
lazy manner (that is, the subprocess c++filt is now only launched if
required).


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@180755 936e1b1b-40f2-da11-902a-00137254ae57
2011-10-30 12:01:10 +00:00
Javier Miranda
28508da26a * cpp_module/src/cpp_module.adb
(Create_CPP_Handler): Disable temporarily launching the c++2filt
 subprocess

For KA25-015

----
date: 2011/10/27 13:11:54;  author: miranda;
Wrong ticket.
Correct ticket is KA27-015

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@180660 936e1b1b-40f2-da11-902a-00137254ae57
2011-10-27 12:51:14 +00:00
Javier Miranda
8cdff90d3b * cpp_module/src/cpp_module.adb
(Create_CPP_Handler): Incorporate in the C++ handler the id of the
 subprocess running c++filt (program used to unmangle C++ names).

* kernel/src_info/entities-queries.adb
(Recursive_LI_Information_Iterator.Next): Handle C++ files. These files
 were not properly handled because C and C++ share the LI handler.

* kernel/src_info/ali_parser.ads
(ALI_Handler_Record): Adding new field Unmangle_Pd.

* kernel/src_info/ali_parser.adb
(Create_ALI_Handler): Adding null initialization to the new field Unmangle_Pd
(CPP_Unmangled_Name): New subprogram which invokes the process executing
 c++filt and returns the unmangled name of a C++ mangled name.
(Process_Entity_Ref): Handle references of entities imported from C++

* language/src/language-cpp.ad[sb]
(Entities_Indexed): Primitive overridden to return True and thus activate
 the support for indexing C++ entities in the trie database.

* language/src/language-c.ads
(Entities_Indexed): Complete documentation.

For K907-014

[GPS] GPS 5.2: navigate across language boundary (C++)

This patch incorporates support for navigating in Ada sources
through entities imported from C++. This new feature relies on
the availability of the GNU Binary Utility c++filt to provide
its functionality.

Restriction: Navigation through C++ constructors not supported.


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@180629 936e1b1b-40f2-da11-902a-00137254ae57
2011-10-26 18:24:17 +00:00
Javier Miranda
d47aa974e6 * completion/ui/completion_ui.gpr
Remove useless dependency on project "gvd"

* cpp_module/cpp_module.gpr
Remove useless dependency on project "kernel"

Found working in I401-027


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@178236 936e1b1b-40f2-da11-902a-00137254ae57
2011-09-06 12:01:33 +00:00