Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ellidiss-release
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TASTE
ellidiss-release
Commits
daad3289
Commit
daad3289
authored
Oct 03, 2017
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add C++ editor to TASTE GUI
parent
0a35e428
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
0 deletions
+84
-0
TASTE-linux/config/externalTools/cpp_kate.tcl
TASTE-linux/config/externalTools/cpp_kate.tcl
+84
-0
No files found.
TASTE-linux/config/externalTools/cpp_kate.tcl
0 → 100755
View file @
daad3289
package provide cpp_kate 0.1
# C code editor
(
using Kate
)
lappend auto_path .
namespace eval cpp_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"
"CPP"
}
}
]
}
# List of way to manage output in the Framework
# Could be an empty list or one or both of 'dialogBox' and 'statusBar'
proc getOutputManagement
{}
{
## Ticket mantis 0000625
return
[
list statusBar dialogBoxOnError
]
}
proc cpp_kate
{
args
}
{
set params
[
lindex $args 0
]
set aadlFilePath
[
Parameter::getParameter $params aadlFilePath
]
set aadlId
[
Parameter::getParameter $params id
]
return
[
cpp_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 cpp_internal
{
aadlFilePath aadlId
}
{
## Ticket mantis 0000625
set initialPath
[
pwd
]
cd
[
file dirname $aadlFilePath
]
set msg
""
set scriptPath
[
auto_execok
"taste-generate-skeletons"
]
if
{
$scriptPath !=
""
}
{
set errNumb
[
catch
{
exec -ignorestderr
{*}
$script
Path 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 fileBaseName
[
file normalize
"
[
pwd
]
/
$aadl
Id"
]
if
{
$errNumb == 0 &&
[
file exists $fileBaseName
]
}
{
if
{
[
auto_execok kate
]
==
""
}
{
set errNumb -1
set msg
[
list
"Error in execution of
\"
kate
${fileBaseName}
/
${aadlId}
.h
${fileBaseName}
/
${aadlId}
.cc: unknown file kate"
]
}
else
{
ToolsOthers::execAsynchronouslyWithResponse
[
list
"
[
auto_execok kate
]
${fileBaseName}
/
${aadlId}
.h
${fileBaseName}
/
${aadlId}
.cc"
]
\
"::cpp_kateres"
"Kate error report"
"The execution of kate stopped with error"
}
}
elseif
{
$errNumb != 0
}
{
set errNumb -1
set msg
[
list
"Error in execution of
\"
taste-generate-skeletons
$aadl
FilePath
\"
:
\n
$err
Msg"
]
}
else
{
set errNumb -1
set msg
[
list
"Cannot find files:
\n
-
${fileBaseName}
/
${aadlId}
.h
\n
-
${fileBaseName}
/
${aadlId}
.cc"
]
}
cd $initialPath
return
[
list $errNumb $msg
]
}
# asynchronous call
#proc template_internal
{
aadlFilePath aadlId
}
{
# exec
{*}
[
auto_execok $::installationPath/config/externalTools/test.bat
]
$aadlFilePath $aadlId &
# return
""
#
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment