122 Commits

Author SHA1 Message Date
Vadim Godunko
70b4e6f3d1 Reformat code with black. 2024-06-06 12:20:22 +00:00
Anthony Leonardo Gracio
3f360e10d1 VC16-002: Update ada_expansion.py plugin
And move it to share/library, so that users can try it out.

Change-Id: I6e198c0de1d666a654ebb3b02602ca5b193a8a1c
2022-12-20 14:11:43 +00:00
Adrien Boulanger
f5516b4a78 TB09-023: Manual transition to stabilize the testsuite via ancr
update configure for python3
pep8 has been replaced by pycodestyle

(no-precommit-check)

Change-Id: I062cc4cbb23de5a6a60d8d6ea1be9179c3d604a4
2021-03-03 17:33:43 +01:00
Andry Ogorodnik
dd3818d52b S904-001 Rename gps_utils to gs_utils
(no-precommit-check)

Change-Id: Ic42384a1ec7a570ed397a29be42d155b875c6b48
2019-11-04 11:20:21 +01:00
Anthony Leonardo Gracio
b571ffe879 S904-003: Rename .gps directory and keys6.xml file
And add a mechanism to copy the old .gps directory to .gnatstudio
the first time. Rename keys6.xml to keys.xml when importing the old
.gpr directory.

Change-Id: I1e1ea2c123ae772a547561737e2309d4c081f239
2019-09-11 18:41:03 +02:00
Nicolas Roche
52ce0edb86 Ensure examples do conform to pep8 and pyflakes
Change-Id: I767f41b0dd7eeae605b175165fff3bb0c235557f
2017-06-27 15:37:18 +02:00
Nicolas Roche
0dbfc04918 Conform to pep8 and pyflakes
Change-Id: If3a1aa9f0509c98f408673ed645d29ac009b2f82
2017-06-26 19:51:50 +01:00
Vadim Godunko
51cdf9c2c0 O916-003 Remove obsolete example.
Change-Id: I876adccc14ecd8e09b28e17d543edaff01046e97
2015-09-17 19:43:01 +02:00
Nicolas Setton
8b424f39dd Fix spelling of "overridden"
Reported by Patrick Gautschi under O727-014.

Change-Id: I269bd8184aa36bac16faa4566c7ab9252d66130d
2015-07-28 13:13:06 -04:00
Raphael Amiard
d259c0f1a9 GPS: Related to MC18-025 : Transform all calls to EditorLocation
constructor to calls to EditorBuffer.at.

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@221063 936e1b1b-40f2-da11-902a-00137254ae57
2013-12-18 15:17:39 +00:00
Jerome Lambourg
e197b3cfa5 Make use of the Primary_Mod_Mask for OS-independant default modifier.
Replace almost everywhere Control_Mask by Primary_Mod_Mask, or "control-*" by
"primary-*"

* common/ui/gui_utils.adb:
Replace the specific support for the cmd key with the more general support of
primary modifier key.

For MA25-032

git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@218216 936e1b1b-40f2-da11-902a-00137254ae57
2013-10-29 06:48:47 +00:00
Emmanuel Briot
5949ef8144 Update doc, remove references to pygtk
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/branches/global/gtk3/gps@191818 936e1b1b-40f2-da11-902a-00137254ae57
2012-07-05 07:57:46 +00:00
Arnaud Charlet
0909d7346d Add another example of making lines read only, based on matteo's gms.py
from K401-001.
Part of K428-015


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@172941 936e1b1b-40f2-da11-902a-00137254ae57
2011-04-29 09:16:20 +00:00
Arnaud Charlet
e3d2caf811 Minor code clean up/comment update.
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@152065 936e1b1b-40f2-da11-902a-00137254ae57
2009-11-10 14:57:06 +00:00
Arnaud Charlet
d703e6bfed Add example on how to set preferences automatically.
Part of IA13-037


git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@150768 936e1b1b-40f2-da11-902a-00137254ae57
2009-10-14 06:25:45 +00:00
Arnaud Charlet
05dcf39f58 Remove redundant line
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@148241 936e1b1b-40f2-da11-902a-00137254ae57
2009-08-11 12:49:35 +00:00
Nicolas Setton
419622bf2b Adapt to name of preference "Ada-Align-Decl-On_Colon".
For I804-022.



git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@148068 936e1b1b-40f2-da11-902a-00137254ae57
2009-08-05 08:57:14 +00:00
Arnaud Charlet
a48e999811 Move tab_expansion.py from examples to library.
Modify it so that it works with latest GPS version: apparently it's no
 longer possible to bind the same key twice for two different contexts,
 so we can only support Ada files for now.
Part of I119-037


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@136079 936e1b1b-40f2-da11-902a-00137254ae57
2009-01-23 10:50:08 +00:00
Jerome Lambourg
30f6902681 * tags.css:
Add missing styles.

* docgen.jpg:
Add an example of docgen output.

* gps.texi:
Add a more complete description of the default tags, as well as an example.

* doc.py:
Adapt this example to the new docgen module.

* docgen_base_tags.py:
Improve display of parameters.

Minor corrections and documentation completion for HB07-009




