At startup, TASTE parse the externalTools directory and add to the Tool menu
the .tcl script providing external tool corresponding to the current interface.

It is mandatory that a script called myScript.tcl:
- provides the package myScript
- defines its methodsin the namespace myScrypt
- provides the following methods:
      * getLabel {} 
      * getApplication {} 
      * getApplyTo {} 
      * getOutputManagement {}
      * myScript { args }

The getLabel function shall return a string defining the graphical name of the external 
tool that will be displayed in the TASTE editor.

The getApplication function shall return a string defining the kind of TASTE editor this
tool can be used (eiter InterfaceView of DeploymentView)

The getApplyTo function shall return a list defining the kind of TASTE element this
tool can be used on
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 "allContext"   ] then the external tool will be active all the time in all context.

The getOutputManagement function shall return a list defining the way output result of
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.
args is a list of parameters which can be retrieve using the followin command:
   Parameter::getParameter $args "paramName"
ParamName can be one of the following:
    * aadlFilePath (path to the aadl file)
    * package (package containing the element instance)
    * componentType (name of the aadl type in the package containing the element instance)
    * componentImpl (name of the aadl implementation in the package containing the element instance)
    * id (name of the element element instance)
The return of myScript function shall be:
    * either "" if the external tool is called asynchronously
    * or a list of the form {errorNumber, message}  if the external tool is called synchronously


 

template.tcl_ and template2.tcl_ are examples of Tcl scripts used to add an external tool to TASTE.

