Commit Graph

108 Commits

Author SHA1 Message Date
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
Arnaud Charlet
55d72b6f51 Improve plug-in to save contents in project's object dir.
Part of H103-005


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@125620 936e1b1b-40f2-da11-902a-00137254ae57
2008-06-13 07:47:19 +00:00
Arnaud Charlet
11375b2153 Only use one top level contextual menu to avoid polluting contextual menu too
much.
Put in standard plug-in format.
Part of H103-005


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@125619 936e1b1b-40f2-da11-902a-00137254ae57
2008-06-13 07:46:16 +00:00
Arnaud Charlet
93a6dc2a92 Minor editing.
Part of H103-005


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@125596 936e1b1b-40f2-da11-902a-00137254ae57
2008-06-12 13:58:03 +00:00
Florian Villoing
525d0fffdd Update to new GPS python API.
git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@125507 936e1b1b-40f2-da11-902a-00137254ae57
2008-06-10 13:09:21 +00:00
Emmanuel Briot
58ff663fab New example (for GA19-017). GPS now has built-in support for this, so this
is not made a full plug-in


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@122953 936e1b1b-40f2-da11-902a-00137254ae57
2008-03-12 16:58:06 +00:00
Florian Villoing
e32dae0009 Replace the gnatclean plug-in with a new one that deals with gprbuild.
For GC14-012.


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@120607 936e1b1b-40f2-da11-902a-00137254ae57
2008-01-09 15:32:35 +00:00
Jerome Lambourg
d0ca7e6778 * expect_interface.adb:
(Show_Command_Cst, Register_Commands): New parameter Show_Command.
(Custom_Action_Record): Handle remote actions and the new Show_Command
 parameter.
(Execute): Spawn the process in Execute if not done in Custom_Spawn_Handler:
 this allow command queuing required for remote sync operations. Handle the new
 Show_Command parameter, allowing the display of the command line on the
 Messages console.
(Get_New_Queue_Id): Used to create unique queue id, used in remote
 synchronisation commands queing.
(Custom_Spawn_Handler): Do not spawn directly the process in case of remote
 execution, to allow asynchronous execution (after sync operation). Enqueue
 remote syncronisation commands when needed. Handle the new Show_Command
 parameter.


* gnatclean.py:
(clean_project): Instruct Process to show the command line when executing the
 gnatclean command.

* gps-kernel-scripts.adb:
(File_Name_Prameters, Register_Default_Script_Commands,
 Create_File_Command_Handler): Add a new parameter to File.name() command
 allowing the retrieval of the file translation path on a remote server.

* gps-kernel-remote.adb:
(From_Callback_Data_Sync_Hook, Create_Callback_Data, Synchronize): Handle a new
 rsync hook parameter: print_command.
(Synchronize, On_Project_Changing): New parameter print_command, allowing the
 rsync command to be printed on the Messages console.

* gps-kernel-remote.ads:
(Rsync_Hook_Args): New rsync hook parameter: print_command.
(Synchronize): New parameter print_command, allowing the rsync command to be
 printed on the Messages console.

* gps-kernel-timeout.adb:
(Launch_Process): Modification due to the new Synchronize's Print_Command
 parameter

* remote_sync_module.adb:
(Launch_Process): Handle the new hook parameter Print_Command.

* remote_views.adb:
(On_Sync_Menu_Clicked): Modification due to the new Synchronize's Print_Command
 parameter

* shell_commands.xml:
(GPS.File.name): documentation of the new remote_server parameter.
(GPS.Process): modify the "remote_server" declaration according to the rest of
 the documentation. Add documentation for "show_command". Remove the documented
 exception raised (no more raise as the process is spawned asynchronously).

Full handling of remote operations from python scripts: the GPS.Process class
 now handle remote operations with automatic rsync, the File class now handle
 retrieval of a File path on a remote server.
GPS.Process now allows display of the command line the same way as done from
 Ada, for consistency.

Correction of GC19-019




git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@120605 936e1b1b-40f2-da11-902a-00137254ae57
2008-01-09 14:44:14 +00:00
Florian Villoing
00c931b048 (clean_project): Launch the cleaning process on the build server.
For GC14-012.


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@120530 936e1b1b-40f2-da11-902a-00137254ae57
2008-01-08 13:48:26 +00:00
Florian Villoing
16bd73831c (clean_project): Fix initialization of the project to clean.
For GC14-012.


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@120529 936e1b1b-40f2-da11-902a-00137254ae57
2008-01-08 13:40:33 +00:00
Florian Villoing
4f04612e69 (clean_project): Provide a static default value for the root project. Default
values are initialized at the time the script is loaded and this does not work
 in the remote case.
For GC14-012.



git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@120513 936e1b1b-40f2-da11-902a-00137254ae57
2008-01-08 10:41:39 +00:00
Florian Villoing
a5557c1ec9 Move the plug-in to a more appropriate transient place pending GC19-019
implementation and add a comment about its current limitations.
For GC14-012.


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@120336 936e1b1b-40f2-da11-902a-00137254ae57
2008-01-03 10:55:37 +00:00
Arnaud Charlet
48a8dd84eb Close file after use, to avoid opening thousands of files at the same time,
using lots of memory and slowing down the processing.


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@119730 936e1b1b-40f2-da11-902a-00137254ae57
2007-11-28 13:46:52 +00:00
Florian Villoing
a4f00b142e New python example that demonstrate how to reformat all sources from a
project in a single command line.
For GB27-021.


git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@119729 936e1b1b-40f2-da11-902a-00137254ae57
2007-11-28 13:36:27 +00:00
Arnaud Charlet
c8a854c412 Fix typo.
git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@119685 936e1b1b-40f2-da11-902a-00137254ae57
2007-11-27 16:39:46 +00:00