From 9b083515ba7a96f741ba13b1b763d807f5115a89 Mon Sep 17 00:00:00 2001 From: Sergey Kalinin Date: Mon, 27 Oct 2025 19:32:08 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BC=D0=B5=D0=BD=D1=8C=D1=88=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BA=D0=BE=D0=BB=D0=B4=D0=B8=D1=87=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=B2=D0=BE=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=D0=B8=D0=BC=D0=BE?= =?UTF-8?q?=D0=B9=20=D0=BE=D1=82=D0=BB=D0=B0=D0=B4=D0=BE=D1=87=D0=BD=D0=BE?= =?UTF-8?q?=D0=B9=20=D0=B8=D0=BD=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 7 +++++++ lib/editor.tcl | 46 +++++++++++++++++++++---------------------- lib/files.tcl | 12 +++++------ lib/git.tcl | 26 ++++++++++++------------ lib/procedure.tcl | 16 +++++++-------- lib/readstructure.tcl | 18 ++++++++--------- projman.tcl | 2 +- 7 files changed, 67 insertions(+), 60 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6bc7331..763e9db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +projman (2.0.0-alpha18) stable; urgency=medium + + * Новая сборка + + -- Sergey Kalinin Mon, 27 Oct 2025 14:48:18 +0300 + projman (2.0.0-alpha18) stable; urgency=medium * Добавлено определение пути до git в зависимости от платформы. @@ -368,3 +374,4 @@ projman (2.0.0-alfa0) stable; urgency=medium + diff --git a/lib/editor.tcl b/lib/editor.tcl index 5f8ded2..b92dfe6 100644 --- a/lib/editor.tcl +++ b/lib/editor.tcl @@ -94,7 +94,7 @@ namespace eval Editor { # } set commentProcedure "GetComment" - puts "$fileType, $commentProcedure" + # puts "$fileType, $commentProcedure" if {$selIndex != ""} { set lineBegin [lindex [split [lindex $selIndex 0] "."] 0] set lineEnd [lindex [split [lindex $selIndex 1] "."] 0] @@ -140,10 +140,10 @@ namespace eval Editor { set cmd "regexp -nocase -indices -- {(^|\s+)\\s*($symbol\\s*)(.*)} {$str} match v1 v2 v3" - puts $cmd + # puts $cmd # puts [eval $cmd] if [eval $cmd] { - puts "$match, $v2, $v3" + # puts "$match, $v2, $v3" return [list [lindex [split $v2] 0] [lindex [split $v3] 0]] } else { return 0 @@ -253,7 +253,7 @@ namespace eval Editor { $txt highlight $lineBegin.0 $lineEnd.end } else { set str [$txt get $lineNum.0 $lineNum.end] - puts ">>>>> $str" + # puts ">>>>> $str" if {[regexp -nocase -indices -- {(^\s*)(.*?)} $str match v1]} { set posBegin [lindex [split $v1] 0] set posEnd [lindex [split $v1] 1] @@ -277,7 +277,7 @@ namespace eval Editor { set pos [$txt index insert] set lineNum [lindex [split $pos "."] 0] set posNum [lindex [split $pos "."] 1] - puts "$pos" + # puts "$pos" if {$lineNum > 1} { # get current text set curText [$txt get $lineNum.0 "$lineNum.0 lineend"] @@ -398,7 +398,7 @@ namespace eval Editor { set win .varhelper # if { [winfo exists $win] == 0 } { return } set ind [$win.lBox curselection] - puts ">>>>>>>>>>>> VarHelperBind <<<<<<<<<<<<<<<<" + # puts ">>>>>>>>>>>> VarHelperBind <<<<<<<<<<<<<<<<" switch -- $K { Prior { @@ -443,7 +443,7 @@ namespace eval Editor { } } ;# proc auto_completition_key proc VarHelperEscape {w} { - puts ">>>>>>>>>>>> VarHelperEscape <<<<<<<<<<<<<<<<" + # puts ">>>>>>>>>>>> VarHelperEscape <<<<<<<<<<<<<<<<" # bindtags $w [list [winfo parent $w] $w Text sysAfter all] bindtags $w [list [winfo toplevel $w] $w Ctext sysAfter all] catch { destroy .varhelper } @@ -464,7 +464,7 @@ namespace eval Editor { puts "You have selected text [$txt tag ranges sel]" return } - puts "$x $y $w $word $wordType" + # puts "$x $y $w $word $wordType" set fileType [dict get $editors $txt fileType] if {[dict exists $editors $txt variableList] != 0} { @@ -762,7 +762,7 @@ namespace eval Editor { } ## GET KEYS CODE ## proc Key {key str} { - puts "Pressed key code: $key, $str" + # puts "Pressed key code: $key, $str" if {$key >= 10 && $key <= 22} {return "true"} if {$key >= 24 && $key <= 36} {return "true"} if {$key >= 38 && $key <= 50} {return "true"} @@ -890,7 +890,7 @@ namespace eval Editor { set lineNum [lindex [split $pos "."] 0] set posNum [lindex [split $pos "."] 1] set symbol [string trim [string trimleft $symbol "\\"]] - puts "Selindex : $selIndex, cursor position: $pos, Symbol: $symbol" + # puts "Selindex : $selIndex, cursor position: $pos, Symbol: $symbol" if {$selIndex != ""} { set lineBegin [lindex [split [lindex $selIndex 0] "."] 0] set posBegin [lindex [split [lindex $selIndex 0] "."] 1] @@ -898,7 +898,7 @@ namespace eval Editor { set posEnd [lindex [split [lindex $selIndex 1] "."] 1] set selText [$txt get $lineBegin.$posBegin $lineEnd.$posEnd] # set selText $selectionText - puts "Selected text: $selText, pos: $pos, lineBegin: $lineBegin, posBegin: $posBegin, pos end: $posEnd" + # puts "Selected text: $selText, pos: $pos, lineBegin: $lineBegin, posBegin: $posBegin, pos end: $posEnd" if {$posNum == $posEnd} { $txt insert $lineBegin.$posBegin "$symbol" } @@ -960,7 +960,7 @@ namespace eval Editor { if {[eval [dict get $lexers $fileType procRegexpCommand]]} { set procName_ [string trim $procName] if {$treeItemName ne ""} { - puts [Tree::InsertItem $tree $treeItemName $procName_ "procedure" "$procName_ ($params)"] + Tree::InsertItem $tree $treeItemName $procName_ "procedure" "$procName_ ($params)" } lappend procList [list $procName_ $params] unset procName_ @@ -984,7 +984,7 @@ namespace eval Editor { } else { set varType "" } - puts "variable: $varName, value: $varValue, type: $varType" + # puts "variable: $varName, value: $varValue, type: $varType" lappend varList [list $varName $varValue] } } @@ -994,7 +994,7 @@ namespace eval Editor { } proc FindFunction {txt findString} { - puts "txt: $txt, $findString" + # puts "txt: $txt, $findString" set pos "0.0" $txt see $pos set line [lindex [split $pos "."] 0] @@ -1061,7 +1061,7 @@ namespace eval Editor { # Вызов диалога со списком процедур или функций присутствующих в тексте proc GoToFunction { w } { global tree editors - puts $w + # puts $w # set txt $w.frmText.t set txt $w set box [$txt bbox insert] @@ -1071,7 +1071,7 @@ namespace eval Editor { # puts "--$txt" # puts $editors($txt) foreach item [dict get $editors $txt procedureList] { - puts $item + # puts $item lappend l [lindex $item 0] } if {$l ne ""} { @@ -1163,7 +1163,7 @@ namespace eval Editor { proc FindReplaceText {txt findString replaceString regexp} { global nbEditor - puts [focus] + # puts [focus] # set txt [$nbEditor select].frmText.t $txt tag remove sel 1.0 end # $txt see $pos @@ -1192,7 +1192,7 @@ namespace eval Editor { set lstFindIndex [$txt search -all -nocase -count matchIndexPair $findString $line.$x end] # set symNumbers [string length "$findString"] } - puts $lstFindIndex + # puts $lstFindIndex # puts $matchIndexPair # set lstFindIndex [$txt search -all "$selectionText" 0.0] @@ -1206,7 +1206,7 @@ namespace eval Editor { set selFindRow [lindex [split $ind "."] 1] # set endInd "$selFindLine.[expr $selFindRow + $symNumbers]" set endInd "$selFindLine.[expr [lindex $matchIndexPair $i] + $selFindRow]" - puts "$ind; $selFindLine, $selFindRow; $endInd " + # puts "$ind; $selFindLine, $selFindRow; $endInd " if {$replaceString ne ""} { $txt replace $ind $endInd $replaceString # Вычисляем индекс вхождения строки после замены для выделения в тексте @@ -1259,7 +1259,7 @@ namespace eval Editor { } else { if {[$nbEditor select] ne ""} { set txt [$nbEditor select].frmText.t - puts $txt + # puts $txt } else { return } @@ -1347,7 +1347,7 @@ namespace eval Editor { # Horizontal split the Editor text widget proc SplitEditorH {w fileType nb} { global cfgVariables - puts [$w.panelTxt panes] + # puts [$w.panelTxt panes] if [winfo exists $w.frmText2] { $w.panelTxt forget $w.frmText2 destroy $w.frmText2 @@ -1489,8 +1489,8 @@ namespace eval Editor { dict set editors $txt fileType $fileType dict set editors $txt procedureList [list] - puts ">>[dict get $editors $txt fileType]" - puts ">>[dict get $editors $txt procedureList]" + # puts ">>[dict get $editors $txt fileType]" + # puts ">>[dict get $editors $txt procedureList]" # puts ">>>>> $editors" if {[info procs ::Highlight::$fileType] ne ""} { diff --git a/lib/files.tcl b/lib/files.tcl index a26566c..ee0600a 100644 --- a/lib/files.tcl +++ b/lib/files.tcl @@ -47,7 +47,7 @@ namespace eval FileOper { # линуксовый file не всегда корректно определяет тип файла # используем пакет из tcl lassign [::fileutil::fileType $fileFullPath] fType fBinaryType fBinaryInterp - puts "File type is $fType, $fBinaryType, $fBinaryInterp" + # puts "File type is $fType, $fBinaryType, $fBinaryInterp" switch $fType { "binary" { @@ -268,7 +268,7 @@ namespace eval FileOper { } set nbEditorItem [$nbEditor select] - puts "Saved editor text: $nbEditorItem" + # puts "Saved editor text: $nbEditorItem" if [string match "*untitled*" $nbEditorItem] { set filePath [tk_getSaveFile -initialdir $dir -filetypes $::types -parent .] if {$filePath eq ""} { @@ -287,7 +287,7 @@ namespace eval FileOper { set editedText [$nbEditorItem.frmText.t get 0.0 end] set f [open $filePath "w+"] puts -nonewline $f $editedText - puts "$f was saved" + # puts "$f was saved" close $f ResetModifiedFlag $nbEditorItem $nbEditor } @@ -316,7 +316,7 @@ namespace eval FileOper { proc ReadFolder {directory {parent ""}} { global tree dir lexers project - puts "Read the folder $directory" + # puts "Read the folder $directory" set rList "" if {[catch {cd $directory}] != 0} { return "" @@ -388,7 +388,7 @@ namespace eval FileOper { # Delete emty last line if {[$txt get {end-1 line} end] eq "\n" || [$txt get {end-1 line} end] eq "\r\n"} { $txt delete {end-1 line} end - puts ">[$txt get {end-1 line} end]<" + # puts ">[$txt get {end-1 line} end]<" } $txt see 1.0 } @@ -398,7 +398,7 @@ namespace eval FileOper { if {[file exists $fileFullPath] == 0} { return false } else { - puts "$fileFullPath File type [::fileutil::magic::filetype $fileFullPath]" + # puts "$fileFullPath File type [::fileutil::magic::filetype $fileFullPath]" set fileType [FileOper::GetFileMimeType $fileFullPath] } switch $fileType { diff --git a/lib/git.tcl b/lib/git.tcl index daaa59d..08a7a06 100644 --- a/lib/git.tcl +++ b/lib/git.tcl @@ -91,8 +91,8 @@ namespace eval Git { } } catch $cmd pipe - puts $cmd - puts $pipe + # puts $cmd + # puts $pipe if [regexp -nocase -- {^error:} $pipe match] { ShowMessage "Command: '$cmd' error" $pipe return @@ -122,7 +122,7 @@ namespace eval Git { } else { return "" } - puts $activeProject + # puts $activeProject lappend cmd $cfgVariables(gitCommand) lappend cmd "branch" # lappend cmd "-s" @@ -167,7 +167,7 @@ namespace eval Git { lappend cmd "--" lappend cmd $activeProject catch $cmd pipe - puts $cmd + # puts $cmd if [regexp -nocase -- {^fatal:} $pipe match] { ShowMessage "Command: '$cmd' error" $pipe return @@ -189,7 +189,7 @@ namespace eval Git { lappend cmd "--" lappend cmd [file join $activeProject [string trimleft $f "../"]] catch $cmd pipe - puts $cmd + # puts $cmd if [regexp -nocase -- {^fatal:} $pipe match] { ShowMessage "Command: '$cmd' error" $pipe return @@ -250,7 +250,7 @@ namespace eval Git { # set cmd exec cd $activeProject set url [Git::GetConfig remote.origin.url] - puts $url + # puts $url if [regexp -nocase -all -- {^(http|https)://(.+)} $url match proto address] { Git::AuthorizationDialog "[::msgcat::mc "Authorization required"] [::msgcat::mc "for"] Git" $url } else { @@ -270,7 +270,7 @@ namespace eval Git { # lappend cmd "$activeProject" # puts "$cmd" catch $cmd pipe - puts $pipe + # puts $pipe if [regexp -nocase -- {^fatal:} $pipe match] { ShowMessage "Command: '$cmd' error" $pipe return @@ -323,7 +323,7 @@ namespace eval Git { $w.body.lCommit delete $itemNumber } catch $cmd pipe - puts $cmd + # puts $cmd $w.body.t delete 1.0 end } @@ -379,7 +379,7 @@ namespace eval Git { $w.body.t delete 1.0 end set i 0 foreach line [Git::Diff $fileName] { - puts $line + # puts $line if {$i > 3} { $w.body.t inser end "$line\n" } @@ -403,7 +403,7 @@ namespace eval Git { $w.body.lBox delete $itemNumber } catch $cmd pipe - puts $cmd + # puts $cmd $w.body.t delete 1.0 end } @@ -418,7 +418,7 @@ namespace eval Git { puts $cmd catch $cmd pipe - puts $pipe + # puts $pipe return } proc Config {repo user email} { @@ -429,7 +429,7 @@ namespace eval Git { lappend cmd "config" lappend cmd $repo lappend cmd $dir - puts $cmd + # puts $cmd # catch $cmd pipe # puts $pipe @@ -447,7 +447,7 @@ namespace eval Git { lappend cmd $cfgVariables(gitCommand) lappend cmd "init" lappend cmd $activeProject - puts $cmd + # puts $cmd catch $cmd pipe if [regexp -nocase -- {^fatal:} $pipe match] { diff --git a/lib/procedure.tcl b/lib/procedure.tcl index f35d839..0e310c0 100644 --- a/lib/procedure.tcl +++ b/lib/procedure.tcl @@ -277,17 +277,17 @@ namespace eval Help { proc SearchVariable {txt} { global fileStructure project variables set varName [$txt get {insert wordstart} {insert wordend}] - puts ">>>$varName<<<" + # puts ">>>$varName<<<" if {[info exists project] == 0} {return} foreach f [array names project] { - puts "--$f" - puts "----" + # puts "--$f" + # puts "----" foreach a $project($f) { - puts "-----$variables($a)" + # puts "-----$variables($a)" foreach b $variables($a) { - puts "------$b -- [lindex $b 0]" + # puts "------$b -- [lindex $b 0]" if {$varName eq [lindex $b 0]} { - puts "УРААААААА $varName = $b в файле $a \n\t [lindex $b 0]" + # puts "УРААААААА $varName = $b в файле $a \n\t [lindex $b 0]" # FindVariablesDialog $txt "$varName: \[...\][file tail $a]" lappend l [list $varName [lindex $b 1] $a] } @@ -355,7 +355,7 @@ proc FindVariablesDialog {txt args} { foreach { word } $args { foreach lst $word { # set l [split $lst " "] - puts "[lindex $lst 0] -[lindex $lst 1] -[lindex $lst 2]" + # puts "[lindex $lst 0] -[lindex $lst 1] -[lindex $lst 2]" # lappend l2 [lindex $l 0] [lindex $l 1] [file tail [lindex $l 2]] # $win.lBox insert {} end -values $lst -text {1 2 3} $win.lBox insert end "[lindex $lst 0] > [lindex $lst 1] > [lindex $lst 2]\n" @@ -441,7 +441,7 @@ proc SearchStringInFolder {str} { if {$tcl_platform(platform) == "windows"} { } elseif {$tcl_platform(platform) == "mac"} { } elseif {$tcl_platform(platform) == "unix"} { - puts "$cfgVariables(searchCommand) $cfgVariables(searchCommandOptions) $str $activeProject" + # puts "$cfgVariables(searchCommand) $cfgVariables(searchCommandOptions) $str $activeProject" # Составляем строку (точнее список) для запуска команды set cmd exec regsub -all {\[} $str {\\[} str diff --git a/lib/readstructure.tcl b/lib/readstructure.tcl index c32051f..2656e71 100644 --- a/lib/readstructure.tcl +++ b/lib/readstructure.tcl @@ -20,7 +20,7 @@ proc GetVariablesFromFile {fileName} { set varList "" set params "" set varsBegin false - puts $fileName + # puts $fileName set f [open "$fileName" r] if {[dict exists $lexers $fileType] == 0} {return} while {[gets $f line] >=0 } { @@ -32,7 +32,7 @@ proc GetVariablesFromFile {fileName} { set indentSize 0 } set varsBegin true - puts "====== $varsBegin $indentSize" + # puts "$varsBegin $indentSize" continue # lappend varList [list $varName $varValue] } @@ -41,13 +41,13 @@ proc GetVariablesFromFile {fileName} { set l [GetVarFromLine $line $fileType] if {$line eq ""} { set varsBegin false - puts "====== $varsBegin $indentSize [lindex $l 3]" + # puts "$varsBegin $indentSize [lindex $l 3]" continue } if {[lindex $l 3] ne ""} { if [expr [lindex $l 3] <= $indentSize] { set varsBegin false - puts "====== $varsBegin $indentSize >[lindex $l 3]<" + # puts "$varsBegin $indentSize >[lindex $l 3]<" continue } } @@ -79,7 +79,7 @@ proc GetVarFromLine {line fileType} { set varType "" } set indentLength [string length $indent] - puts "variable: $varName, value: $varValue, type: $varType, indent: >$indent< $indentLength" + # puts "variable: $varName, value: $varValue, type: $varType, indent: >$indent< $indentLength" return [list $varName $varValue $varType $indentLength] } } @@ -90,7 +90,7 @@ proc GetVariablesFromVarFile {fileName} { set procList "" set varList "" set params "" - puts $fileName + # puts $fileName set f [open "$fileName" r] if {[dict exists $lexers $fileType] == 0} {return} while {[gets $f line] >=0 } { @@ -122,7 +122,7 @@ proc ReadFilesFromDirectory {directory root {type ""}} { return "" } foreach fileName [glob -nocomplain *] { - puts "Find file: $fileName [lsearch -exact -nocase $l $fileName]" + # puts "Find file: $fileName [lsearch -exact -nocase $l $fileName]" if {[lsearch -exact $l $fileName] != -1 && [file isdirectory [file join $root $directory $fileName]] == 1} { # puts "--- $root $fileName" ReadFilesFromDirectory [file join $directory $fileName] $root "var" @@ -179,8 +179,8 @@ proc ReadFilesFromDirectory {directory root {type ""}} { # proc Accept { dirLib directory } { global dir - puts $dir(lib) - puts $dirLib + # puts $dir(lib) + # puts $dirLib # переменная с указанием ваших действия перед порождением потока set threadinit { # если необходимо, загружаем исходный tcl код, расположенный в других файлах diff --git a/projman.tcl b/projman.tcl index 1103ac5..68b8e4d 100755 --- a/projman.tcl +++ b/projman.tcl @@ -10,7 +10,7 @@ exec wish8.6 "$0" -- "$@" ###################################################### # Version: 2.0.0 # Release: alpha18 -# Build: 27102025144544 +# Build: 27102025193106 ###################################################### # определим текущую версию, релиз и т.д.