<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>AdaCore - The GNAT Pro Company &#187; Development Log</title>
	<atom:link href="http://www.adacore.com/category/developers-center/development-log/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adacore.com</link>
	<description>AdaCore technology and news</description>
	<pubDate>Sat, 04 Jul 2009 01:31:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Gem #68: Let&#8217;s SPARK! - Part 1</title>
		<link>http://www.adacore.com/2009/06/29/gem-68/</link>
		<comments>http://www.adacore.com/2009/06/29/gem-68/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 10:00:45 +0000</pubDate>
		<dc:creator>AdaCore</dc:creator>
		
		<category><![CDATA[Ada / Ada 2005]]></category>

		<category><![CDATA[Development Log]]></category>

		<category><![CDATA[Devt log - Gem of the Week]]></category>

		<guid isPermaLink="false">http://www2.adacore.com/?p=2991</guid>
		<description><![CDATA[Ada Gem #68 &#8212; Please note that this is the final Gem before we break for summer. The series will resume on September 7, 2009.
<p>
In this Gem and the next one, we present a simple walk-through of
SPARK's capabilities and its integration with GPS. In this first Gem, we
show how to set up a SPARK project and prove that your SPARK programs
are free from uninitialized variable accesses and that they execute
without run-time errors.</p>]]></description>
			<content:encoded><![CDATA[<h3>Let&#8217;s get started&#8230;</h3><br/>


<p>With Praxis and AdaCore now teaming up to offer an integration of SPARK
technology inside GPS (see http://www.adacore.com/home/products/sparkpro/),
many GPS users will be interested in trying out the proof capabilities of
SPARK on their own Ada programs. Of course it&#8217;s a little more involved than
that. SPARK is not only a set of tools for verifying high-assurance systems,
but also incorporates a language that must be learned.</p>

<p>The SPARK language is made up of two parts, one of which is a subset
of Ada (whose features will obviously already be familiar to Ada programmers!),
meant to facilitate code understanding and proofs, and the other part being
a specification language, meant to express properties of programs. Quite
conveniently, the SPARK specifications (a.k.a. SPARK annnotations, to
distinguish them from Ada specifications) are expressed within stylized
Ada comments of the following form:</p>


<pre>
         <EM>&#45;&#45;# &lt;some annotation here&gt;</EM>
</pre>


<p>so SPARK annotations don&#8217;t interfere with normal Ada compilation.</p>



<p>This Gem and the next one demonstrate various of the properties
you can prove with SPARK, and how these relate to the SPARK annotations
written by the user. As a simple example, we will take a procedure which
searches linearly for a value in an array, and returns the index, if any,
at which the value is found.</p>


<p>Here is the specification file search.ads:</p>

<pre>
<b>package</b> Search <b>is</b>

  <b>type</b> IntArray <b>is</b> <b>array</b> (Integer <b>range</b> &lt;&gt;) <b>of</b> Integer;

  <b>procedure</b> Linear_Search
    (Table : <b>in</b> IntArray;
     Value : <b>in</b> Integer;
     Found : <b>out</b> Boolean;
     Index : <b>out</b> Integer);

<b>end</b> Search;
</pre>


<p>And the body file search.adb:</p>

<pre>
<b>package</b> <b>body</b> Search <b>is</b>

  <b>procedure</b> Linear_Search
    (Table : <b>in</b> IntArray;
     Value : <b>in</b> Integer;
     Found : <b>out</b> Boolean;
     Index : <b>out</b> Integer) 
  <b>is</b>
     I : Integer := 0;
  <b>begin</b>
     Found := False;

     <b>while</b> I &lt;= Table&#8217;Last <b>loop</b>
        <b>if</b> Table(I) = Value <b>then</b>
           Found := True;
           Index := I;
           <b>exit</b>;
        <b>end</b> <b>if</b>;
        I := I + 1;
     <b>end</b> <b>loop</b>;
  <b>end</b> Linear_Search;

<b>end</b> Search;
</pre>


<p>Let&#8217;s first get set up for using SPARK:</p>


<p>
1. Copy the files search.ads and search.adb into a directory named search.<br/>
2. Open GPS with a default project in the same directory.<br/>
3. Expand file search.adb.<br/>
4. Select SPARK/SPARKMake from the menu. This generates a file search.idx.<br/>
5. Copy the following code to a file called search.cfg:</p>

<pre>
  <b>package</b> Standard <b>is</b>
     <b>type</b> Integer <b>is</b> <b>range</b> -2**31 .. 2**31-1;
  <b>end</b> Standard;
</pre>

<p>
6. From the Menu, select Project/Edit Project Properties.<br/>
7. Go to the page Switches/Examiner.<br/>
8. Select the following options:
</p>

<pre>
  Index File            : search.idx
  Configuration File    : search.cfg
  Analysis              : Data Flow only
  Generate VCs          : yes (check it)
</pre>


<p>That&#8217;s it!</p>

<p>Now open search.adb and select SPARK/Examine File.
The SPARK Examiner runs and outputs the following messages:</p>

<pre>
       Flow Error 602 - The undefined initial value <b>of</b> Index may be
                         used <b>in</b> the derivation <b>of</b> Index
       Warning 402 - Default assertion planted to cut the <b>loop</b>
       Note - Information flow analysis <b>not</b> carried <b>out</b>
</pre>


<p>The Flow Error indicates that, although Index is an out parameter, it
is not initialized on all paths through Linear_Search. One could argue
that our intent here is to access Index only when Found is set to
True. SPARK considers initialization errors too serious to allow such
subtleties, and requires that all paths through the procedure must initialize
all out parameters. Let&#8217;s comply and initialize Index:</p>

<pre>
  <b>begin</b>
     Found := False;
     Index := 0;
</pre>


<p>After we rerun the Examiner, we are left with a Note that is simply a
reminder of our choice of options, and a Warning that we will
explain in the next Gem.</p>



<p>Now, we can continue with proving that our procedure is free from run-time
errors, such as integer overflow and out-of-bounds array accesses. Select
SPARK/Simplify All. The SPARK Simplifier runs. To see the result of this
tool&#8217;s execution, select SPARK/POGS. This opens a file search.sum, which summarizes
all the proofs in the following table:</p>

<pre>
VCs <b>for</b> procedure_linear_search :
<EM>&#45;&#45;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</EM>
     |       |                     |  <EM>&#45;&#45;&#8212;Proved In&#8212;&#8211;  |       |       |</EM>
#    | From  | To                  | vcg | siv | plg | prv | False | TO <b>DO</b> |
<EM>&#45;&#45;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</EM>
1    | start | rtc check @ 13      |     | YES |     |     |       |       | 
2    | start |    assert @ 15      |     | YES |     |     |       |       | 
3    | 15    |    assert @ 15      |     | YES |     |     |       |       | 
4    | 15    | rtc check @ 16      |     |     |     |     |       |  YES  | 
5    | 15    | rtc check @ 18      |     | YES |     |     |       |       | 
6    | 15    | rtc check @ 21      |     |     |     |     |       |  YES  | 
7    | 15    |    assert @ finish  | YES |     |     |     |       |       | 
8    | 15    |    assert @ finish  | YES |     |     |     |       |       | 
<EM>&#45;&#45;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</EM>
</pre>


<p>Each line corresponds to a Verification Condition (VC), which must be
proved in order to guarantee that the program is free from run-time
errors. Each column corresponds to the result of the proof attempt.
If YES appears in one of the 4 &#8220;Proved In&#8221; columns, the proof was
successful. If YES appears in the &#8220;False&#8221; column, there is something
definitely wrong. If &#8220;YES&#8221; appears in the &#8220;TO DO&#8221; column, we don&#8217;t
know: either the program is wrong, or it is too complex to prove.</p>



<p>Since column &#8220;TO DO&#8221; is not empty here, not all proofs were successful.
In the next Gem, we will give you more details about failed
proofs. The reason for the failures here is that program
Linear_Search is incorrect, meaning that run-time errors can be
raised. To see this, just complete the program with the following code
in main.adb, and build the executable.</p>

<pre>
<b>with</b> Search;
<b>use</b> Search;

<b>procedure</b> Main <b>is</b>
   Table : IntArray(1..10) := (<b>others</b> =&gt; 0);
   Found : Boolean;
   Index : Integer;
<b>begin</b>
   Linear_Search(Table, 0, Found, Index);
<b>end</b> Main;
</pre>


<p>Now run the executable, and it raises an exception:</p>

<pre>
   raised CONSTRAINT_ERROR : search.adb:16 index check failed
</pre>


<p>This is because we are passing an array to Linear_Search that starts
at index 1 in its parameter Table, whereas Linear_Search loop assumes
that the array starts at index 0. SPARK correctly assumes that we can
pass in such an array to Linear_Search, and thus it fails to prove that
Linear_Search is free from run-time errors.</p>



<p>Let&#8217;s correct the code of Linear_Search:</p>

<pre>
  <b>procedure</b> Linear_Search
    (Table : <b>in</b> IntArray;
     Value : <b>in</b> Integer;
     Found : <b>out</b> Boolean;
     Index : <b>out</b> Integer) <b>is</b>
  <b>begin</b>
     Found := False;
     Index := 0;

     <b>for</b> I <b>in</b> Integer <b>range</b> Table&#8217;<b>Range</b> <b>loop</b>
        <b>if</b> Table(I) = Value <b>then</b>
           Found := True;
           Index := I;
            <b>exit</b>;
        <b>end</b> <b>if</b>;
     <b>end</b> <b>loop</b>;
  <b>end</b> Linear_Search;
</pre>


<p>Let&#8217;s do it again: Examine, Simplify All, POGS &#8230;<br/>
This time, columns &#8220;False&#8221; and &#8220;TO DO&#8221; are empty, meaning that all proofs were
successful.</p>

<pre>
VCs <b>for</b> procedure_linear_search :
<EM>&#45;&#45;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</EM>
     |       |                     |  <EM>&#45;&#45;&#8212;Proved In&#8212;&#8211;  |       |       |</EM>
#    | From  | To                  | vcg | siv | plg | prv | False | TO <b>DO</b> |
<EM>&#45;&#45;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</EM>
1    | start | rtc check @ 11      |     | YES |     |     |       |       | 
2    | start | rtc check @ 13      |     | YES |     |     |       |       | 
3    | start |    assert @ 13      |     | YES |     |     |       |       | 
4    | 13    |    assert @ 13      |     | YES |     |     |       |       | 
5    | 13    |    assert @ 13      |     | YES |     |     |       |       | 
6    | 13    | rtc check @ 14      |     | YES |     |     |       |       | 
7    | 13    | rtc check @ 16      |     | YES |     |     |       |       | 
8    | 13    |    assert @ finish  | YES |     |     |     |       |       | 
9    | 13    |    assert @ finish  | YES |     |     |     |       |       | 
<EM>&#45;&#45;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</EM>
</pre>


<p>Thus, we have proved that procedure Linear_Search is free from run-time
errors.</p>



<p>In the next Gem, after the summer break, we will prove that procedure Linear_Search actually
respects a given contract.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adacore.com/2009/06/29/gem-68/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[GNAT] Linker map now contains size of discarded sections</title>
		<link>http://www.adacore.com/2009/06/25/NF-63-I612-011-gnat/</link>
		<comments>http://www.adacore.com/2009/06/25/NF-63-I612-011-gnat/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 12:00:00 +0000</pubDate>
		<dc:creator>AdaCore</dc:creator>
		
		<category><![CDATA[Development Log]]></category>

		<category><![CDATA[GNAT Compilation System]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[   The size of each discarded section is now printed in the linker map. This
   concerns only platforms where AdaCore provides a linker (GNU/Linux x86 and
   x86-64, Windows and ppc-elf platforms).
]]></description>
			<content:encoded><![CDATA[   The size of each discarded section is now printed in the linker map. This
   concerns only platforms where AdaCore provides a linker (GNU/Linux x86 and
   x86-64, Windows and ppc-elf platforms).
]]></content:encoded>
			<wfw:commentRss>http://www.adacore.com/2009/06/25/NF-63-I612-011-gnat/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[GPS] New action to toggle auto-casing on/off</title>
		<link>http://www.adacore.com/2009/06/24/NF-44-I616-052-gps/</link>
		<comments>http://www.adacore.com/2009/06/24/NF-44-I616-052-gps/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 12:00:00 +0000</pubDate>
		<dc:creator>AdaCore</dc:creator>
		
		<category><![CDATA[Development Log]]></category>

		<category><![CDATA[GPS]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[   GPS provides a new action called &#34;Toggle Auto Casing/indentation&#34; which
   toggles the auto-casing. When using On-The-Fly casing it is more convenient
   to use this sticky action (via its associated key shortcut, alt-q by
   default) instead of the action which disables casing for a single character
  [...]]]></description>
			<content:encoded><![CDATA[   GPS provides a new action called &quot;Toggle Auto Casing/indentation&quot; which
   toggles the auto-casing. When using On-The-Fly casing it is more convenient
   to use this sticky action (via its associated key shortcut, alt-q by
   default) instead of the action which disables casing for a single character
   only.
]]></content:encoded>
			<wfw:commentRss>http://www.adacore.com/2009/06/24/NF-44-I616-052-gps/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[GNAT] More straight-line code generated for arrays</title>
		<link>http://www.adacore.com/2009/06/23/NF-63-I511-020-gnat/</link>
		<comments>http://www.adacore.com/2009/06/23/NF-63-I511-020-gnat/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 12:00:00 +0000</pubDate>
		<dc:creator>AdaCore</dc:creator>
		
		<category><![CDATA[Development Log]]></category>

		<category><![CDATA[GNAT Compilation System]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[   The compiler now generates more straight-line code for the manipulation of
   arrays with dynamic bounds when it can infer properties for these bounds.
]]></description>
			<content:encoded><![CDATA[   The compiler now generates more straight-line code for the manipulation of
   arrays with dynamic bounds when it can infer properties for these bounds.
]]></content:encoded>
			<wfw:commentRss>http://www.adacore.com/2009/06/23/NF-63-I511-020-gnat/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[GNAT] Implement -gnateS switch for output of SCOs</title>
		<link>http://www.adacore.com/2009/06/21/NF-63-I527-034-gnat/</link>
		<comments>http://www.adacore.com/2009/06/21/NF-63-I527-034-gnat/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 12:00:00 +0000</pubDate>
		<dc:creator>AdaCore</dc:creator>
		
		<category><![CDATA[Development Log]]></category>

		<category><![CDATA[GNAT Compilation System]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[   A new switch for the compiler -gnateS causes the compiler to output SCO
   (source coverage obligation) information to the ALI file. This information
   is used by advanced coverage tools now being implemented. For details of
   the format of SCO information, see the compiler unit SCOs (scos.adb/ads).
]]></description>
			<content:encoded><![CDATA[   A new switch for the compiler -gnateS causes the compiler to output SCO
   (source coverage obligation) information to the ALI file. This information
   is used by advanced coverage tools now being implemented. For details of
   the format of SCO information, see the compiler unit SCOs (scos.adb/ads).
]]></content:encoded>
			<wfw:commentRss>http://www.adacore.com/2009/06/21/NF-63-I527-034-gnat/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[GNAT] Revised warnings for certain unreferenced entities</title>
		<link>http://www.adacore.com/2009/06/17/NF-63-I617-001-gnat/</link>
		<comments>http://www.adacore.com/2009/06/17/NF-63-I617-001-gnat/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 12:00:00 +0000</pubDate>
		<dc:creator>AdaCore</dc:creator>
		
		<category><![CDATA[Development Log]]></category>

		<category><![CDATA[GNAT Compilation System]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[   The warning messages issued for unreferenced packages, exceptions, labels,
   and formal objects now explicitly mention the form of entity (for example,
   &#34;warning: package &#34;My_Pkg&#34; is not referenced&#34;). This allows selective
   warning suppression for these specific entity kinds using pragma Warnings
   with a message pattern [...]]]></description>
			<content:encoded><![CDATA[   The warning messages issued for unreferenced packages, exceptions, labels,
   and formal objects now explicitly mention the form of entity (for example,
   &quot;warning: package &quot;My_Pkg&quot; is not referenced&quot;). This allows selective
   warning suppression for these specific entity kinds using pragma Warnings
   with a message pattern (pragma Warnings (Off, &quot;package*is not referenced&quot;)).
]]></content:encoded>
			<wfw:commentRss>http://www.adacore.com/2009/06/17/NF-63-I617-001-gnat/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gem #67: Managing the GPS Workspace</title>
		<link>http://www.adacore.com/2009/06/15/gem-67/</link>
		<comments>http://www.adacore.com/2009/06/15/gem-67/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 10:00:21 +0000</pubDate>
		<dc:creator>AdaCore</dc:creator>
		
		<category><![CDATA[Ada / Ada 2005]]></category>

		<category><![CDATA[Development Log]]></category>

		<category><![CDATA[Devt log - Gem of the Week]]></category>

		<guid isPermaLink="false">http://www2.adacore.com/?p=2981</guid>
		<description><![CDATA[Ada Gem #67 &#8212; GPS has a multitude of views  and editors, several of which may be displayed
on the screen at the same time. It is based on a very flexible desktop that
helps you organize these windows the way you prefer.  This Gem describes some
of the lesser-known aspects of the GPS desktop.]]></description>
			<content:encoded><![CDATA[<h3>Let&#8217;s get started&#8230;</h3><br/>


<p>When you open GPS initially, it shows a number of views: the Messages
window (which can never be closed), the Project View, showing the list of
files in your project, the Outline View, which shows the list of subprograms in
the current edit, the Scenario View listing the scenario variables in your
project, and a Welcome window to help you get started.</p>



<p>When several windows share the same screen area (which is the case for the
project view and the outline view in the default desktop), they are organized
into notebooks, and it&#8217;s possible to show any view by clicking on its
associated tab. By default, GPS will now show the tabs if there is only one
window in a given area, to save screen real estate. This behavior can be
changed through the &#8220;Notebook Tabs Policy&#8221; preference. You can also change the
location of the tabs (which by default appear below the window) through the
&#8220;Notebook Tabs Position&#8221; preference. This latter preference configures the
default location, though, and you can change it on a per-notebook basis by
right-clicking in any of the tabs and changing the tabs position.
</p>


<p>Windows can also be made to float. They are then put under the control of the
operating system (or the window manager), and you can move them to another
screen, another virtual desktop, iconify them, and so on. The window will have its own
entry in your systems panel (the bar that is generally displayed at the bottom
of the screen and shows all open windows). GPS has a mode where all windows it
creates are made floating by default (this is the &#8220;All Floating&#8221;
preference). When this mode is not activated, you can move a floating window
back into GPS using one of two methods: the /Window/Floating menu, or by
clicking on the [x] in the window&#8217;s title bar when the &#8220;Destroy Floating&#8221;
preference is unset; at that point, instead of closing the window, GPS will
simply put it back in its own window. If you really want to close it, you
have to click a second time on [x].</p>



<p>Only one of the views has the focus at any given time, and it receives all
keyboard input. Its title bar is then highlighted in a different color (which
you configure in the preferences). To save some space on the screen, you
could choose to hide the title bars. Indeed, it is obvious most of the time
what each window is after you have used them a few times. The only case where
you might be missing info is for editors (since the title bar includes the
full name of the file). However, this name also appears in GPS&#8217;s own title
bar. When the title bar is hidden, the notebook&#8217;s tab will be color
highlighted to show the currently active window.
</p>


<p>When a window is not currently visible on the screen (most often this will be
when the Messages window is below the Locations window for instance), its tab
is highlighted in a special color to bring attention to it and encourage you
to check what has changed in that window.</p>



<p>It is rather obvious (or so we hope) that the views can be resized as you see
fit simply by dragging the separators between those windows (that is, click on
the separator, hold the mouse button, and move the mouse up/down or left/right,
depending on the orientation of the separator). The resizing can take one of
two forms: either a simple line overlaid on top of the windows to show where
the separator will end up when you release the mouse, or by redrawing the
windows each time you move the mouse. This behavior can also be configured in
the preferences.</p>



<p>However, did you know that you can actually create any number of new areas on the
desktop (which we call the MDI, for Multiple Document Interface)? This can be
done in a number of ways. The easiest to discover is to use the menu
/Window/Split Side-by-Side or /Window/Split Up-Down. For instance, assuming
you have the default desktop loaded in GPS, select the project view. Then
select the menu /Window/Split Up-Down. This will put the outline view in its
own area below the project view, allowing you to see both at the same time.</p>



<p>However, the most flexible way to reorganize windows is by using drag and
drop. Start by clicking on the title bar or the tab of any window. Then,
without releasing the mouse button, move your mouse to where you would like to
put the window you clicked on. Note how a pop-up window appears on top of the
GPS window to describe what will happen when you release the mouse. There are
six places where you can drop a window: if you release the mouse in the middle
of an existing window, the two windows will be stacked into a notebook; if you
release on any of the sides of an existing window (there is a margin a few pixels wide
on each side), the existing window will be split and the window you are
moving will be displayed next to it; finally, you can also release the mouse
outside of the GPS window altogether to make the window floating.</p>



<p>As an additional bonus, if you press the shift key when you are dropping an
editor window, a new view will be created (showing the same contents) instead
of moving the initial editor. This allows you to view several locations in a
given file, which is often useful when you want to view data structures when
writing code, or when comparing several sections of code.</p>



<p>My own preferred organization (on a wide screen) is as follows: I have two
editors side by side (for instance spec and body). Then on the left side I
display the Windows view (/Tools/Views/Windows menu), which provides a fast way
to select and bring to the front any window no matter where it currently is
on the screen. This is a also a convenient place from which to start the drag-and-drop
operations (clicking on a file and dropping it where I want to put the editor). Below
this Windows view I have the Bookmarks view, which allows me to
save places within any of the editors (through the /Edit/Create Bookmark menu),
and come back to them later.  Below the two editors, I display the Messages
window and the Locations window side by side, so that I can see compilation
errors easily, while keeping an eye on whether GPS has reported an error in
its messages window. Finally, on the right-hand side of the screen I display
the Outline view, since this is such a great way to move fast within a file,
and the Tasks view that shows what&#8217;s being executed in the background (and
provides  a way  to monitor  the progress  of compilations when using the -d
switch to gnatmake). As you see, there are quite a number of views. To save
space, I usually hide title bars (which as explained above are not necessary
once you know what the windows are for), as well as the status bar at the
bottom of the GPS window (since the task view displays the same information
already).
</p>


<p>Once you have found a layout that you like, however, you probably want to
reuse it every time you open GPS. This is called saving the desktop. This
process is very configurable, to adapt to the various needs that people might
have:</p>


<p>
 - The default is for GPS to save the project-specific desktop. This means that
   the layout you have just created will be saved automatically on exit, and
   reapplied when loading the same project later on. If you load another
   project, the default layout will be used. One reason to do that is to save
   the currently opened files in the desktop (this is controlled by another
   preference, &#8220;Save Editor is Desktop&#8221;, where you decide whether you want to
   save editors or not, and if you do, whether only project-specific editors
   will be saved or any file that happens to be opened at that time.</p>


 
<p>- If you want to reuse the same layout for all projects on which you work,
   you should make sure the preference &#8220;General/Save Project-Specific Desktop
   on Exit&#8221; is disabled. This means that a single version of the desktop will
   be saved, and will apply to all projects (in this case it might be a good
   idea to remove the file  $HOME/desktop.xml prior to launching GPS the first
   time, so that any trace of project-specific desktop is wiped out). In such
   a case, one of the drawbacks is that you might not want to save the editors
   since they would not necessarily match the next project you load.</p>



<p>The method I have been using is the following: after removing the desktop.xml
file as described above, I launch GPS and set up the various views as I like,
but do not open any editor. I then save the current desktop as the default
through the menu /File/Save Move/Default Desktop. I then ensure that the
preference to save project-specific desktops is on, as well as the preference
to save the editors in the desktop. This ensures that every time I open a
project that I&#8217;ve never opened before, I get the default desktop (with no editor), but
when I open a project that I have already opened before, then I get the same editors
(and in the same location) as the last time I exited GPS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adacore.com/2009/06/15/gem-67/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[GNAT] New pretty printer switch to control label layout</title>
		<link>http://www.adacore.com/2009/06/15/NF-63-I521-012-gnat/</link>
		<comments>http://www.adacore.com/2009/06/15/NF-63-I521-012-gnat/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 12:00:00 +0000</pubDate>
		<dc:creator>AdaCore</dc:creator>
		
		<category><![CDATA[Development Log]]></category>

		<category><![CDATA[GNAT Compilation System]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[   A new switch &#8211;separate-label for gnatpp specifies that statement label(s)
   and the statement itself should be placed on separate lines.
]]></description>
			<content:encoded><![CDATA[   A new switch &#8211;separate-label for gnatpp specifies that statement label(s)
   and the statement itself should be placed on separate lines.
]]></content:encoded>
			<wfw:commentRss>http://www.adacore.com/2009/06/15/NF-63-I521-012-gnat/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[GPS] Debug-&gt;Add Symbols asks for module&#8217;s address</title>
		<link>http://www.adacore.com/2009/06/14/NF-44-I528-009-gps/</link>
		<comments>http://www.adacore.com/2009/06/14/NF-44-I528-009-gps/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 12:00:00 +0000</pubDate>
		<dc:creator>AdaCore</dc:creator>
		
		<category><![CDATA[Development Log]]></category>

		<category><![CDATA[GPS]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[   The Debug-&#62;Debug-&#62;Add Symbols&#8230; menu now also asks for the module&#8217;s
   address to be given to gdb.
]]></description>
			<content:encoded><![CDATA[   The Debug-&gt;Debug-&gt;Add Symbols&#8230; menu now also asks for the module&#8217;s
   address to be given to gdb.
]]></content:encoded>
			<wfw:commentRss>http://www.adacore.com/2009/06/14/NF-44-I528-009-gps/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GNATbench 2.3 webinar</title>
		<link>http://www.adacore.com/2009/06/11/gnatbench-23-webinar/</link>
		<comments>http://www.adacore.com/2009/06/11/gnatbench-23-webinar/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 14:04:14 +0000</pubDate>
		<dc:creator>AdaCore</dc:creator>
		
		<category><![CDATA[Development Log]]></category>

		<category><![CDATA[GNATbench]]></category>

		<guid isPermaLink="false">http://www2.adacore.com/?p=2982</guid>
		<description><![CDATA[We still have places available for the upcoming GNATbench webinar.


AdaCore has recently introduced GNATbench 2.3.0. This release introduces many new features including preference control for “Quick Fix” for Ada, Eclipse “feature” deployment, and builder enhancements. This webinar will describe and demo some of the new features introduced in 2.3.0. As always, we will allow a [...]]]></description>
			<content:encoded><![CDATA[<p>We still have places available for the upcoming <a href="http://www.adacore.com/home/products/gnatpro/webinars/">GNATbench webinar</a>.</p>


<p>AdaCore has recently introduced GNATbench 2.3.0. This release introduces many new features including preference control for “Quick Fix” for Ada, Eclipse “feature” deployment, and builder enhancements. This webinar will describe and demo some of the new features introduced in 2.3.0. As always, we will allow a question and answer session at the end enabling you to talk directly with the designers of GNATbench. This webinar will appeal to Ada developers that are using, or are interested in using, GNAT Pro and the Eclipse development environment in their projects.</p>


<p>To register, please visit:<br/>

<a href="http://www.adacore.com/home/products/gnatpro/webinars/">http://www.adacore.com/home/products/gnatpro/webinars</a></p>

]]></content:encoded>
			<wfw:commentRss>http://www.adacore.com/2009/06/11/gnatbench-23-webinar/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
