arcadia 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/README +126 -123
  2. data/arcadia.rb +770 -756
  3. data/base/a-contracts.rb +130 -93
  4. data/base/a-ext.rb +280 -280
  5. data/base/a-libs.rb +5 -11
  6. data/base/a-utils.rb +235 -44
  7. data/conf/arcadia.conf +20 -16
  8. data/conf/arcadia.init.rb +0 -0
  9. data/conf/arcadia.res.rb +74 -0
  10. data/ext/ae-complete-code/ae-complete-code.conf +0 -0
  11. data/ext/ae-complete-code/ae-complete-code.rb +80 -79
  12. data/ext/ae-debug/ae-debug.conf +0 -0
  13. data/ext/ae-debug/ae-debug.rb +2 -6
  14. data/ext/ae-debug/debug1.57.rb +0 -0
  15. data/ext/ae-doc-code/ae-doc-code.conf +15 -0
  16. data/ext/ae-doc-code/ae-doc-code.rb +289 -0
  17. data/ext/ae-editor/ae-editor.conf +17 -8
  18. data/ext/ae-editor/ae-editor.rb +738 -396
  19. data/ext/ae-event-log/ae-event-log.conf +0 -0
  20. data/ext/ae-event-log/ae-event-log.rb +0 -0
  21. data/ext/ae-file-history/ae-file-history.conf +2 -2
  22. data/ext/ae-file-history/ae-file-history.rb +286 -290
  23. data/ext/ae-inspector/ae-inspector.conf +0 -0
  24. data/ext/ae-inspector/ae-inspector.rb +0 -0
  25. data/ext/ae-output-event/ae-output-event.conf +2 -2
  26. data/ext/ae-output/ae-output.conf +2 -2
  27. data/ext/ae-output/ae-output.rb +173 -178
  28. data/ext/ae-palette/ae-palette.conf +0 -0
  29. data/ext/ae-palette/ae-palette.rb +0 -0
  30. data/ext/ae-shell/ae-shell.conf +0 -0
  31. data/ext/ae-shell/ae-shell.rb +54 -54
  32. data/lib/tk/al-tk.rb +3076 -3082
  33. data/lib/tk/al-tk.res.rb +0 -0
  34. data/lib/tk/al-tkarcadia.rb +0 -0
  35. data/lib/tk/al-tkcustom.rb +0 -0
  36. data/lib/tkext/al-bwidget.rb +0 -0
  37. data/lib/tkext/al-iwidgets.rb +0 -0
  38. data/lib/tkext/al-tile.rb +0 -0
  39. data/lib/tkext/al-tktable.rb +0 -0
  40. data/tcl/BWidget-1.8.0/BWman/ArrowButton.html +276 -0
  41. data/tcl/BWidget-1.8.0/BWman/BWidget.html +228 -0
  42. data/tcl/BWidget-1.8.0/BWman/Button.html +273 -0
  43. data/tcl/BWidget-1.8.0/BWman/ButtonBox.html +264 -0
  44. data/tcl/BWidget-1.8.0/BWman/ComboBox.html +402 -0
  45. data/tcl/BWidget-1.8.0/BWman/Dialog.html +314 -0
  46. data/tcl/BWidget-1.8.0/BWman/DragSite.html +139 -0
  47. data/tcl/BWidget-1.8.0/BWman/DropSite.html +254 -0
  48. data/tcl/BWidget-1.8.0/BWman/DynamicHelp.html +248 -0
  49. data/tcl/BWidget-1.8.0/BWman/Entry.html +341 -0
  50. data/tcl/BWidget-1.8.0/BWman/Label.html +331 -0
  51. data/tcl/BWidget-1.8.0/BWman/LabelEntry.html +194 -0
  52. data/tcl/BWidget-1.8.0/BWman/LabelFrame.html +144 -0
  53. data/tcl/BWidget-1.8.0/BWman/ListBox.html +678 -0
  54. data/tcl/BWidget-1.8.0/BWman/MainFrame.html +283 -0
  55. data/tcl/BWidget-1.8.0/BWman/MessageDlg.html +218 -0
  56. data/tcl/BWidget-1.8.0/BWman/NoteBook.html +374 -0
  57. data/tcl/BWidget-1.8.0/BWman/PagesManager.html +180 -0
  58. data/tcl/BWidget-1.8.0/BWman/PanedWindow.html +142 -0
  59. data/tcl/BWidget-1.8.0/BWman/PanelFrame.html +153 -0
  60. data/tcl/BWidget-1.8.0/BWman/PasswdDlg.html +214 -0
  61. data/tcl/BWidget-1.8.0/BWman/ProgressBar.html +152 -0
  62. data/tcl/BWidget-1.8.0/BWman/ProgressDlg.html +145 -0
  63. data/tcl/BWidget-1.8.0/BWman/ScrollView.html +130 -0
  64. data/tcl/BWidget-1.8.0/BWman/ScrollableFrame.html +191 -0
  65. data/tcl/BWidget-1.8.0/BWman/ScrolledWindow.html +116 -0
  66. data/tcl/BWidget-1.8.0/BWman/SelectColor.html +164 -0
  67. data/tcl/BWidget-1.8.0/BWman/SelectFont.html +152 -0
  68. data/tcl/BWidget-1.8.0/BWman/Separator.html +77 -0
  69. data/tcl/BWidget-1.8.0/BWman/SpinBox.html +250 -0
  70. data/tcl/BWidget-1.8.0/BWman/StatusBar.html +147 -0
  71. data/tcl/BWidget-1.8.0/BWman/TitleFrame.html +107 -0
  72. data/tcl/BWidget-1.8.0/BWman/Tree.html +947 -0
  73. data/tcl/BWidget-1.8.0/BWman/Widget.html +502 -0
  74. data/tcl/BWidget-1.8.0/BWman/contents.html +84 -0
  75. data/tcl/BWidget-1.8.0/BWman/index.html +7 -0
  76. data/tcl/BWidget-1.8.0/BWman/navtree.html +41 -0
  77. data/tcl/BWidget-1.8.0/BWman/options.htm +458 -0
  78. data/tcl/BWidget-1.8.0/CHANGES.txt +266 -0
  79. data/tcl/BWidget-1.8.0/ChangeLog +1641 -0
  80. data/tcl/BWidget-1.8.0/LICENSE.txt +41 -0
  81. data/tcl/BWidget-1.8.0/README.txt +127 -0
  82. data/tcl/BWidget-1.8.0/arrow.tcl +551 -0
  83. data/tcl/BWidget-1.8.0/bitmap.tcl +94 -0
  84. data/tcl/BWidget-1.8.0/button.tcl +324 -0
  85. data/tcl/BWidget-1.8.0/buttonbox.tcl +403 -0
  86. data/tcl/BWidget-1.8.0/color.tcl +493 -0
  87. data/tcl/BWidget-1.8.0/combobox.tcl +809 -0
  88. data/tcl/BWidget-1.8.0/demo/basic.tcl +199 -0
  89. data/tcl/BWidget-1.8.0/demo/bwidget.xbm +46 -0
  90. data/tcl/BWidget-1.8.0/demo/demo.tcl +212 -0
  91. data/tcl/BWidget-1.8.0/demo/dnd.tcl +42 -0
  92. data/tcl/BWidget-1.8.0/demo/manager.tcl +141 -0
  93. data/tcl/BWidget-1.8.0/demo/select.tcl +59 -0
  94. data/tcl/BWidget-1.8.0/demo/tmpldlg.tcl +214 -0
  95. data/tcl/BWidget-1.8.0/demo/tree.tcl +260 -0
  96. data/tcl/BWidget-1.8.0/demo/x1.xbm +2258 -0
  97. data/tcl/BWidget-1.8.0/dialog.tcl +345 -0
  98. data/tcl/BWidget-1.8.0/dragsite.tcl +197 -0
  99. data/tcl/BWidget-1.8.0/dropsite.tcl +455 -0
  100. data/tcl/BWidget-1.8.0/dynhelp.tcl +625 -0
  101. data/tcl/BWidget-1.8.0/entry.tcl +469 -0
  102. data/tcl/BWidget-1.8.0/font.tcl +566 -0
  103. data/tcl/BWidget-1.8.0/images/bold.gif +0 -0
  104. data/tcl/BWidget-1.8.0/images/copy.gif +0 -0
  105. data/tcl/BWidget-1.8.0/images/cut.gif +0 -0
  106. data/tcl/BWidget-1.8.0/images/dragfile.gif +0 -0
  107. data/tcl/BWidget-1.8.0/images/dragicon.gif +0 -0
  108. data/tcl/BWidget-1.8.0/images/error.gif +0 -0
  109. data/tcl/BWidget-1.8.0/images/file.gif +0 -0
  110. data/tcl/BWidget-1.8.0/images/folder.gif +0 -0
  111. data/tcl/BWidget-1.8.0/images/hourglass.gif +0 -0
  112. data/tcl/BWidget-1.8.0/images/info.gif +0 -0
  113. data/tcl/BWidget-1.8.0/images/italic.gif +0 -0
  114. data/tcl/BWidget-1.8.0/images/minus.xbm +5 -0
  115. data/tcl/BWidget-1.8.0/images/new.gif +0 -0
  116. data/tcl/BWidget-1.8.0/images/opcopy.xbm +5 -0
  117. data/tcl/BWidget-1.8.0/images/open.gif +0 -0
  118. data/tcl/BWidget-1.8.0/images/openfold.gif +0 -0
  119. data/tcl/BWidget-1.8.0/images/oplink.xbm +5 -0
  120. data/tcl/BWidget-1.8.0/images/opmove.xbm +5 -0
  121. data/tcl/BWidget-1.8.0/images/overstrike.gif +0 -0
  122. data/tcl/BWidget-1.8.0/images/palette.gif +0 -0
  123. data/tcl/BWidget-1.8.0/images/passwd.gif +0 -0
  124. data/tcl/BWidget-1.8.0/images/paste.gif +0 -0
  125. data/tcl/BWidget-1.8.0/images/plus.xbm +5 -0
  126. data/tcl/BWidget-1.8.0/images/print.gif +0 -0
  127. data/tcl/BWidget-1.8.0/images/question.gif +0 -0
  128. data/tcl/BWidget-1.8.0/images/redo.gif +0 -0
  129. data/tcl/BWidget-1.8.0/images/save.gif +0 -0
  130. data/tcl/BWidget-1.8.0/images/target.xbm +9 -0
  131. data/tcl/BWidget-1.8.0/images/underline.gif +0 -0
  132. data/tcl/BWidget-1.8.0/images/undo.gif +0 -0
  133. data/tcl/BWidget-1.8.0/images/warning.gif +0 -0
  134. data/tcl/BWidget-1.8.0/init.tcl +40 -0
  135. data/tcl/BWidget-1.8.0/label.tcl +271 -0
  136. data/tcl/BWidget-1.8.0/labelentry.tcl +100 -0
  137. data/tcl/BWidget-1.8.0/labelframe.tcl +160 -0
  138. data/tcl/BWidget-1.8.0/lang/da.rc +52 -0
  139. data/tcl/BWidget-1.8.0/lang/de.rc +52 -0
  140. data/tcl/BWidget-1.8.0/lang/en.rc +52 -0
  141. data/tcl/BWidget-1.8.0/lang/es.rc +53 -0
  142. data/tcl/BWidget-1.8.0/lang/fr.rc +52 -0
  143. data/tcl/BWidget-1.8.0/listbox.tcl +1638 -0
  144. data/tcl/BWidget-1.8.0/mainframe.tcl +711 -0
  145. data/tcl/BWidget-1.8.0/messagedlg.tcl +128 -0
  146. data/tcl/BWidget-1.8.0/notebook.tcl +1164 -0
  147. data/tcl/BWidget-1.8.0/pagesmgr.tcl +294 -0
  148. data/tcl/BWidget-1.8.0/panedw.tcl +381 -0
  149. data/tcl/BWidget-1.8.0/panelframe.tcl +246 -0
  150. data/tcl/BWidget-1.8.0/passwddlg.tcl +178 -0
  151. data/tcl/BWidget-1.8.0/pkgIndex.tcl +47 -0
  152. data/tcl/BWidget-1.8.0/progressbar.tcl +208 -0
  153. data/tcl/BWidget-1.8.0/progressdlg.tcl +87 -0
  154. data/tcl/BWidget-1.8.0/scrollframe.tcl +226 -0
  155. data/tcl/BWidget-1.8.0/scrollview.tcl +254 -0
  156. data/tcl/BWidget-1.8.0/scrollw.tcl +280 -0
  157. data/tcl/BWidget-1.8.0/separator.tcl +75 -0
  158. data/tcl/BWidget-1.8.0/spinbox.tcl +331 -0
  159. data/tcl/BWidget-1.8.0/statusbar.tcl +422 -0
  160. data/tcl/BWidget-1.8.0/tests/entry.test +173 -0
  161. data/tcl/BWidget-1.8.0/titleframe.tcl +170 -0
  162. data/tcl/BWidget-1.8.0/tree.tcl +2228 -0
  163. data/tcl/BWidget-1.8.0/utils.tcl +645 -0
  164. data/tcl/BWidget-1.8.0/widget.tcl +1576 -0
  165. data/tcl/BWidget-1.8.0/wizard.tcl +1028 -0
  166. data/tcl/BWidget-1.8.0/xpm2image.tcl +115 -0
  167. metadata +141 -5
