Commit 00f069e5 authored by Arnaud Schach's avatar Arnaud Schach

Version 2.0.15 of the TASTE Editors

parent 0cd3b1a4
No preview for this file type
version 2.0.15 (30/05/2017)
* ticket 0000632 : Add an asynchronous start of external tool with error report functionality
* ticket 0000631 : Improve MSC ergonomics
* ticket 0000630 : Default value shall be mandatory for context parameter
* ticket 0000629 : Improve Function Binding ergonomics
* ticket 0000628 : Feature and connection are not exported
* ticket 0000627 : Exporting a not top level function with feature raise a Tcl error
* ticket 0000626 : Error when saving a function with a description
* ticket 0000625 : Dataview generation and external tools error shall be displayed in a popup
* ticket 0000624 : Add an automatic save of the dataview to TASTE Editor
* ticket 0000623 : Error in Search when search field is empty
version 2.0.14 (11/05/2017) version 2.0.14 (11/05/2017)
* ticket 0000616 : pb in AADL connection binding when the iv connection hierarchy label(s) is(are) modified * ticket 0000616 : pb in AADL connection binding when the iv connection hierarchy label(s) is(are) modified
* ticket 0000617 : When a DV is reloaded the bound connection are removed * ticket 0000617 : When a DV is reloaded the bound connection are removed
......
...@@ -10,4 +10,5 @@ property set TASTE_IV_Properties is ...@@ -10,4 +10,5 @@ property set TASTE_IV_Properties is
-- MyReal: aadlreal applies to (System); -- MyReal: aadlreal applies to (System);
-- MyEnum: enumeration (val1, val2, val3, val4) applies to (System); -- MyEnum: enumeration (val1, val2, val3, val4) applies to (System);
MSCFiles : aadlstring applies to (Subprogram); MSCFiles : aadlstring applies to (Subprogram);
-- MSCFiles : list of aadlstring applies to (Subprogram);
end TASTE_IV_Properties; end TASTE_IV_Properties;
...@@ -13,6 +13,7 @@ namespace eval TasteConfig { ...@@ -13,6 +13,7 @@ namespace eval TasteConfig {
"interlineInPercentOfFont" "1.2" \ "interlineInPercentOfFont" "1.2" \
"gitExe" "C:/Program Files/TortoiseGit/bin/git.exe" \ "gitExe" "C:/Program Files/TortoiseGit/bin/git.exe" \
"asn2aadlPath" "asn2aadlPlus" \ "asn2aadlPath" "asn2aadlPlus" \
"mscEditor" "taste-edit-msc" \
} }
variable accelerators { \ variable accelerators { \
...@@ -85,6 +86,7 @@ namespace eval TasteConfig { ...@@ -85,6 +86,7 @@ namespace eval TasteConfig {
"FunctionDV" {"color" "black" "fillColor" "yellow"} \ "FunctionDV" {"color" "black" "fillColor" "yellow"} \
"ConnectionDV" {"color" "black" "fillColor" "yellow"} \ "ConnectionDV" {"color" "black" "fillColor" "yellow"} \
"Comment" {"color" "gray50" "fillColor" "white"} \ "Comment" {"color" "gray50" "fillColor" "white"} \
"BindList" {"color" "gray50" "fillColor" "white"} \
"GenericConnection" {"fillColor" "black"} \ "GenericConnection" {"fillColor" "black"} \
"GenericConnector" {"fillColor" "black"} \ "GenericConnector" {"fillColor" "black"} \
} }
......
...@@ -23,7 +23,12 @@ The list is of the form { { "objecttype" { "atribute1" "value1" }* }* } ...@@ -23,7 +23,12 @@ The list is of the form { { "objecttype" { "atribute1" "value1" }* }* }
If the list is [list "alwayson" ] then the external tool will be active all the time. If the list is [list "alwayson" ] then the external tool will be active all the time.
The getOutputManagement function shall return a list defining the way output result of The getOutputManagement function shall return a list defining the way output result of
external tool is to be managed (either print it in statusBar or in dialogBox) external tool is to be managed:
- print result in status bar ( statusBar in the list)
- print result in dialog box ( dialogBox in the list)
- print result in stdout ( stdout in the list)
- print error in dialog box ( dialogBoxOnError in the list )
- print error in stdout ( stdoutError in the list )
The myScript function is called by the Editor when clicking on the menu. The myScript function is called by the Editor when clicking on the menu.
args is a list of parameters which can be retrieve using the followin command: args is a list of parameters which can be retrieve using the followin command:
......
...@@ -22,7 +22,8 @@ namespace eval ada_kate { ...@@ -22,7 +22,8 @@ namespace eval ada_kate {
# List of way to manage output in the Framework # List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar' # Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} { proc getOutputManagement {} {
return [list statusBar] ## Ticket mantis 0000625
return [list statusBar dialogBoxOnError]
} }
proc ada_kate { args } { proc ada_kate { args } {
...@@ -37,29 +38,36 @@ namespace eval ada_kate { ...@@ -37,29 +38,36 @@ namespace eval ada_kate {
# to launch using the absolute path, read the template2.tcl_ # to launch using the absolute path, read the template2.tcl_
# synchronous call # synchronous call
proc ada_internal { aadlFilePath aadlId } { proc ada_internal { aadlFilePath aadlId } {
## Ticket mantis 0000625
set initialPath [pwd] set initialPath [pwd]
cd [file dirname $aadlFilePath] cd [file dirname $aadlFilePath]
set msg "" set msg ""
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-generate-skeletons"] } ] set scriptPath [auto_execok "taste-generate-skeletons"]
if { $scriptPath != "" } {
set errNumb [catch { exec -ignorestderr {*}$scriptPath 2>@1 } errMsg]
} else {
set errNumb -1
set errMsg "Unknown command taste-generate-skeletons."
}
## Ticket mantis 0000632
set aadlId [string tolower $aadlId 0 end] set aadlId [string tolower $aadlId 0 end]
set fileBaseName [file normalize "[pwd]/$aadlId" ]
if { $errNumb == 0 && [file exists [file normalize "[pwd]/$aadlId" ] ] } { if { $errNumb == 0 && [file exists $fileBaseName ] } {
cd [file normalize "[pwd]/$aadlId" ] if { [auto_execok kate] == "" } {
set errNumb [catch { exec -ignorestderr {*}[auto_execok kate] ${aadlId}.ads ${aadlId}.adb & } ] set errNumb -1
if { $errNumb == 0 } { set msg [list "Error in execution of \"kate ${fileBaseName}/${aadlId}.ads ${fileBaseName}/${aadlId}.adb: unknown file kate" ]
# TODO: check code - but we need to have C_ASN1_Types.h } else {
# set errNumb [catch { exec -ignorestderr {*}[auto_execok gcc] -gnats -c ${aadlId}.c } ] ToolsOthers::execAsynchronouslyWithResponse [list "[auto_execok kate] ${fileBaseName}/${aadlId}.ads ${fileBaseName}/${aadlId}.adb" ] \
# if { $errNumb != 0 } { "::ada_kateres" "Kate error report" "The execution of kate stopped with error"
# set msg "Note: There are syntax errors in your code - check it before you build" }
# } } elseif { $errNumb != 0 } {
} else { set errNumb -1
set msg "Error in execution of \"kate ${aadlId}.ads ${aadlId}.adb\"" set msg [list "Error in execution of \"taste-generate-skeletons $aadlFilePath\": $errMsg" ]
}
} else { } else {
set msg "Error in execution of \"taste-generate-skeletons $aadlFilePath\"" set errNumb -1
set msg [list "Cannot find files:\n-${fileBaseName}/${aadlId}.ads \n-${fileBaseName}/${aadlId}.adb" ]
} }
cd $initialPath cd $initialPath
......
...@@ -22,7 +22,8 @@ namespace eval blackbox { ...@@ -22,7 +22,8 @@ namespace eval blackbox {
# List of way to manage output in the Framework # List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar' # Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} { proc getOutputManagement {} {
return [list statusBar] ## Ticket mantis 0000625
return [list statusBar dialogBoxOnError]
} }
proc blackbox { args } { proc blackbox { args } {
...@@ -37,18 +38,25 @@ namespace eval blackbox { ...@@ -37,18 +38,25 @@ namespace eval blackbox {
# to launch using the absolute path, read the template2.tcl_ # to launch using the absolute path, read the template2.tcl_
# synchronous call # synchronous call
proc bb_internal { aadlFilePath aadlId } { proc bb_internal { aadlFilePath aadlId } {
## Ticket mantis 0000625
set initialPath [pwd] set initialPath [pwd]
cd [file dirname $aadlFilePath] cd [file dirname $aadlFilePath]
set msg "" set msg ""
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-generate-skeletons"] } ] set scriptPath [auto_execok "taste-generate-skeletons"]
if { $scriptPath != "" } {
set errNumb [catch { exec -ignorestderr {*}$scriptPath 2>@1 } errMsg]
} else {
set errNumb -1
set errMsg "Unknown command taste-generate-skeletons."
}
set aadlId [string tolower $aadlId 0 end] set aadlId [string tolower $aadlId 0 end]
if { $errNumb == 0 && [file exists [file normalize "[pwd]/$aadlId" ] ] } { if { $errNumb == 0 && [file exists [file normalize "[pwd]/$aadlId" ] ] } {
cd [file normalize "[pwd]/$aadlId" ] cd [file normalize "[pwd]/$aadlId" ]
set errNumb [catch { exec -ignorestderr {*}[auto_execok kate] ${aadlId}.h ${aadlId}.c & } ] set errNumb [catch { exec -ignorestderr {*}[auto_execok kate] ${aadlId}.h ${aadlId}.c 2>@1 & } errMsg]
if { $errNumb == 0 } { if { $errNumb == 0 } {
# TODO: check code - but we need to have C_ASN1_Types.h # 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 } ] # set errNumb [catch { exec -ignorestderr {*}[auto_execok gcc] -fsyntax-only -c ${aadlId}.c } ]
...@@ -56,10 +64,10 @@ namespace eval blackbox { ...@@ -56,10 +64,10 @@ namespace eval blackbox {
# set msg "Note: There are syntax errors in your code - check it before you build" # set msg "Note: There are syntax errors in your code - check it before you build"
# } # }
} else { } else {
set msg "Error in execution of \"kate ${aadlId}.c ${aadlId}.h\"" set msg [list "Error in execution of \"kate ${aadlId}.c ${aadlId}.h\": $errMsg" ]
} }
} else { } else {
set msg "Error in execution of \"taste-generate-skeletons $aadlFilePath\"" set msg [list "Error in execution of \"taste-generate-skeletons $aadlFilePath\": $errMsg" ]
} }
cd $initialPath cd $initialPath
......
...@@ -23,7 +23,8 @@ namespace eval build_c { ...@@ -23,7 +23,8 @@ namespace eval build_c {
# List of way to manage output in the Framework # List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar' # Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} { proc getOutputManagement {} {
return [list statusBar] ## Ticket mantis 0000625
return [list statusBar dialogBoxOnError]
} }
proc build_c { args } { proc build_c { args } {
...@@ -35,15 +36,22 @@ namespace eval build_c { ...@@ -35,15 +36,22 @@ namespace eval build_c {
# synchronous call # synchronous call
proc build_internal { aadlFilePath aadlId } { proc build_internal { aadlFilePath aadlId } {
## Ticket mantis 0000625
set initialPath [pwd] set initialPath [pwd]
cd [file dirname $aadlFilePath] cd [file dirname $aadlFilePath]
set msg "" set msg ""
set ::env(ORCHESTRATOR_OPTIONS) "-p" set ::env(ORCHESTRATOR_OPTIONS) "-p"
set errNumb [catch { exec [auto_execok "taste-build-system"] } ] set scriptPath [auto_execok "taste-build-system"]
if { $scriptPath != "" } {
set errNumb [catch { exec -ignorestderr {*}$scriptPath 2>@1 } errMsg]
} else {
set errNumb -1
set errMsg "Unknown command taste-build-system."
}
if { $errNumb == 0 } { if { $errNumb == 0 } {
set msg "Everything went fine!" set msg [list "Everything went fine!" ]
} else { } else {
set msg "Some errors were reported - check the console" set msg [list "Some errors were reported: $errMsg" ]
} }
unset ::env(ORCHESTRATOR_OPTIONS) unset ::env(ORCHESTRATOR_OPTIONS)
......
...@@ -22,7 +22,8 @@ namespace eval c_kate { ...@@ -22,7 +22,8 @@ namespace eval c_kate {
# List of way to manage output in the Framework # List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar' # Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} { proc getOutputManagement {} {
return [list statusBar] ## Ticket mantis 0000625
return [list statusBar dialogBoxOnError]
} }
proc c_kate { args } { proc c_kate { args } {
...@@ -37,29 +38,37 @@ namespace eval c_kate { ...@@ -37,29 +38,37 @@ namespace eval c_kate {
# to launch using the absolute path, read the template2.tcl_ # to launch using the absolute path, read the template2.tcl_
# synchronous call # synchronous call
proc c_internal { aadlFilePath aadlId } { proc c_internal { aadlFilePath aadlId } {
## Ticket mantis 0000625
set initialPath [pwd] set initialPath [pwd]
cd [file dirname $aadlFilePath] cd [file dirname $aadlFilePath]
set msg "" set msg ""
set scriptPath [auto_execok "taste-generate-skeletons"]
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-generate-skeletons"] } ] if { $scriptPath != "" } {
set errNumb [catch { exec -ignorestderr {*}$scriptPath 2>@1 } errMsg ]
} else {
set errNumb -1
set errMsg "Unknown command taste-generate-skeletons."
}
## Ticket mantis 0000632
set aadlId [string tolower $aadlId 0 end] set aadlId [string tolower $aadlId 0 end]
set fileBaseName [file normalize "[pwd]/$aadlId" ]
if { $errNumb == 0 && [file exists [file normalize "[pwd]/$aadlId" ] ] } { if { $errNumb == 0 && [file exists $fileBaseName ] } {
cd [file normalize "[pwd]/$aadlId" ] if { [auto_execok kate] == "" } {
set errNumb [catch { exec -ignorestderr {*}[auto_execok kate] ${aadlId}.h ${aadlId}.c & } ] set errNumb -1
if { $errNumb == 0 } { set msg [list "Error in execution of \"kate ${fileBaseName}/${aadlId}.h ${fileBaseName}/${aadlId}.c: unknown file kate" ]
# TODO: check code - but we need to have C_ASN1_Types.h } else {
# set errNumb [catch { exec -ignorestderr {*}[auto_execok gcc] -fsyntax-only -c ${aadlId}.c } ] ToolsOthers::execAsynchronouslyWithResponse [list "[auto_execok kate] ${fileBaseName}/${aadlId}.h ${fileBaseName}/${aadlId}.c" ] \
# if { $errNumb != 0 } { "::c_kateres" "Kate error report" "The execution of kate stopped with error"
# set msg "Note: There are syntax errors in your code - check it before you build" }
# } } elseif { $errNumb != 0 } {
} else { set errNumb -1
set msg "Error in execution of \"kate ${aadlId}.c ${aadlId}.h\"" set msg [list "Error in execution of \"taste-generate-skeletons $aadlFilePath\":\n$errMsg" ]
}
} else { } else {
set msg "Error in execution of \"taste-generate-skeletons $aadlFilePath\"" set errNumb -1
set msg [list "Cannot find files:\n-${fileBaseName}/${aadlId}.h \n-${fileBaseName}/${aadlId}.c" ]
} }
cd $initialPath cd $initialPath
......
...@@ -23,11 +23,12 @@ namespace eval concurrencyview { ...@@ -23,11 +23,12 @@ namespace eval concurrencyview {
# List of way to manage output in the Framework # List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar' # Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} { proc getOutputManagement {} {
return [list ] ## Ticket mantis 0000625
return [list dialogBoxOnError ]
} }
proc concurrencyview { args } { proc concurrencyview { args } {
if { [Object::getAttribute "concurrencyview" state] == "modified" } { if { [Object::getAttribute "concurrencyview" state] == "deprecated" } {
Context::setAttribute "concurrencyview" state "normal" Context::setAttribute "concurrencyview" state "normal"
if { [ string match win32*64 [::platform::identify]] || [ string match win32* [::platform::identify]] } { if { [ string match win32*64 [::platform::identify]] || [ string match win32* [::platform::identify]] } {
return [concurrencyviewWindows_internal ] return [concurrencyviewWindows_internal ]
...@@ -158,7 +159,7 @@ namespace eval concurrencyview { ...@@ -158,7 +159,7 @@ namespace eval concurrencyview {
set res [catch { exec taste-config --prefix } tasteConfigDir ] set res [catch { exec taste-config --prefix } tasteConfigDir ]
if { $res != 0 } { if { $res != 0 } {
#~ an error happend #~ an error happend
return [list 1 "taste-config error: $tasteConfigDir"] return [list 1 [list "taste-config error: $tasteConfigDir"] ]
} else { } else {
set AADL_IV_PROPERTIES "$tasteConfigDir/share/config_ellidiss/TASTE_IV_Properties.aadl" set AADL_IV_PROPERTIES "$tasteConfigDir/share/config_ellidiss/TASTE_IV_Properties.aadl"
set AADL_DV_PROPERTIES "$tasteConfigDir/share/config_ellidiss/TASTE_DV_Properties.aadl" set AADL_DV_PROPERTIES "$tasteConfigDir/share/config_ellidiss/TASTE_DV_Properties.aadl"
...@@ -168,7 +169,7 @@ namespace eval concurrencyview { ...@@ -168,7 +169,7 @@ namespace eval concurrencyview {
file delete -force $tempdir file delete -force $tempdir
file mkdir $tempdir file mkdir $tempdir
set res [ catch { exec buildsupport -i ${ivFilename} -c ${dvFilename} -d ${dtFilename} ${AADL_IV_PROPERTIES} ${AADL_DV_PROPERTIES} ${OCARINA_COMPONENTS} -glue -gw -o ${tempdir} } errMsg ] set res [ catch { exec buildsupport -i ${ivFilename} -c ${dvFilename} -d ${dtFilename} ${AADL_IV_PROPERTIES} ${AADL_DV_PROPERTIES} ${OCARINA_COMPONENTS} -glue -gw -o ${tempdir} 2>@1 } errMsg ]
if { [file exists "$tempdir/ConcurrencyView/process.aadl" ] } { if { [file exists "$tempdir/ConcurrencyView/process.aadl" ] } {
file delete -force "$cvFilename" file delete -force "$cvFilename"
...@@ -188,7 +189,7 @@ namespace eval concurrencyview { ...@@ -188,7 +189,7 @@ namespace eval concurrencyview {
puts $chan $content puts $chan $content
close $chan close $chan
} else { } else {
return [list 1 "buildsupport error: $errMsg"] return [list 1 [list "buildsupport error:\n$errMsg" ] ]
} }
::API::HMI::loadUI "$cvFilename" "concurrencyview" ::API::HMI::loadUI "$cvFilename" "concurrencyview"
...@@ -196,7 +197,7 @@ namespace eval concurrencyview { ...@@ -196,7 +197,7 @@ namespace eval concurrencyview {
return [list 0 ""] return [list 0 ""]
} else { } else {
return [ list -1 "Dataview, Interfaceview and Deploymentview shall be loaded." ] return [ list -1 [list "Dataview, Interfaceview and Deploymentview shall be loaded." ] ]
} }
} }
} }
...@@ -23,7 +23,8 @@ namespace eval generate_skeletons { ...@@ -23,7 +23,8 @@ namespace eval generate_skeletons {
# List of way to manage output in the Framework # List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar' # Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} { proc getOutputManagement {} {
return [list statusBar] ## Ticket mantis 0000625
return [list statusBar dialogBoxOnError]
} }
proc generate_skeletons { args } { proc generate_skeletons { args } {
...@@ -35,16 +36,23 @@ namespace eval generate_skeletons { ...@@ -35,16 +36,23 @@ namespace eval generate_skeletons {
# synchronous call # synchronous call
proc generate_skeletons_internal { aadlFilePath aadlId } { proc generate_skeletons_internal { aadlFilePath aadlId } {
## Ticket mantis 0000625
set initialPath [pwd] set initialPath [pwd]
cd [file dirname $aadlFilePath] cd [file dirname $aadlFilePath]
set msg "" set msg ""
set ::env(FORCE) 1 set ::env(FORCE) 1
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-generate-skeletons"] } ] set scriptPath [auto_execok "taste-generate-skeletons"]
if { $scriptPath != "" } {
set errNumb [catch { exec -ignorestderr {*}$scriptPath 2>@1 } errMsg]
} else {
set errNumb -1
set errMsg "Unknown command taste-generate-skeletons."
}
if { $errNumb == 0 } { if { $errNumb == 0 } {
set msg "Everything went fine!" set msg [list "Everything went fine!" ]
unset ::env(FORCE) unset ::env(FORCE)
} else { } else {
set msg "Some errors were reported - check the console" set msg [list "Some errors were reported: $errMsg" ]
} }
cd $initialPath cd $initialPath
......
...@@ -22,7 +22,8 @@ namespace eval mscEditor { ...@@ -22,7 +22,8 @@ namespace eval mscEditor {
# List of way to manage output in the Framework # List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar' # Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} { proc getOutputManagement {} {
return [list "statusBar"] ## Ticket mantis 0000625
return [list statusBar dialogBoxOnError]
} }
proc saveCurrentFile {} { proc saveCurrentFile {} {
...@@ -30,6 +31,7 @@ namespace eval mscEditor { ...@@ -30,6 +31,7 @@ namespace eval mscEditor {
} }
proc mscEditor { args } { proc mscEditor { args } {
## Ticket mantis 0000625
set errNumb -1 set errNumb -1
set msg "msc editor has not been executed" set msg "msc editor has not been executed"
...@@ -50,11 +52,11 @@ namespace eval mscEditor { ...@@ -50,11 +52,11 @@ namespace eval mscEditor {
#dputs "msce.py -o $mscfile" #dputs "msce.py -o $mscfile"
#set errNumb [catch { exec {*}[auto_execok $::installationPath/config/externalTools/test.bat] $aadlFilePath $aadlId } msg ] #set errNumb [catch { exec {*}[auto_execok $::installationPath/config/externalTools/test.bat] $aadlFilePath $aadlId } msg ]
} else { } else {
set errNumb [catch { exec msce.py -o "$mscfile" &} msg ] set errNumb [catch { exec msce.py -o "$mscfile" 2>@1 &} msg ]
} }
} else { } else {
set errNumb -1 set errNumb -1
set msg "the file $mscfile does not exist" set msg [list "the file $mscfile does not exist" ]
} }
} }
......
...@@ -16,13 +16,14 @@ namespace eval opengeode { ...@@ -16,13 +16,14 @@ namespace eval opengeode {
# Names of the object this script can be used on # Names of the object this script can be used on
proc getApplyTo {} { proc getApplyTo {} {
## Ticket mantis 0000625
return [list { "Function" {"Source_Language" "SDL"} } ] return [list { "Function" {"Source_Language" "SDL"} } ]
} }
# List of way to manage output in the Framework # List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar' # Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} { proc getOutputManagement {} {
return [list statusBar] return [list statusBar dialogBoxOnError]
} }
proc opengeode { args } { proc opengeode { args } {
...@@ -38,27 +39,36 @@ namespace eval opengeode { ...@@ -38,27 +39,36 @@ namespace eval opengeode {
# synchronous call # synchronous call
proc opengeode_internal { aadlFilePath aadlId } { proc opengeode_internal { aadlFilePath aadlId } {
## Ticket mantis 0000625
set initialPath [pwd] set initialPath [pwd]
cd [file dirname $aadlFilePath] cd [file dirname $aadlFilePath]
set msg "" set msg ""
set errNumb [catch { exec -ignorestderr {*}[auto_execok "taste-generate-skeletons"] } ] set scriptPath [auto_execok "taste-generate-skeletons"]
if { $scriptPath != "" } {
set errNumb [catch { exec -ignorestderr {*}$scriptPath 2>@1 } errMsg]
} else {
set errNumb -1
set errMsg "Unknown command taste-generate-skeletons."
}
## Ticket mantis 0000632
set aadlId [string tolower $aadlId 0 end] set aadlId [string tolower $aadlId 0 end]
set fileBaseName [file normalize "[pwd]/$aadlId" ]
if { $errNumb == 0 && [file exists [file normalize "[pwd]/$aadlId" ] ] } { if { $errNumb == 0 && [file exists $fileBaseName ] } {
cd [file normalize "[pwd]/$aadlId" ] if { [auto_execok opengeode] == "" } {
set errNumb [catch { exec -ignorestderr {*}[auto_execok opengeode] system_structure.pr ${aadlId}.pr } ] set errNumb -1
if { $errNumb == 0 } { set msg [list "Error in execution of \"opengeode system_structure.pr ${fileBaseName}/${aadlId}.pr: unknown file opengeode" ]
set errNumb [catch { exec -ignorestderr {*}[auto_execok opengeode] --toAda system_structure.pr ${aadlId}.pr } ] } else {
if { $errNumb != 0 } { ToolsOthers::execAsynchronouslyWithResponse [list "[auto_execok opengeode] ${fileBaseName}/system_structure.pr ${fileBaseName}/${aadlId}.pr " \
set msg "Error in execution of \"opengeode --toAda system_structure.pr ${aadlId}.pr\"" "[auto_execok opengeode] --toAda ${fileBaseName}/system_structure.pr ${fileBaseName}/${aadlId}.pr" ] \
} "::opengeoderes" "Opengeode error report" "The execution of opengeode stopped with error"
} else { }
set msg "Error in execution of \"opengeode system_structure.pr ${aadlId}.pr\"" } elseif { $errNumb != 0 } {
} set errNumb -1
set msg [list "Error in execution of \"taste-generate-skeletons $aadlFilePath\": $errMsg" ]
} else { } else {
set msg "Error in execution of \"taste-generate-skeletons $aadlFilePath\"" set errNumb -1
set msg [list "Cannot find file:\n-${fileBaseName}/${aadlId}.pr" ]
} }
cd $initialPath cd $initialPath
......
...@@ -22,7 +22,7 @@ namespace eval template { ...@@ -22,7 +22,7 @@ namespace eval template {
# List of way to manage output in the Framework # List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar' # Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} { proc getOutputManagement {} {
return [list dialogBox statusBar] return [list statusBar dialogBoxOnError]
} }
proc template { args } { proc template { args } {
...@@ -39,11 +39,11 @@ namespace eval template { ...@@ -39,11 +39,11 @@ namespace eval template {
# synchronous call # synchronous call
proc template_internal { aadlFilePath aadlId } { proc template_internal { aadlFilePath aadlId } {
if { $::tcl_platform(platform) == "windows" } { if { $::tcl_platform(platform) == "windows" } {
set errNumb [catch { exec {*}[auto_execok $::installationPath/config/externalTools/test.bat] $aadlFilePath $aadlId } msg ] set errNumb [catch { exec {*}[auto_execok $::installationPath/config/externalTools/test.bat] $aadlFilePath $aadlId 2>@1 } msg ]
} else { } else {
set errNumb [catch { exec $::installationPath/config/externalTools/test.sh $aadlFilePath $aadlId } msg ] set errNumb [catch { exec $::installationPath/config/externalTools/test.sh $aadlFilePath $aadlId 2>@1 } msg ]
} }
return [list $errNumb $msg] return [list $errNumb [list $msg] ]
} }
# asynchronous call # asynchronous call
......
...@@ -22,7 +22,7 @@ namespace eval template2 { ...@@ -22,7 +22,7 @@ namespace eval template2 {
# List of way to manage output in the Framework # List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar' # Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement {} { proc getOutputManagement {} {
return [list dialogBox statusBar] return [list statusBar dialogBoxOnError]
} }
proc template2 { args } { proc template2 { args } {
...@@ -34,7 +34,7 @@ namespace eval template2 { ...@@ -34,7 +34,7 @@ namespace eval template2 {
# synchronous call # synchronous call
proc template2_internal { aadlFilePath aadlId } { proc template2_internal { aadlFilePath aadlId } {
set msg "File path: $aadlFilePath \nAADL function id: $aadlId" set msg [list "File path: $aadlFilePath \nAADL function id: $aadlId" ]
return [list 0 $msg] return [list 0 $msg]
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment