Commit a6c738b3 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Ellidiss GUI-specific configuration files

parent b1ad8559
package provide IVConfig 0.1
lappend auto_path .
namespace eval IVConfig {
variable objectsConfig {
"Container" {"color" "gray50" "fillColor" "gray"} \
"Function" {"color" "gray50" "fillColor" "gold"} \
"ProvidedInterface" {"color" "#1560BD" "fillColor" "blue"} \
"RequiredInterface" {"color" "#1560BD" "fillColor" "blue"} \
"Comment" {"color" "gray50" "fillColor" "gray90"} \
}
variable config {\
"diagramWidth" 2970 \
"diagramHeight" 2100 \
"diagramXUnit" 2 \
"diagramYUnit" 2 \
"zoomoutBound" "false" \
"gridSnap" "true" \
"selectionColor" "red" \
"editableColor" "orange" \
"emptyPercent" 0.9 \
"removeDialogBox" "false" \
"asn2aadlPath" "asn2aadlPlus" \
"selectionPrecision" 2 \
"minInterfaceSize" 2 \
"maxInterfaceSize" 40 \
"zoomLabel" "false" \
"editablePercent" 0.9 \
"hidePercent" 0.1 \
"hideTextPercent" 0.3 \
"hideLabelPercent1" 0.5 \
"hideLabelPercent2" 0.5 \
"delayMaskInformation" 100 \
"zoomFactor" 0.9 \
"instanceSelectColor" "red" \
"logDirectory" "tmp/TASTE" \
"displayConnectionLabel" "false" \
}
variable accelerators { \
"removeAccelerator" "Delete" \
"editAccelerator" "Control-e" \
"newAccelerator" "Control-n" \
"openAccelerator" "Control-o" \
"saveAccelerator" "Control-s" \
"quitAccelerator" "Control-q" \
"copyAccelerator" "Control-c" \
"pasteAccelerator" "Control-v" \
"cutAccelerator" "Control-x" \
"undoAccelerator" "Control-z" \
"redoAccelerator" "Control-y" \
"zoominAccelerator" "Control-Up" \
"zoomoutAccelerator" "Control-Down" \
"diagramUpAccelerator" "Up" \
"diagramDownAccelerator" "Down" \
"diagramLeftAccelerator" "Left" \
"diagramRightAccelerator" "Right" \
}
}
-- mapping TASTE : AADL
-- Node : System
-- Processor : Processor
-- Process : Function
-- Bus : Bus
-- Device : Device
-- Driver : Driver
property set TASTE_DV_Properties is
-- MyBoolean: aadlboolean applies to (System, Processor, Process);
CoverageEnabled: aadlboolean applies to (Process);
Comment: aadlstring applies to (Device, Bus);
-- MyInt: aadlinteger applies to (System);
-- MyReal: aadlreal applies to (Bus);
-- MyEnum: enumeration (val1, val2, val3, val4) applies to (Device);
end TASTE_DV_Properties;
-- mapping TASTE : AADL
-- Container : Package
-- Function : System
-- Interface : Subprogram
property set TASTE_IV_Properties is
-- MyBoolean: aadlboolean applies to (System, Package);
-- MyString: aadlstring applies to (System, Subprogram);
Version: aadlstring applies to (System);
-- MyInt: aadlinteger applies to (System);
-- MyReal: aadlreal applies to (System);
-- MyEnum: enumeration (val1, val2, val3, val4) applies to (System);
end TASTE_IV_Properties;
package provide ada_kate 0.1
# C code editor (using Kate)
lappend auto_path .
namespace eval ada_kate {
# Graphical name of the operation
proc getLabel {} {
return "Edit Ada source code"
}
# Name of the application this script can be used with
# shall be either InterfaceView or DeploymentView
proc getApplication {} {
return "InterfaceView"
}
# Names of the object this script can be used on
proc getApplyTo {} {
return [list { "Function" {"Source_Language" "Ada"} } ]
}
# List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} {
return [list statusBar]
}
proc ada_kate { args } {
set params [lindex $args 0]
set aadlFilePath [Parameter::getParameter $params aadlFilePath]
set aadlId [Parameter::getParameter $params id]
return [ada_internal $aadlFilePath $aadlId]
}
# the line "exec {*}[auto_execok $::installationPath/config/externalTools/test.bat]"
# ask the current OS which software is to be used to open the file test.bat
# to launch using the absolute path, read the template2.tcl_
# synchronous call
proc ada_internal { aadlFilePath aadlId } {
set initialPath [pwd]
cd [file dirname $aadlFilePath]
set msg ""
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-generate-skeletons"] } ]
set aadlId [string tolower $aadlId 0 end]
if { $errNumb == 0 && [file exists [file normalize "[pwd]/$aadlId" ] ] } {
cd [file normalize "[pwd]/$aadlId" ]
set errNumb [catch { exec -ignorestderr {*}[auto_execok kate] ${aadlId}.ads ${aadlId}.adb & } ]
if { $errNumb == 0 } {
# TODO: check code - but we need to have C_ASN1_Types.h
# set errNumb [catch { exec -ignorestderr {*}[auto_execok gcc] -gnats -c ${aadlId}.c } ]
# if { $errNumb != 0 } {
# set msg "Note: There are syntax errors in your code - check it before you build"
# }
} else {
set msg "Error in execution of \"kate ${aadlId}.ads ${aadlId}.adb\""
}
} else {
set msg "Error in execution of \"taste-generate-skeletons $aadlFilePath\""
}
cd $initialPath
return [list $errNumb $msg]
}
# asynchronous call
#proc template_internal { aadlFilePath aadlId } {
# exec {*}[auto_execok $::installationPath/config/externalTools/test.bat] $aadlFilePath $aadlId &
# return ""
#}
}
package provide blackbox 0.1
# C code editor (using Kate)
lappend auto_path .
namespace eval blackbox {
# Graphical name of the operation
proc getLabel {} {
return "Edit source code"
}
# Name of the application this script can be used with
# shall be either InterfaceView or DeploymentView
proc getApplication {} {
return "InterfaceView"
}
# Names of the object this script can be used on
proc getApplyTo {} {
return [list { "Function" {"Source_Language" "Blackbox_device"} } ]
}
# List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} {
return [list statusBar]
}
proc blackbox { args } {
set params [lindex $args 0]
set aadlFilePath [Parameter::getParameter $params aadlFilePath]
set aadlId [Parameter::getParameter $params id]
return [bb_internal $aadlFilePath $aadlId]
}
# the line "exec {*}[auto_execok $::installationPath/config/externalTools/test.bat]"
# ask the current OS which software is to be used to open the file test.bat
# to launch using the absolute path, read the template2.tcl_
# synchronous call
proc bb_internal { aadlFilePath aadlId } {
set initialPath [pwd]
cd [file dirname $aadlFilePath]
set msg ""
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-generate-skeletons"] } ]
set aadlId [string tolower $aadlId 0 end]
if { $errNumb == 0 && [file exists [file normalize "[pwd]/$aadlId" ] ] } {
cd [file normalize "[pwd]/$aadlId" ]
set errNumb [catch { exec -ignorestderr {*}[auto_execok kate] ${aadlId}.h ${aadlId}.c & } ]
if { $errNumb == 0 } {
# TODO: check code - but we need to have C_ASN1_Types.h
# set errNumb [catch { exec -ignorestderr {*}[auto_execok gcc] -fsyntax-only -c ${aadlId}.c } ]
# if { $errNumb != 0 } {
# set msg "Note: There are syntax errors in your code - check it before you build"
# }
} else {
set msg "Error in execution of \"kate ${aadlId}.c ${aadlId}.h\""
}
} else {
set msg "Error in execution of \"taste-generate-skeletons $aadlFilePath\""
}
cd $initialPath
return [list $errNumb $msg]
}
# asynchronous call
#proc template_internal { aadlFilePath aadlId } {
# exec {*}[auto_execok $::installationPath/config/externalTools/test.bat] $aadlFilePath $aadlId &
# return ""
#}
}
package provide build_ada 0.1
lappend auto_path .
namespace eval build_ada {
# Graphical name of the operation
proc getLabel {} {
return "Build the system (in Ada)"
}
# Name of the application this script can be used with
# shall be either InterfaceView or DeploymentView
proc getApplication {} {
return "InterfaceView"
}
# Names of the object this script can be used on
# FIXME - it should be active all the time
proc getApplyTo {} {
return [list "alwayson" ]
}
# List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} {
return [list statusBar]
}
proc build_ada { args } {
set params [lindex $args 0]
set aadlFilePath [Parameter::getParameter $params aadlFilePath]
set aadlId [Parameter::getParameter $params id]
return [build_internal $aadlFilePath $aadlId]
}
# synchronous call
proc build_internal { aadlFilePath aadlId } {
set initialPath [pwd]
cd [file dirname $aadlFilePath]
set msg ""
set ::env(USE_POHIADA) "1"
set errNumb [catch { exec [auto_execok "taste-build-system"] } ]
if { $errNumb == 0 } {
set msg "Everything went fine!"
} else {
set msg "Some errors were reported - check the console"
}
unset ::env(USE_POHIADA)
cd $initialPath
return [list $errNumb $msg]
}
}
package provide build_c 0.1
lappend auto_path .
namespace eval build_c {
# Graphical name of the operation
proc getLabel {} {
return "Build the system (in C)"
}
# Name of the application this script can be used with
# shall be either InterfaceView or DeploymentView
proc getApplication {} {
return "InterfaceView"
}
# Names of the object this script can be used on
# FIXME - it should be active all the time
proc getApplyTo {} {
return [list "alwayson" ]
}
# List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} {
return [list statusBar]
}
proc build_c { args } {
set params [lindex $args 0]
set aadlFilePath [Parameter::getParameter $params aadlFilePath]
set aadlId [Parameter::getParameter $params id]
return [build_internal $aadlFilePath $aadlId]
}
# synchronous call
proc build_internal { aadlFilePath aadlId } {
set initialPath [pwd]
cd [file dirname $aadlFilePath]
set msg ""
set ::env(USE_POHIC) "1"
set errNumb [catch { exec [auto_execok "taste-build-system"] } ]
if { $errNumb == 0 } {
set msg "Everything went fine!"
} else {
set msg "Some errors were reported - check the console"
}
unset ::env(USE_POHIC)
cd $initialPath
return [list $errNumb $msg]
}
}
package provide c_kate 0.1
# C code editor (using Kate)
lappend auto_path .
namespace eval c_kate {
# Graphical name of the operation
proc getLabel {} {
return "Edit C source code"
}
# Name of the application this script can be used with
# shall be either InterfaceView or DeploymentView
proc getApplication {} {
return "InterfaceView"
}
# Names of the object this script can be used on
proc getApplyTo {} {
return [list { "Function" {"Source_Language" "C"} } ]
}
# List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} {
return [list statusBar]
}
proc c_kate { args } {
set params [lindex $args 0]
set aadlFilePath [Parameter::getParameter $params aadlFilePath]
set aadlId [Parameter::getParameter $params id]
return [c_internal $aadlFilePath $aadlId]
}
# the line "exec {*}[auto_execok $::installationPath/config/externalTools/test.bat]"
# ask the current OS which software is to be used to open the file test.bat
# to launch using the absolute path, read the template2.tcl_
# synchronous call
proc c_internal { aadlFilePath aadlId } {
set initialPath [pwd]
cd [file dirname $aadlFilePath]
set msg ""
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-generate-skeletons"] } ]
set aadlId [string tolower $aadlId 0 end]
if { $errNumb == 0 && [file exists [file normalize "[pwd]/$aadlId" ] ] } {
cd [file normalize "[pwd]/$aadlId" ]
set errNumb [catch { exec -ignorestderr {*}[auto_execok kate] ${aadlId}.h ${aadlId}.c & } ]
if { $errNumb == 0 } {
# TODO: check code - but we need to have C_ASN1_Types.h
# set errNumb [catch { exec -ignorestderr {*}[auto_execok gcc] -fsyntax-only -c ${aadlId}.c } ]
# if { $errNumb != 0 } {
# set msg "Note: There are syntax errors in your code - check it before you build"
# }
} else {
set msg "Error in execution of \"kate ${aadlId}.c ${aadlId}.h\""
}
} else {
set msg "Error in execution of \"taste-generate-skeletons $aadlFilePath\""
}
cd $initialPath
return [list $errNumb $msg]
}
# asynchronous call
#proc template_internal { aadlFilePath aadlId } {
# exec {*}[auto_execok $::installationPath/config/externalTools/test.bat] $aadlFilePath $aadlId &
# return ""
#}
}
package provide cleanup 0.1
# Delete output (binary) directory
lappend auto_path .
namespace eval cleanup {
# Graphical name of the operation
proc getLabel {} {
return "Cleanup output (binary) directory"
}
# Name of the application this script can be used with
# shall be either InterfaceView or DeploymentView
proc getApplication {} {
return "InterfaceView"
}
# Names of the object this script can be used on
proc getApplyTo {} {
return [list "alwayson" ]
}
# List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} {
return [list statusBar]
}
proc cleanup { args } {
set params [lindex $args 0]
set aadlFilePath [Parameter::getParameter $params aadlFilePath]
set aadlId [Parameter::getParameter $params id]
return [cleanup_internal $aadlFilePath $aadlId]
}
# synchronous call
proc cleanup_internal { aadlFilePath aadlId } {
set initialPath [pwd]
cd [file dirname $aadlFilePath]
set errNumb [catch { exec -ignorestderr {*}[auto_execok "bash"] "-c" "rm -rf binary*"} ]
set msg "Output directory was removed."
cd $initialPath
return [list $errNumb $msg]
}
}
package provide concurrencyview 0.1
lappend auto_path .
namespace eval concurrencyview {
# Graphical name of the operation
proc getLabel {} {
return "Edit Concurrency View"
}
# Name of the application this script can be used with
# shall be either InterfaceView or DeploymentView
proc getApplication {} {
return "DeploymentView"
}
# Names of the object this script can be used on
# FIXME - it should be active all the time
proc getApplyTo {} {
return [list "alwayson" ]
}
# List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} {
return [list statusBar]
}
proc concurrencyview { args } {
set params [lindex $args 0]
set aadlFilePath [Parameter::getParameter $params aadlFilePath]
set aadlId [Parameter::getParameter $params id]
return [concurrencyview_internal $aadlFilePath $aadlId]
}
# the line "exec {*}[auto_execok $::installationPath/config/externalTools/test.bat]"
# ask the current OS which software is to be used to open the file test.bat
# to launch using the absolute path, read the template2.tcl_
# synchronous call
proc concurrencyview_internal { aadlFilePath aadlId } {
set initialPath [pwd]
cd [file dirname $aadlFilePath]
set msg ""
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-edit-concurrency-view"] } ]
cd $initialPath
return [list $errNumb $msg]
}
}
package provide deploymentview 0.1
lappend auto_path .
namespace eval deploymentview {
# Graphical name of the operation
proc getLabel {} {
return "Edit Deployment View"
}
# Name of the application this script can be used with
# shall be either InterfaceView or DeploymentView
proc getApplication {} {
return "InterfaceView"
}
# Names of the object this script can be used on
# FIXME - it should be active all the time
proc getApplyTo {} {
return [list "alwayson" ]
}
# List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} {
return [list statusBar]
}
proc deploymentview { args } {
set params [lindex $args 0]
set aadlFilePath [Parameter::getParameter $params aadlFilePath]
set aadlId [Parameter::getParameter $params id]
return [deploymentview_internal $aadlFilePath $aadlId]
}
# the line "exec {*}[auto_execok $::installationPath/config/externalTools/test.bat]"
# ask the current OS which software is to be used to open the file test.bat
# to launch using the absolute path, read the template2.tcl_
# synchronous call
proc deploymentview_internal { aadlFilePath aadlId } {
set initialPath [pwd]
cd [file dirname $aadlFilePath]
set msg ""
if { [file exists "[pwd]/DeploymentView.aadl" ] } {
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-edit-deployment-view"] } ]
} else {
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-create-deployment-view"] } ]
}
set aadlId [string tolower $aadlId 0 end]
cd $initialPath
return [list $errNumb $msg]
}
# asynchronous call
#proc template_internal { aadlFilePath aadlId } {
# exec {*}[auto_execok $::installationPath/config/externalTools/test.bat] $aadlFilePath $aadlId &
# return ""
#}
}
package provide generate_database 0.1
lappend auto_path .
namespace eval generate_database {
# Graphical name of the operation
proc getLabel {} {
return "Generate database"
}
# Name of the application this script can be used with
# shall be either InterfaceView or DeploymentView
proc getApplication {} {
return "InterfaceView"
}
# Names of the object this script can be used on
# FIXME - it should be active all the time
proc getApplyTo {} {
return [list "alwayson" ]
}
# List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} {
return [list statusBar]
}
proc generate_database { args } {
set params [lindex $args 0]
set aadlFilePath [Parameter::getParameter $params aadlFilePath]
set aadlId [Parameter::getParameter $params id]
return [generate_database_internal $aadlFilePath $aadlId]
}
# synchronous call
proc generate_database_internal { aadlFilePath aadlId } {
set initialPath [pwd]
cd [file dirname $aadlFilePath]
set msg ""
set ::env(FORCE) 1
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-create-database"] } ]
if { $errNumb == 0 } {
set msg "Everything went fine!"
unset ::env(FORCE)
} else {
set msg "Some errors were reported - check the console"
}
cd $initialPath
return [list $errNumb $msg]
}
}
package provide generate_skeletons 0.1
lappend auto_path .
namespace eval generate_skeletons {
# Graphical name of the operation
proc getLabel {} {
return "Generate code skeletons"
}
# Name of the application this script can be used with
# shall be either InterfaceView or DeploymentView
proc getApplication {} {
return "InterfaceView"
}
# Names of the object this script can be used on
# FIXME - it should be active all the time
proc getApplyTo {} {
return [list "alwayson" ]
}
# List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} {
return [list statusBar]
}
proc generate_skeletons { args } {
set params [lindex $args 0]
set aadlFilePath [Parameter::getParameter $params aadlFilePath]
set aadlId [Parameter::getParameter $params id]
return [generate_skeletons_internal $aadlFilePath $aadlId]
}
# synchronous call
proc generate_skeletons_internal { aadlFilePath aadlId } {
set initialPath [pwd]
cd [file dirname $aadlFilePath]
set msg ""
set ::env(FORCE) 1
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-generate-skeletons"] } ]
if { $errNumb == 0 } {
set msg "Everything went fine!"
unset ::env(FORCE)
} else {
set msg "Some errors were reported - check the console"
}
cd $initialPath
return [list $errNumb $msg]
}
}