[gps-users] GPS project file can not be edited graphically

Vo, Anh (US SSA) Anh.Vo at baesystems.com
Thu Jun 2 17:31:17 CEST 2011


I got it now. Thank you very much.

-----Original Message-----
From: Emmanuel Briot [mailto:briot at adacore.com] 
Sent: Monday, May 30, 2011 12:31 AM
To: Vo, Anh (US SSA)
Cc: gps-users at lists.adacore.com
Subject: Re: [gps-users] GPS project file can not be edited graphically

> My question is that why GPS does not complain declaration and initialization,
> shown below, while assignment statement is used in both cases.
>
> type OS_Kind is ("Windows_NT", "unix");
>
> OS : OS_Kind := external ("OS", "unix");

Because this is a special case of variable, referencing an external value. GPS 
treats these specially, and displays them in the Scenario view.
The reason it does not handle standard variables is that it would be difficult 
to preserve the user's project in such cases, for instance:

project Default is
     Var := "foo";

     case OS is
        when "unix" =>
           Var := "foo_unix";
        when "Windows_NT" =>
           Var := "foo_win";
     end case;
end Default;

then GPS would only see the final value of the variable based on the current 
scenario, and would not know that the user wants to 'isolate' the 'foo' part.

Since such projects cannot be created graphically anyway, we just assume the 
user knows what he is doing and will keep editing the project textually.

Emmanuel


More information about the gps-users mailing list