Added procedure arguments into tree
Change read config procedure (error fixed) Fixed error when project running
This commit is contained in:
parent
53672ad0f3
commit
0c58139974
|
@ -6,6 +6,11 @@
|
|||
##########################################################
|
||||
|
||||
0.4.5
|
||||
06.03.2018
|
||||
- Added procedure arguments into tree
|
||||
- Change read config procedure (error fixed)
|
||||
- Fixed error when project running
|
||||
|
||||
05.03.2018
|
||||
- Fixed "Add new file" toolbar button press
|
||||
- Fixed "Control+S" hotkey error
|
||||
|
@ -412,3 +417,4 @@ characters to the right of the insertion cursor.
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
4
errors
4
errors
|
@ -1,4 +0,0 @@
|
|||
Error in startup script: couldn't read file "/home/svk/projects/tcl/projman/lib/lib/main.tcl": no such file or directory
|
||||
while executing
|
||||
"source [file join $dataDir main.tcl]"
|
||||
(file "/home/svk/projects/tcl/projman/projman.tcl" line 98)
|
BIN
img/param.gif
BIN
img/param.gif
Binary file not shown.
Before Width: | Height: | Size: 73 B After Width: | Height: | Size: 119 B |
BIN
img/var.gif
Normal file
BIN
img/var.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 109 B |
|
@ -610,8 +610,8 @@ proc EditFile {tree node fileName} {
|
|||
#-background $editor(bg) -foreground $editor(fg)]
|
||||
set w [$noteBook insert end $node -text "$file" -image [Bitmap::get [file join $imgDir [GetImage $fileName].gif]]]
|
||||
|
||||
#set lblEditFileFullPath [label $w.lblEditFileFullPath -text [regsub -all -- {/|\\} $fileName " > "] -anchor w]
|
||||
#pack $lblEditFileFullPath -side top -fill x
|
||||
EditorFileNavigateMenu $w $fileName
|
||||
|
||||
#puts $w
|
||||
# create array with file names #
|
||||
if {[info exists fileList($node)] != 1} {
|
||||
|
@ -932,6 +932,7 @@ proc ReadFileStructure {mod line lineNumber tree node} {
|
|||
global projDir workDir imgDir noteBook fontNormal fontBold fileList replace nodeEdit procList
|
||||
global backUpFileCreate fileExt progress editor braceHighLightBG braceHighLightFG activeProject
|
||||
global varList
|
||||
set dot "_"
|
||||
|
||||
# Insert procedure names into tree #
|
||||
regsub -all {\t} $line " " line
|
||||
|
@ -959,7 +960,6 @@ proc ReadFileStructure {mod line lineNumber tree node} {
|
|||
#puts "proc $procName $params"
|
||||
}
|
||||
if {$keyWord == "proc" || $keyWord == "let" || $keyWord == "class" || $keyWord == "sub" || $keyWord == "function" || $keyWord == "fun" } {
|
||||
set dot "_"
|
||||
set openBrace [string first "\{" $line]
|
||||
set closeBrace [expr [string first "\}" $line]-1]
|
||||
set var [string range $line $openBrace end]
|
||||
|
@ -971,15 +971,33 @@ proc ReadFileStructure {mod line lineNumber tree node} {
|
|||
}
|
||||
if {[$tree exists $prcNode$dot$lineNumber] !=1} {
|
||||
$tree insert end $node $prcNode$dot$lineNumber -text $procName \
|
||||
-data "prc_$procName"\
|
||||
-image [Bitmap::get [file join $imgDir $img]] -font $fontNormal
|
||||
#$tree insert end $prcNode$dot$lineNumber param_$prcNode$dot$lineNumber -text $params \
|
||||
#-data "prc_$procName" \
|
||||
#-image [Bitmap::get [file join $imgDir param.gif]] -font $fontNormal
|
||||
-data "prc_$procName" -font $fontNormal \
|
||||
-image [Bitmap::get [file join $imgDir $img]]
|
||||
if {[info exists params] == 1 && $params ne ""} {
|
||||
foreach par $params {
|
||||
$tree insert end $prcNode$dot$lineNumber param_$prcNode$dot$lineNumber$dot$par \
|
||||
-text $par -data "param_$procName$dot$par" -font $fontNormal \
|
||||
-image [Bitmap::get [file join $imgDir param.gif]]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if {$keyWord == "set"} {
|
||||
# set var $procName
|
||||
# $tree insert end $node var$dot$lineNumber$dot$var \
|
||||
# -text $var -data "var_$procName$dot$var" -font $fontNormal \
|
||||
# -image [Bitmap::get [file join $imgDir var.gif]]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
# View modern notebook tab header for edited file
|
||||
# like as : "> dir1 > dir2 > file.tcl"
|
||||
proc EditorFileNavigateMenu {w fullPathFile} {
|
||||
set lblEditFileFullPath [label $w.lblEditFileFullPath -text [regsub -all -- {/|\\} $fullPathFile " > "] -anchor w]
|
||||
pack $lblEditFileFullPath -side top -fill x -padx 2 -pady 3
|
||||
}
|
||||
|
||||
####################################
|
||||
GetOp
|
||||
|
||||
|
||||
|
|
|
@ -137,6 +137,17 @@ proc FileDialog {nbNode operation} {
|
|||
# Progress start
|
||||
# LabelUpdate .frmStatus.frmProgress.lblProgress "[::msgcat::mc "Opened file in progress"]"
|
||||
set linesCount [$text count -lines $lineNumber.0 end]
|
||||
|
||||
######## change the active tree if file opened from different tree ######
|
||||
if {[$tree exists $node] == 0 && $tree eq ".frmBody.frmCat.noteBook.fprojects.frmTree.tree"} {
|
||||
set tree .frmBody.frmCat.noteBook.ffiles.frmTreeFiles.treeFiles
|
||||
} elseif {[$tree exists $node] == 0 && $tree eq ".frmBody.frmCat.noteBook.ffiles.frmTreeFiles.treeFiles" } {
|
||||
set tree .frmBody.frmCat.noteBook.fprojects.frmTree.tree
|
||||
} else {
|
||||
return
|
||||
}
|
||||
########## end ########
|
||||
|
||||
foreach item [$tree nodes $node] {
|
||||
puts $item
|
||||
$tree delete $item
|
||||
|
@ -611,12 +622,3 @@ proc FileOperation::FileDialog {tree operation} {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -91,7 +91,3 @@ proc GetMenu {m} {
|
|||
$me add command -label [::msgcat::mc "CP1251"] -command {TextEncode cp1251} -font $fontNormal
|
||||
$me add command -label [::msgcat::mc "CP866"] -command {TextEncode cp866} -font $fontNormal
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -885,6 +885,7 @@ proc MakeProj {action t} {
|
|||
$w.frame.text tag add bold $lineNum.0 $lineNum.end
|
||||
|
||||
# open and manipulate executed program chanel #
|
||||
cd $projDirName
|
||||
if {$action == "compile"} {
|
||||
set cmdCompile ""
|
||||
CompileOption "$projCompiler $prog"
|
||||
|
@ -1010,3 +1011,4 @@ proc InsertTitle {newFile type} {
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -645,3 +645,4 @@ proc Settings {nBook} {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
|
18
projman.tcl
18
projman.tcl
|
@ -64,7 +64,18 @@ if {[file exists [file join $workDir projman.conf]] == 0} {
|
|||
file copy -force -- projman.conf [file join $workDir projman.conf]
|
||||
}
|
||||
|
||||
source [file join $workDir projman.conf]
|
||||
#source [file join $workDir projman.conf]
|
||||
# Read the projman.conf file and setting the variable
|
||||
set config [open [file join $workDir projman.conf] RDONLY]
|
||||
while {[gets $config line]>=0} {
|
||||
if [regexp -nocase -all -line -- {(set)\s(.+)\s"(.+|)"} $line match op var data] {
|
||||
regsub -all -- {\$env\(HOME\)} $data "$env(HOME)" data
|
||||
regsub -all -- {\$workDir} $data "$workDir" data
|
||||
set $var $data
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
## CREATE WORK DIR ##
|
||||
if {[file exists $rpmDir] != 1} {file mkdir $rpmDir}
|
||||
|
@ -160,8 +171,3 @@ option add *Dialog.msg.background $editor(bg)
|
|||
# option add *Entry.highlightBackground $bg userDefault
|
||||
# option add *Text.HighlightThickness 2 userDefault
|
||||
# option add *Entry.HighlightThickness 1 userDefault
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user