<?xml version="1.0" ?>

<!--  This file adds support for the gnatstub utility.
      This external tool creates the Ada body from an Ada spec -->

<GPS>
   <action name="Generate body" output="none" category="Editor">
      <description>Generate the body for an Ada spec file</description>
      <!-- This action only applies to Ada files -->
      <filter language="ada"
              error="Body generation for non Ada files not yet supported" />

      <!-- Generate and load the body -->
      <shell>MDI.save_all</shell>
      <shell>Project.scenario_variables_cmd_line -X</shell>
      <shell>Project.root</shell>
      <shell>Project.get_attribute_as_string %1 "gnat" "ide"</shell>
      <external show-command="true"
                output=""
                server="tools_server">%1 stub "%pps" %3 "%F" "%d"</external>
      <on-failure><shell>Locations.parse """%1 """ gnatstub</shell></on-failure>
      <shell>Project.recompute</shell>
      <shell>File "%F"</shell>
      <shell>File.other_file "%1"</shell>
      <shell>File.name "%1"</shell>
      <shell>Editor.edit "%1"</shell>
   </action>

   <submenu>
     <title>Edit</title>
     <menu action="Generate body" before="Unit Testing" >
        <title>_Generate Body</title>
     </menu>
   </submenu>
</GPS>