File without changes
@@ -1209,3 +1209,77 @@ yEA3B7iMJlKUorWDw9FoBIrFxY9myzmfOaBtCXVKDxGLNqDFFAg4xey6dE1U
1209
1209
  A9VV9tAdFAHN7xCc2+31u54+TbnnTAcVVQEZBhcIY3yAKC0BAgFigUuOZzFq
1210
1210
  iykROGcqHJhBK4NucBtzoX4/DHGnfXt4ALGys7S0IQA7
1211
1211
  EOS
1212
+
1213
+ EXPAND2_GIF=<<EOS
1214
+ R0lGODlhCgAKAIAAAP///7cWGSH5BAAAAAAALAAAAAAKAAoAAAIPhI+pF7HQ
1215
+ XkytOmTXfDwVADs=
1216
+ EOS
1217
+
1218
+ EXIT_STORY_GIF=<<EOS
1219
+ R0lGODlhFQAUAMIEAAB9AIX/hZmZmTMzM////////////////yH+FUNyZWF0
1220
+ ZWQgd2l0aCBUaGUgR0lNUAAh+QQBAAAHACwAAAAAFQAUAAADYHi63DuwwUmp
1221
+ EEOSzfu4mNaN35Uxw0iCA+ACR6pyJQYEASzPRN3iOsJL5bvlYkLgymR8uXA5
1222
+ D8sIrSo3nwnVCgXQps5XV2rSNJchlNBFZIl4vvcsrub13KiKvnRy+B8QCQA7
1223
+ EOS
1224
+
1225
+ EXPAND_LIGHT_GIF=<<EOS
1226
+ R0lGODdhCwALAO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ydmljZXM8
1277
+ L2E+IGFuZCBwZXJmb3JtIGEgdGl0bGUgc2VhcmNoIGZvciB0aGUgd29yZHMg
1278
+ PGI+SFRUUDwvYj4gYW5kIDxiPjQwNDwvYj4uPC9saT4NCjxsaT5PcGVuIDxi
1279
+ PklJUyBIZWxwPC9iPiwgd2hpY2ggaXMgYWNjZXNzaWJsZSBpbiBJSVMgTWFu
1280
+ YWdlciAoaW5ldG1nciksDQogYW5kIHNlYXJjaCBmb3IgdG9waWNzIHRpdGxl
1281
+ ZCA8Yj5XZWIgU2l0ZSBTZXR1cDwvYj4sIDxiPkNvbW1vbiBBZG1pbmlzdHJh
1282
+ dGl2ZSBUYXNrczwvYj4sIGFuZCA8Yj5BYm91dCBDdXN0b20gRXJyb3IgTWVz
1283
+ c2FnZXM8L2I+LjwvbGk+DQo8L3VsPg0KDQo8L1REPjwvVFI+PC9UQUJMRT48
1284
+ L0JPRFk+PC9IVE1MPg0K
1285
+ EOS
@@ -1,79 +1,80 @@
1
- #
2
- # ae-complete-code.rb - Arcadia Ruby ide
3
- # by Antonio Galeone <antonio-galeone@rubyforge.org>
4
- #
5
-
6
- require "base/a-ext"
7
-
8
-
9
- class CompleteCode < ArcadiaExt
10
-
11
- def before_build
12
- end
13
-
14
- def build
15
- end
16
-
17
- def after_build
18
-
19
-
20
- @rct_complete=complete_command
21
-
22
- if @rct_complete !=nil #system(@rct_complete+" "+__FILE__)
23
- ArcadiaContractListener.new(self, EditorContract, :do_editor_event)
24
- else
25
- MsgContract.instance.out_error(self, "Extension ae-complete-code depend upon rct-complete(rcodetools) command (install it or update system path!)")
26
- end
27
- end
28
-
29
- def complete_command
30
- _ret = nil
31
- RUBY_PLATFORM.include?('win32') ? _sep = ';':_sep=':'
32
- ENV['PATH'].split(_sep).each{|_path|
33
- _file = File.join(_path, 'rct-complete')
34
- if FileTest.exist?(_file)
35
- _ret = _file
36
- end
37
- }
38
- _ret
39
- end
40
-
41
- def do_editor_event(_event)
42
- case _event.signature
43
- when EditorContract::COMPLETE_CODE
44
- if _event.context.file
45
- _event.context.candidates = candidates(_event.context.file, _event.context.line, _event.context.col)
46
- _event.handled(self)
47
- end
48
- end
49
- end
50
-
51
- def candidates(_file, _line, _col)
52
- begin
53
- #_options = "--completion-class-info --line="+_line+" --column="+_col
54
- _options = "--line="+_line+" --column="+_col
55
- _cmp_s = "|ruby "+@rct_complete+" "+_options+" "+_file
56
- _ret = nil
57
- open(_cmp_s,"r") do
58
- |f|
59
- _ret = f.readlines.collect!{| line | line.chomp}
60
- end
61
- if _ret.length == 0
62
- _cmp_s_d = _cmp_s+" 2>&1"
63
- _error = nil
64
- open(_cmp_s_d,"r") do
65
- |f|
66
- _error = f.readlines.collect!{| line | line.chomp}
67
- end
68
- if _error != nil && _error.length > 0
69
- MsgContract.instance.out_error(self, "Syntax error in current source")
70
- end
71
- end
72
- _ret
73
- rescue Exception => e
74
- MsgContract.instance.out_error(self, e.to_s)
75
- end
76
- end
77
-
78
- end
79
-
1
+ #
2
+ # ae-complete-code.rb - Arcadia Ruby ide
3
+ # by Antonio Galeone <antonio-galeone@rubyforge.org>
4
+ #
5
+
6
+ require "base/a-ext"
7
+
8
+
9
+ class CompleteCode < ArcadiaExt
10
+
11
+ def before_build
12
+ end
13
+
14
+ def build
15
+ end
16
+
17
+ def after_build
18
+ @complete_command=full_command('rct-complete')
19
+ @doc_command=full_command('rct-doc')
20
+ @ri_command="ri -T -f plain"
21
+ @finder_command="rct-meth-args -n" # ./a-libs.rb:741:AG#publish (_family, args = nil)
22
+ if @complete_command !=nil #system(@rct_complete+" "+__FILE__)
23
+ ArcadiaContractListener.new(self, EditorContract, :do_editor_event)
24
+ else
25
+ MsgContract.instance.out_error(self, "Extension ae-complete-code depend upon rct-complete(rcodetools) command (install it or update system path!)")
26
+ end
27
+ end
28
+
29
+ def full_command(_command='rct-complete')
30
+ _ret = nil
31
+ RUBY_PLATFORM.include?('win32') ? _sep = ';':_sep=':'
32
+ ENV['PATH'].split(_sep).each{|_path|
33
+ _file = File.join(_path, _command)
34
+ if FileTest.exist?(_file)
35
+ _ret = _file
36
+ end
37
+ }
38
+ _ret
39
+ end
40
+
41
+ def do_editor_event(_event)
42
+ case _event.signature
43
+ when EditorContract::COMPLETE_CODE
44
+ if _event.context.file
45
+ _event.context.candidates = candidates(_event.context.file, _event.context.line, _event.context.col)
46
+ _event.handled(self)
47
+ end
48
+ end
49
+ end
50
+
51
+ def candidates(_file, _line, _col)
52
+ begin
53
+ _options = "--completion-class-info --line="+_line+" --column="+_col
54
+ #_options = "--line="+_line+" --column="+_col
55
+ _cmp_s = "|ruby "+@complete_command+" "+_options+" "+_file
56
+ _ret = nil
57
+ open(_cmp_s,"r") do
58
+ |f|
59
+ _ret = f.readlines.collect!{| line | line.chomp}
60
+ #p _ret
61
+ end
62
+ if _ret.length == 0
63
+ _cmp_s_d = _cmp_s+" 2>&1"
64
+ _error = nil
65
+ open(_cmp_s_d,"r") do
66
+ |f|
67
+ _error = f.readlines.collect!{| line | line.chomp}
68
+ end
69
+ if _error != nil && _error.length > 0
70
+ MsgContract.instance.out_error(self, "Syntax error in current source")
71
+ end
72
+ end
73
+ _ret
74
+ rescue Exception => e
75
+ MsgContract.instance.out_error(self, e.to_s)
76
+ end
77
+ end
78
+
79
+ end
80
+
File without changes
@@ -401,7 +401,7 @@ class ArcadiaDebug < ArcadiaExt
401
401
 
