Changeset 97db5a0 in tol


Ignore:
Timestamp:
Nov 30, 2016, 8:07:19 AM (10 years ago)
Author:
Pedro Gea <pgea@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
5c511c0
Parents:
6f7a669
Message:

Refs #1933
Se incorpora un parámetro en init_toltk.tcl para provisionalmente mostrar o no filtros en el inspector.
Se traducen los nombres de columna del inspector.
Se incorporan el contenido y la descripción completa (sin TrimContent) de las variables TOL.

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@7361 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tolbase/lib/toltk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tolbase/lib/toltk/init_toltk.tcl

    r6f7a669 r97db5a0  
    1111package require Tk
    1212
     13# show_filters: muestra (o no) los filtros en el inspector de TOL
     14set show_filters 0
    1315# trace: muestra (o no) la ventana de trazas de TOL
    1416set trace 0
  • tolbase/lib/toltk/tolinspe__main.tcl

    r6f7a669 r97db5a0  
    304304#/////////////////////////////////////////////////////////////////////////////
    305305  global toltk_options
     306  global show_filters
    306307  variable w_tabset
    307308  variable wt_vars
    … …  
    323324
    324325  # Creation of the right TREE RIGHT with VARIABLES
    325   set wt_vars [::wtree $sw21.vars -table 1 -filter no \
     326  set wt_vars [::wtree $sw21.vars -table 1 -filter $show_filters \
    326327    -background white -showroot 0 -selectmode extended -showheader 1 \
    327328    -highlightbackground gray75 -highlightcolor black \
    328329    -highlightthickness 0 -font $toltk_options(fonts,Label) \
    329330    -columns [list \
    330     [list text -label Index -tags Index] \
    331     [list text -label Grammar -tags Grammar] \
    332     [list {image text} -label Name -tags Name] \
    333     [list text -label Content -tags Content] \
    334     [list text -label Description -tags Description] \
    335     [list text -label Path -tags Path] \
    336     [list text -label Reference -tags Reference] \
     331    [list text -label [mc Index] -tags Index] \
     332    [list text -label [mc Grammar] -tags Grammar] \
     333    [list {image text} -label [mc Name] -tags Name] \
     334    [list text -label [mc Content] -tags Content] \
     335    [list text -label [mc Description] -tags Description] \
     336    [list text -label [mc Path] -tags Path] \
     337    [list text -label [mc Reference] -tags Reference] \
    337338  ]]
     339  #@ filtro: 0(Index) 0(no) 2(Name) 1(yes)
     340  $wt_vars configure -columnfilter [list 0 0 2 1]
    338341  # configuration of the tree of variables
    339342  $wt_vars column configure Grammar -visible no
    … …  
    346349 
    347350  # Creation of the right TREE RIGHT with FUNCTIONS
    348   set wt_funcs [::wtree $sw22.vars -table 1 -filter no \
     351  set wt_funcs [::wtree $sw22.vars -table 1 -filter $show_filters \
    349352    -background white -showroot 0 -selectmode extended -showheader 1 \
    350353    -highlightbackground gray75 -highlightcolor black \
    351354    -highlightthickness 0 -font $toltk_options(fonts,Label) \
    352355    -columns [list \
    353     [list text -label Index -tags Index] \
    354     [list text -label Grammar -tags Grammar] \
    355     [list {image text} -label Name -tags Name] \
    356     [list text -label Content -tags Content] \
    357     [list text -label Description -tags Description] \
    358     [list text -label Path -tags Path] \
    359     [list text -label Reference -tags Reference] \
     356    [list text -label [mc Index] -tags Index] \
     357    [list text -label [mc Grammar] -tags Grammar] \
     358    [list {image text} -label [mc Name] -tags Name] \
     359    [list text -label [mc Content] -tags Content] \
     360    [list text -label [mc Description] -tags Description] \
     361    [list text -label [mc Path] -tags Path] \
     362    [list text -label [mc Reference] -tags Reference] \
    360363  ]]
     364  #@ filtro: 0(Index) 0(no) 2(Name) 1(yes)
     365  $wt_funcs configure -columnfilter [list 0 0 2 1]
    361366  # configuration of the tree of functions
    362367  $wt_funcs column configure Grammar -visible no
    … …  
    511516    }
    512517    return [OneLine $content]
    513     set content [string trim $content]
    514     set lnidx [string first "\n" $content]
    515     if { $lnidx != -1 } {
    516       if { [incr lnidx -1] > 0 } {
    517         return "[string range $content 0 $lnidx]..."
    518       } else {
    519         return "..."
    520       }
    521     }
    522     set content
    523518  }
    524519}
  • tolbase/lib/toltk/tolinspe__wtree1.tcl

    r6f7a669 r97db5a0  
    8181    set fcolor "black"
    8282  }
    83 
    84   set brief_cont [TrimContent $grammar $content]
    85   set brief_desc [TrimContent DONTCARE $desc] 
    86  
    87   set data3 $brief_cont
     83 
     84  set cont $content
    8885  if {$grammar eq "NameBlock"} {
    89     #(pgea) se utiliza la informacon de instancia
    90     #puts "Tol_ClassOfFromReference $tolref"
     86    # se utiliza la información de instancia
    9187    set classOf [Tol_ClassOfFromReference $tolref]
    92     #puts "Tol_InstanceContentFromReference $tolref"
    93     set insCont [Tol_InstanceContentFromReference $tolref]
    94     if {$insCont ne ""} {
    95       set data3 [TrimContent $grammar $insCont]
    96     } elseif {$classOf ne ""} {
    97       set data3 $classOf
    98     }   
    99   }
    100  
    101   #@ Se introduce toda la descripción de la clase.
    102   if {$grammar eq "Anything"} {
    103     if { [regexp {@[^ ]+} $name] } {
    104       set data3 $content
    105     }
    106   }
     88    if {$classOf ne ""} {
     89      set insCont [Tol_InstanceContentFromReference $tolref]
     90      if {$insCont ne ""} {
     91        set cont $insCont
     92      } else {
     93        set cont $classOf
     94      }
     95    }
     96  }
     97
     98  #@ set brief_cont [TrimContent $grammar $cont]
     99  #@ set brief_desc [TrimContent DONTCARE $desc]
    107100
    108101  #@ Se localiza el icono según la gramática
    … …  
    126119  $wt item image $idx Name $icon_grammar
    127120  $wt item text $idx Index $arguments(index) Grammar $grammar \
    128     Name $name Content $data3 Description $brief_desc Path $path Reference $tolref
     121    Name $name Content $cont Description $desc Path $path Reference $tolref
    129122  if { $fcolor ne "black" } {
    130123    $wt item-color $idx $fcolor
Note: See TracChangeset for help on using the changeset viewer.