3. Editing sourcesΒΆ

In the project view, open the common directory by clicking on the triangle on the left of common. This will open the directory and display a list of source files located in this directory.

Now, double click on sdc.adb: this will open a source editor on this file. The source code is syntax-highlighted: keywords, comments, strings and characters have different colors.

As with many other properties, colors are configurable in GNAT Studio:

Select the menu Edit->Preferences.... This will open a preferences dialog window.

Select the Editor->Fonts & Colors page by clicking on the triangle next to the item Editor and then selecting the Fonts & Colors item.

As you go over the various lines and labels, you will notice that by holding the mouse over a label, a tool tip pops up displaying on-line help about the selected item.

Change the background color of the Keywords by clicking on the last button, at the right of the Keywords line.

Choose a color, e.g a light green. When you’re done with the color selection, click on Select in the color selection dialog.

After selecting a color, look at the effects in the source editor. If you like the new display, click on Close to close dialog, otherwise select another color.