402
402
  def debug_begin
403
403
  @breakpoints.clear
404
- DebugContract.instance.debug_begin(DebugContract::TDebugObj.new(self))
404
+ DebugContract.instance.debug_begin(self)
405
405
  end
406
406
 
407
407
 
@@ -545,12 +545,8 @@ class ArcadiaDebug < ArcadiaExt
545
545
  end
546
546
 
547
547
  def update(dbg)
548
- tobj = DebugContract::TDebugObj.new(self)
549
- tobj.file = dbg[:file]
550
- tobj.line = dbg[:line]
551
- #sobj = @ae_editor_talker.info
552
548
  if dbg[:file] != nil
553
- DebugContract.instance.debug_step(tobj)
549
+ DebugContract.instance.debug_step(self, 'file'=> dbg[:file], 'line'=>dbg[:line])
554
550
  #$arcadia['editor'].open_file_in_debug(dbg[:file], dbg[:line])
555
551
  end
556
552
  if @adw.last_command == 'debug' && @static_breakpoints.length > 0
File without changes
@@ -0,0 +1,15 @@
1
+ name=doc_code
2
+ label=Doc
3
+ frame=1.0
4
+ active=yes
5
+ require=ext/ae-doc-code/ae-doc-code
6
+ class=DocCode
7
+
8
+ font=courier 12
9
+ font.bold=courier 12 bold
10
+ i386-freebsd6::font=courier 12
11
+ i386-freebsd6::font.bold=courier 12 bold
12
+ i386-mswin32::font={Courier New} 9
13
+ i386-mswin32::font.bold={Courier New} 9 bold
14
+ color.background=#ffffc1
15
+ color.foreground=#408080
@@ -0,0 +1,289 @@
1
+ #
2
+ # ae-doc-code.rb - Arcadia Ruby ide
3
+ # by Antonio Galeone <antonio-galeone@rubyforge.org>
4
+ #
5
+
6
+ require "base/a-ext"
7
+
8
+ class DocCode < ArcadiaExt
9
+
10
+ def before_build
11
+ end
12
+
13
+ def build
14
+ end
15
+
16
+ def after_build
17
+ @doc_command=full_command('rct-doc')
18
+ @doc_command=full_command('RCT-DOC') if @doc_command == nil
19
+ @ri_command=full_command('ri')
20
+ if @ri_command !=nil #system(@rct_complete+" "+__FILE__)
21
+ ArcadiaContractListener.new(self, EditorContract, :do_editor_event)
22
+ else
23
+ MsgContract.instance.out_error(self, "Extension ae-doc-code depend upon ri command!")
24
+ end
25
+ if @doc_command == nil #system(@rct_complete+" "+__FILE__)
26
+ MsgContract.instance.out_error(self, "Warning: Extension ae-doc-code depend upon rct-doc command!")
27
+ end
28
+ end
29
+
30
+ def full_command(_command='ri')
31
+ _ret = nil
32
+ RUBY_PLATFORM.include?('win32') ? _sep = ';':_sep=':'
33
+ ENV['PATH'].split(_sep).each{|_path|
34
+ _file = File.join(_path, _command)
35
+ if FileTest.exist?(_file)
36
+ _ret = _file
37
+ end
38
+ }
39
+ _ret
40
+ end
41
+
42
+ def do_editor_event(_event)
43
+ case _event.signature
44
+ when EditorContract::DOC_CODE
45
+ if _event.context.file && @doc_command != nil
46
+ _event.context.doc = doc(_event.context)
47
+ if _event.context.doc != nil && _event.context.doc.length >0
48
+ raise_doc_code(_event.context)
49
+ else
50
+ build_doc_tree
51
+ end
52
+ elsif _event.context.doc_entry
53
+ _event.context.doc = doc_entry(_event.context.doc_entry)
54
+ _event.context.text = _event.context.doc_entry
55
+ if _event.context.doc != nil && _event.context.doc.length >0
56
+ raise_doc_code(_event.context)
57
+ else
58
+ build_doc_tree
59
+ end
60
+ elsif _event.context.file && @doc_command == nil
61
+ build_doc_tree
62
+ end
63
+ _event.handled(self)
64
+ end
65
+ end
66
+
67
+ def build_doc_tree
68
+ if !@doc_tree
69
+
70
+ @image_class = TkPhotoImage.new('dat' => ARROW_RIGHT_GIF)
71
+ @image_def = TkPhotoImage.new('dat' => TREE_NODE_DEF_GIF)
72
+ @image_def_class = TkPhotoImage.new('dat' => TREE_NODE_DEFCLASS_GIF)
73
+
74
+
75
+ do_select_item = proc{|_self|
76
+ if _self.selection_get[0].length >0
77
+ _selected = rif_2_node(_self.selection_get[0])
78
+ end
79
+ if _selected
80
+ EditorContract.instance.doc_code(self, 'doc_entry'=>_selected)
81
+ end
82
+ }
83
+ _background = conf('color.background')
84
+ _foreground = conf('color.foreground')
85
+ @doc_tree = Tk::BWidget::Tree.new(self.frame){
86
+ relief 'flat'
87
+ showlines false
88
+ deltay 18
89
+ background _background
90
+ crossfill _foreground
91
+ selectcommand proc{ do_select_item.call(self) }
92
+ place('relwidth' => 1,'relx' => 0,'x' => '0','y' => '0','relheight' => '1')
93
+ }
94
+
95
+ _scrollcommand = proc{|*args| @doc_tree.yview(*args)}
96
+ _scrollbar = TkScrollbar.new(self.frame){|s|
97
+ width 8
98
+ command _scrollcommand
99
+ }.pack('side'=>'right', 'fill'=>'y')
100
+ @doc_tree.yscrollcommand proc{|first,last| _scrollbar.set(first,last)}
101
+
102
+ names = doc_entry('--list-names')
103
+
104
+ @progress_bar = TkProgressframe.new(@arcadia.layout.root, names.length)
105
+ @progress_bar.title('Building doc')
106
+ @cancell=false
107
+ @progress_bar.on_cancel=proc{cancel}
108
+ #@hash_rif = Hash.new
109
+ @level = 0
110
+ @last_nodes = Array.new
111
+ Thread.new do
112
+ _last_value = ''
113
+ #p 'n�='+ names.length.to_s
114
+ names.sort.each do |value|
115
+ _value = value.chomp.strip
116
+ if _value != _last_value
117
+ node(_value)
118
+ @progress_bar.title(_value)
119
+ _last_value = _value
120
+ end
121
+ @progress_bar.progress
122
+ if @cancell
123
+ @progress_bar.destroy
124
+ @progress_bar = nil
125
+ break
126
+ end
127
+ end
128
+ progress_bar.destroy if @progress_bar != nil
129
+ end
130
+ end
131
+ end
132
+
133
+ def cancel
134
+ @cancell=true
135
+ end
136
+
137
+ def node_2_rif(_path)
138
+ return _path.gsub('#','@M@').gsub('::','@C@').gsub('|','@P@').gsub('^','@U@')
139
+ end
140
+
141
+ def rif_2_node(_rif)
142
+ return _rif.gsub('@M@','#').gsub('@C@', '::').gsub('@P@', '|').gsub('@U@', '^')
143
+ end
144
+
145
+ def node(_path)
146
+ # _rif = @hash_rif.length
147
+ _rif = node_2_rif(_path)
148
+ _parent_found = false
149
+ while !_parent_found && @level > 0 do
150
+ @level = @level - 1
151
+ if (@last_nodes[@level] != nil) && _path.include?(@last_nodes[@level])
152
+ _full_value = _path.sub(@last_nodes[@level],'')
153
+ if _full_value[0..1].include?('#')
154
+ _sep = '#'
155
+ _value = _full_value[1.._full_value.length-1]
156
+ _parent_found = true
157
+ elsif _full_value[0..2].include?('::')
158
+ _sep = '::'
159
+ _value = _full_value[2.._full_value.length-1]
160
+ _parent_found = true
161
+ else
162
+ _parent_found = false
163
+ end
164
+ end
165
+ end
166
+ if _parent_found
167
+ _parent_path = @last_nodes[@level]
168
+ #_parent_rif = @hash_rif[_parent_path]
169
+ _parent_rif = node_2_rif(_parent_path)
170
+ @level = @level + 1
171
+ else
172
+ _parent_rif = 'root'
173
+ _sep = ''
174
+ _value = _path
175
+ end
176
+
177
+ #@hash_rif[_path]= _rif
178
+ @last_nodes[@level] = _path
179
+ _background = conf('color.background')
180
+
181
+ if _sep.length == 0
182
+ _image = @image_class
183
+ elsif _sep.include?('#')
184
+ _image = @image_def
185
+ elsif _sep.include?('::')
186
+ _image = @image_def_class
187
+ end
188
+
189
+ @doc_tree.insert('end', _parent_rif ,_rif, {
190
+ 'text' => _value ,
191
+ 'helptext' => _path,
192
+ 'deltax'=>-1,
193
+ 'image'=>_image
194
+ }
195
+ )
196
+ @level = @level + 1
197
+ end
198
+
199
+ def raise_doc_code(_context)
200
+ if @docFrame
201
+ @docFrame.tkText.delete('1.0','end')
202
+ else
203
+ _height = 140
204
+ _width = 550
205
+ _context.xdoc = TkWinfo.screenwidth(@arcadia.layout.root)/2 if !_context.xdoc
206
+ _context.ydoc = TkWinfo.screenheight(@arcadia.layout.root)/2 if !_context.ydoc
207
+ _x = _context.xdoc - _width/2
208
+ _y = _context.ydoc - _height -20
209
+ @docFrame = TkDocframe.new(@arcadia.layout.root).place('x'=>_x, 'y'=>_y, 'width'=>_width, 'height'=>_height)
210
+ do_close = proc{
211
+ @docFrame.destroy
212
+ @docFrame = nil
213
+ Tk.callback_break
214
+ }
215
+ @docFrame.on_close = do_close
216
+ @docFrame.tkText.bind_append('KeyPress'){|e|
217
+ case e.keysym
218
+ when 'Escape'
219
+ do_close.call
220
+ end
221
+ }
222
+ @docFrame.tkText.font(conf('font'))
223
+ @docFrame.tkText.foreground(conf('color.foreground'))
224
+ @docFrame.tkText.background(conf('color.background'))
225
+ end
226
+
227
+ if _context.doc
228
+ @docFrame.tkText.insert('end', _context.doc.to_s)
229
+ @docFrame.title(_context.text) if _context.text
230
+ else
231
+ MsgContract.instance.out_simple(self, 'nulla di dire !')
232
+ end
233
+ end
234
+
235
+
236
+
237
+ def doc_entry(_entry=nil)
238
+ _ret = nil
239
+ if _entry
240
+ _cmp_doc = "|ruby "+@ri_command+" -T -f plain "+_entry
241
+ open (_cmp_doc) do |f|
242
+ _ret = f.readlines
243
+ end
244
+ end
245
+ _ret
246
+ end
247
+
248
+ def doc(_context)
249
+ begin
250
+ _options = "--line="+_context.line+" --column="+_context.col
251
+ _cmp_s = "|ruby " + @doc_command +" --use-method-analyzer "+_options +" " +_context.file
252
+ _ret = nil
253
+ _doc = nil
254
+ open(_cmp_s,"r") do
255
+ |f|
256
+ _doc = f.readlines.collect!{| line | line.chomp}.to_s.strip
257
+ end
258
+ if _doc.length > 0
259
+ _context.text = _doc.to_s
260
+ _ret = doc_entry(_context.text)
261
+ end
262
+ _ret
263
+
264
+ rescue Exception => e
265
+ _msg = e.to_s + "\n"
266
+ e.backtrace.each{|line| _msg = _msg + line + "\n"}
267
+ MsgContract.instance.out_error(self, _msg)
268
+ end
269
+ end
270
+
271
+ end
272
+
273
+ class TkDocframe < TkFloatTitledFrame
274
+ attr_reader :tkText
275
+ def initialize(parent=nil, *args)
276
+ super(parent)
277
+ @tkText = TkText.new(self.frame,
278
+ 'wrap'=>'none',
279
+ 'relief'=>'groove'
280
+ ){|j|
281
+ TkScrollbar.new(j){|s|
282
+ width 8
283
+ command proc{|*args| j.yview(*args)}
284
+ j.yscrollcommand proc{|first,last| s.set first,last}
285
+ }.pack('side'=>'right', 'fill'=>'y')
286
+ }.place('x'=>0, 'y'=>0, 'relheight'=> 1, 'relwidth'=> 1)
287
+
288
+ end
289
+ end