------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Cheddar is a GNU GPL real-time scheduling analysis tool. -- This program provides services to automatically check schedulability and -- other performance criteria of real-time architecture models. -- -- Copyright (C) 2002-2016, Frank Singhoff, Alain Plantec, Jerome Legrand -- -- The Cheddar project was started in 2002 by -- Frank Singhoff, Lab-STICC UMR 6285 laboratory, Université de Bretagne Occidentale -- -- Cheddar has been published in the "Agence de Protection des Programmes/France" in 2008. -- Since 2008, Ellidiss technologies also contributes to the development of -- Cheddar and provides industrial support. -- -- The full list of contributors and sponsors can be found in AUTHORS.txt and SPONSORS.txt -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- -- Contact : cheddar@listes.univ-brest.fr -- ------------------------------------------------------------------------------ -- Last update : -- $Rev: 1249 $ -- $Date: 2014-08-28 07:02:15 +0200 (Fri, 28 Aug 2014) $ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with aadl_config; use aadl_config; with Gtkada.Builder; use Gtkada.Builder; with Gtk; use Gtk; with Gtk.Main; use Gtk.Main; with Glib.Error; use Glib.Error; with Glib; use Glib; with Ada.Text_IO; with Gtk.Widget; use Gtk.Widget; with Gtk.Check_Button; use Gtk.Check_Button; with graphical_editor.aadl_options_callbacks; use graphical_editor.aadl_options_callbacks; with graphical_editor.cheddar_callbacks; use graphical_editor.cheddar_callbacks; package body graphical_editor.aadl_options is procedure Show_aadl_option_widget is Builder : Gtkada_Builder; Error : Glib.Error.GError; begin Gtk.Main.Init; Gtk_New (Builder); Error := Add_From_File (Builder, to_string(Glade_path) & "aadl_option.glade"); if Error /= null then Ada.Text_IO.Put_Line ("Error : " & Get_Message (Error)); Error_Free (Error); return; end if; Register_Handler (Builder => Builder, Handler_Name => "on_button1_clicked", Handler => graphical_editor.aadl_options_callbacks.ok'Access); Register_Handler (Builder => Builder, Handler_Name => "on_button2_clicked", Handler => graphical_editor.aadl_options_callbacks.cancel'Access); Do_Connect (Builder); -- Activate AADL Debug switch -- if aadl_debug then Set_Active (Gtk_Check_Button(Get_Object(Builder, "checkbutton11")), true); end if; -- Include system/sub-system name in Cheddar's features name -- if Aadl_Import_With_System_Name then set_Active (Gtk_Check_Button(Get_Object(Builder, "checkbutton1")), true); end if; -- Transform event and event data port to task precedencies -- if Aadl_Import_Event_To_Precedencies then set_Active (Gtk_Check_Button(Get_Object(Builder, "checkbutton4")), true); end if; if Aadl_Import_Event_Data_To_Precedencies then set_Active (Gtk_Check_Button(Get_Object(Builder, "checkbutton5")), true); end if; -- Transform event port and event data port to buffers and messages -- (it automatically includes buffer/message task dependencies) -- if Aadl_Import_Event_To_Buffers_Messages then set_Active (Gtk_Check_Button(Get_Object(Builder, "checkbutton2")), true); end if; if Aadl_Import_Event_Data_To_Buffers_Messages then set_Active (Gtk_Check_Button(Get_Object(Builder, "checkbutton3")), true); end if; -- Transform task precedencies to event port -- if Aadl_Export_Precedencies_To_Event then set_Active (Gtk_Check_Button(Get_Object(Builder, "checkbutton9")), true); end if; -- Transform task precedencies to event data port -- if Aadl_Export_Precedencies_To_Event_Data then set_Active (Gtk_Check_Button(Get_Object(Builder, "checkbutton10")), true); end if; -- Transform task precedencies to a Cheddar property -- if Aadl_Export_Precedencies_To_Properties then set_Active (Gtk_Check_Button(Get_Object(Builder, "checkbutton8")), true); end if; -- Process second and third AADL import passes -- if Aadl_Process_Second_Import_Pass then set_Active (Gtk_Check_Button(Get_Object(Builder, "checkbutton6")), true); end if; if Aadl_Process_Third_Import_Pass then set_Active (Gtk_Check_Button(Get_Object(Builder, "checkbutton7")), true); end if; Gtk.Widget.Show_All (Get_Widget (Builder, "window1")); Gtk.Main.Main; Unref (Builder); end Show_aadl_option_widget; end graphical_editor.aadl_options;