git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@132507 936e1b1b-40f2-da11-902a-00137254ae57
2008-11-19 13:08:20 +00:00
Pascal Obry
9478d269f2 Fix file permissions.
git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@131475 936e1b1b-40f2-da11-902a-00137254ae57
2008-10-25 14:18:11 +00:00
Emmanuel Briot
826c757a9c (highlighter.py): new python plugin to support other plugins. This
provide an easy way to highlight regular expressions in editors
 without duplicating possibly tricky code.
("character_added" hook): also called when a character has been removed
 (it seems that a script using this hook is interesting in both kind
 of changes anyway, and for backward compatibility with we want to keep
 this hook anyway -- the character added is considered to be control-h (8)
 in such a case)
remove obsolete examples as a result

git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@131361 936e1b1b-40f2-da11-902a-00137254ae57
2008-10-22 22:27:47 +00:00
Jerome Lambourg
7bb9da1c50 Corrections to make this script generate correct links
on Windows.
Part of GC19-017


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@128578 936e1b1b-40f2-da11-902a-00137254ae57
2008-09-11 16:18:57 +00:00
Jerome Lambourg
9eaf957f69 Better layout for generated indexes.
Part of GC19-017


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@128364 936e1b1b-40f2-da11-902a-00137254ae57
2008-09-05 10:04:18 +00:00
Jerome Lambourg
4d33252208 * navbutton.tmpl:
New template handling global indexes links. This allows easier custom index
 creation.

* navigation.tmpl:
Use navbutton for handling global indexes links. This allows easier custom
 index creation.

* docgen.js:
h3 tags are now shown by default.

* userdef.tmpl:
New template for user-defined index creation.

* docgen2-entities.adb:
(EInfo_Free): Do not free the E_Info lists, as all entity_info are freed now
 directly from the global einfo_map.
(Free*): Adapt to the new way of freeing E_Info objects.

* docgen2-entities.ads:
(Free): Remove obsolete. Add a new Free procedure for Entity_Info_Map maps.

* docgen2-hooks.adb:
Remove this package, as we don't use hooks anymore, but python class instead.

* docgen2-hooks.ads:
Remove this package, as we don't use hooks anymore, but python class instead.

* docgen2-scripts.adb:
New package handling GPS.Docgen and GPS.DocgenTagHandler python classes.

* docgen2-scripts.ads:
New package handling GPS.Docgen and GPS.DocgenTagHandler python classes.

* docgen2-tags.adb:
Major reorganisation, so that comment tags are analysed just after the global
 entity_info database is built, but before the on_exit callbacks are called.

* docgen2-tags.ads:
(Analyse_Comments): Do not analyse all comments at once, as we now need to have
 the attached entity informations for user tag callback purpose.
(To_String): Now that the complete analysis is done in Analyse_Comments, we
 just need to retrieve the raw block in this method.
(Comment_Type): Remove the XML tree, as this is now only used locally in
 Analyse_Comment.

* docgen2.adb:
Major reformatting of the code: simplify most procedure calls and structure
 contents, to make sure that datas are kept coherent. Re-order the way we
 generate some informations in the doc, so that we can safely call the
 user's callbacks when appropriate.
Add support for user-defined tag handlers.

* docgen2.ads:
(Docgen_Options): Remove the Keep_Formatting field, not modifiable anyway,
 and also remove the User_Tags fields, now much better handled via python
 GPS.Docgen class.
(Docgen_Object, Get_Kernel, Get_Backend, Get_Options, Get_Doc_Directory,
 Get_Current_File): New methods and objects to allow better data sharing
 between the different parts of the docgen module.

* docgen2_backend-html.adb:
(Get_Template): Adapt to Template_Kind modifications.
(Filter): Use the method in String_Utils.

* docgen2_backend.ads:
(Tmpl_TOC): Remove, obsoleted with previous check-ins
(Tmpl_User_Defined_File): New template for user generated index files.

* docgen2_module.adb:
(Docgen_Module_Record, Get_Tags, On_Preferences_Changed): Remove
 User_Tags_List, now unused.
(Register_Commands): Register the commands defined in Docgen2.Scripts.
(Register_Module): Remove User_Tags_List initialisation, remove call to
 obsolete Docgen2.Hooks.

* docgen_gtkada.py:
Add example for user tag handling. This example allows documentation of some
 of the GtkAda tags.

* shell_commands.xml:
(docgen_start_hook, docgen_fiinished_hook, docgen_user_tag_action_hook):
 Remove documentation for those already obsolete hooks.
(GPS.Docgen*): Add documentation for the new GPS.Docgen and
 GPS.DocgenTagHandler classes.

Remove the docgen hooks, and replace by a python class which is much more
 easier and powerful to manipulate.
Correct also H901-008: the CR/LF problem in annotated sources, the default
 expansion in the API pages, and the comments are now keeping the original
 layout when appropriate (no user tag).
Part of GC19-017




git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@128359 936e1b1b-40f2-da11-902a-00137254ae57
2008-09-05 08:23:26 +00:00
Arnaud Charlet
f8faa992a8 Move autoformat, predef_ada_entity_interstions, save_on_compile from
examples/python to share/libary.
Move align.py from library to plug-ins.
Part of H103-005
Minor reformatting.


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@126716 936e1b1b-40f2-da11-902a-00137254ae57
2008-07-15 09:05:33 +00:00