arcadia 0.8.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. data/README +28 -22
  2. data/bin/arcadia +3 -3
  3. data/conf/arcadia.conf +87 -36
  4. data/conf/arcadia.res.rb +143 -5
  5. data/conf/theme-dark.conf +94 -0
  6. data/conf/theme-dark.res.rb +218 -0
  7. data/ext/ae-breakpoints/ae-breakpoints.rb +1 -0
  8. data/ext/ae-dir-projects/ae-dir-projects.rb +37 -9
  9. data/ext/ae-editor/ae-editor.conf +10 -9
  10. data/ext/ae-editor/ae-editor.rb +306 -127
  11. data/ext/ae-editor/langs/pers.lang.bind +1 -0
  12. data/ext/ae-editor/langs/rb.lang +6 -6
  13. data/ext/ae-editor/langs/tcl.lang +3 -0
  14. data/ext/ae-file-history/ae-file-history.rb +4 -11
  15. data/ext/ae-output/ae-output.rb +57 -38
  16. data/ext/ae-rad/ae-rad-inspector.rb +1 -1
  17. data/ext/ae-rad/ae-rad-palette.rb +2 -2
  18. data/ext/ae-rad/ae-rad.rb +7 -7
  19. data/ext/ae-rad/lib/tk/al-tk.rb +3 -3
  20. data/ext/ae-rad/lib/tk/al-tkcustom.rb +2 -2
  21. data/ext/ae-ruby-debug/ae-ruby-debug.conf +20 -1
  22. data/ext/ae-ruby-debug/ae-ruby-debug.rb +69 -65
  23. data/ext/ae-search-in-files/ae-search-in-files.rb +2 -17
  24. data/ext/ae-shell/ae-shell.conf +7 -6
  25. data/ext/ae-shell/ae-shell.rb +211 -32
  26. data/ext/ae-subprocess-inspector/ae-subprocess-inspector.conf +11 -0
  27. data/ext/ae-subprocess-inspector/ae-subprocess-inspector.rb +109 -0
  28. data/lib/a-commons.rb +74 -16
  29. data/lib/a-contracts.rb +18 -1
  30. data/lib/a-core.rb +410 -77
  31. data/lib/a-tkcommons.rb +338 -138
  32. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/ArrowButton.html +0 -0
  33. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/BWidget.html +2 -2
  34. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/Button.html +0 -0
  35. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/ButtonBox.html +0 -0
  36. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/ComboBox.html +0 -0
  37. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/Dialog.html +0 -0
  38. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/DragSite.html +0 -0
  39. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/DropSite.html +0 -0
  40. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/DynamicHelp.html +0 -0
  41. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/Entry.html +0 -0
  42. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/Label.html +0 -0
  43. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/LabelEntry.html +0 -0
  44. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/LabelFrame.html +0 -0
  45. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/ListBox.html +1 -4
  46. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/MainFrame.html +0 -0
  47. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/MessageDlg.html +0 -0
  48. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/NoteBook.html +0 -0
  49. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/PagesManager.html +0 -0
  50. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/PanedWindow.html +0 -0
  51. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/PanelFrame.html +0 -0
  52. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/PasswdDlg.html +0 -0
  53. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/ProgressBar.html +0 -0
  54. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/ProgressDlg.html +0 -0
  55. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/ScrollView.html +0 -0
  56. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/ScrollableFrame.html +0 -0
  57. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/ScrolledWindow.html +0 -0
  58. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/SelectColor.html +0 -0
  59. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/SelectFont.html +0 -0
  60. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/Separator.html +0 -0
  61. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/SpinBox.html +0 -0
  62. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/StatusBar.html +0 -0
  63. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/TitleFrame.html +0 -0
  64. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/Tree.html +0 -0
  65. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/Widget.html +0 -0
  66. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/contents.html +0 -0
  67. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/index.html +0 -0
  68. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/navtree.html +0 -0
  69. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/BWman/options.htm +0 -0
  70. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/CHANGES.txt +0 -0
  71. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/ChangeLog +70 -0
  72. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/LICENSE.txt +0 -0
  73. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/README.txt +0 -0
  74. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/arrow.tcl +0 -0
  75. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/bitmap.tcl +0 -0
  76. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/button.tcl +0 -0
  77. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/buttonbox.tcl +0 -0
  78. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/color.tcl +0 -0
  79. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/combobox.tcl +4 -4
  80. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/demo/basic.tcl +0 -0
  81. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/demo/bwidget.xbm +0 -0
  82. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/demo/demo.tcl +0 -0
  83. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/demo/dnd.tcl +0 -0
  84. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/demo/manager.tcl +0 -0
  85. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/demo/select.tcl +0 -0
  86. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/demo/tmpldlg.tcl +0 -0
  87. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/demo/tree.tcl +0 -0
  88. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/demo/x1.xbm +0 -0
  89. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/dialog.tcl +0 -0
  90. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/dragsite.tcl +0 -0
  91. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/dropsite.tcl +0 -0
  92. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/dynhelp.tcl +25 -18
  93. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/entry.tcl +0 -0
  94. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/font.tcl +0 -0
  95. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/bold.gif +0 -0
  96. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/copy.gif +0 -0
  97. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/cut.gif +0 -0
  98. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/dragfile.gif +0 -0
  99. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/dragicon.gif +0 -0
  100. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/error.gif +0 -0
  101. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/file.gif +0 -0
  102. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/folder.gif +0 -0
  103. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/hourglass.gif +0 -0
  104. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/info.gif +0 -0
  105. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/italic.gif +0 -0
  106. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/minus.xbm +0 -0
  107. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/new.gif +0 -0
  108. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/opcopy.xbm +0 -0
  109. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/open.gif +0 -0
  110. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/openfold.gif +0 -0
  111. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/oplink.xbm +0 -0
  112. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/opmove.xbm +0 -0
  113. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/overstrike.gif +0 -0
  114. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/palette.gif +0 -0
  115. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/passwd.gif +0 -0
  116. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/paste.gif +0 -0
  117. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/plus.xbm +0 -0
  118. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/print.gif +0 -0
  119. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/question.gif +0 -0
  120. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/redo.gif +0 -0
  121. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/save.gif +0 -0
  122. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/target.xbm +0 -0
  123. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/underline.gif +0 -0
  124. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/undo.gif +0 -0
  125. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/images/warning.gif +0 -0
  126. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/init.tcl +0 -0
  127. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/label.tcl +0 -0
  128. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/labelentry.tcl +0 -0
  129. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/labelframe.tcl +0 -0
  130. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/lang/da.rc +0 -0
  131. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/lang/de.rc +0 -0
  132. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/lang/en.rc +0 -0
  133. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/lang/es.rc +0 -0
  134. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/lang/fr.rc +0 -0
  135. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/lang/hu.rc +0 -0
  136. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/lang/nl.rc +0 -0
  137. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/lang/no.rc +0 -0
  138. data/tcl/BWidget-1.9.2/lang/pl.rc +104 -0
  139. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/listbox.tcl +68 -35
  140. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/mainframe.tcl +0 -0
  141. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/messagedlg.tcl +0 -0
  142. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/notebook.tcl +2 -2
  143. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/pagesmgr.tcl +0 -0
  144. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/panedw.tcl +0 -0
  145. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/panelframe.tcl +0 -0
  146. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/passwddlg.tcl +0 -0
  147. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/pkgIndex.tcl +2 -2
  148. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/progressbar.tcl +0 -0
  149. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/progressdlg.tcl +0 -0
  150. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/scrollframe.tcl +0 -0
  151. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/scrollview.tcl +0 -0
  152. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/scrollw.tcl +0 -0
  153. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/separator.tcl +0 -0
  154. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/spinbox.tcl +0 -0
  155. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/statusbar.tcl +0 -0
  156. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/tests/entry.test +0 -0
  157. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/titleframe.tcl +0 -0
  158. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/tree.tcl +6 -1
  159. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/utils.tcl +27 -7
  160. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/widget.tcl +0 -0
  161. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/wizard.tcl +0 -0
  162. data/tcl/{BWidget-1.9.0 → BWidget-1.9.2}/xpm2image.tcl +0 -0
  163. metadata +162 -153
@@ -0,0 +1 @@
1
+ bind=conf
@@ -18,11 +18,11 @@ re.comment=#
18
18
  re_op.to_line_end=comment
19
19
 
20
20
  # override global classes
21
- hightlight.sel.foreground=>>>hightlight.1.foreground
22
- hightlight.sel.background=>>>hightlight.1.background
23
- hightlight.sel.borderwidth=>>>hightlight.1.borderwidth
24
- hightlight.sel.relief=>>>hightlight.1.relief
25
- hightlight.selected.background=>>>hightlight.2.background
21
+ #hightlight.sel.foreground=>>>hightlight.1.foreground
22
+ #hightlight.sel.background=>>>hightlight.1.background
23
+ #hightlight.sel.borderwidth=>>>hightlight.1.borderwidth
24
+ #hightlight.sel.relief=>>>hightlight.1.relief
25
+ #hightlight.selected.background=>>>hightlight.2.background
26
26
  hightlight.tabs.foreground=>>>hightlight.3.foreground
27
27
  hightlight.tabs.background=>>>hightlight.3.background
28
28
  hightlight.tabs.borderwidth=>>>hightlight.3.borderwidth
@@ -70,4 +70,4 @@ re.hightlight.operator.style=bold
70
70
  re.hightlight.symbol.foreground=>>>hightlight.15.foreground
71
71
  re.hightlight.symbol.style=bold
72
72
 
73
- @include=coderay.tokens
73
+ @include=coderay.tokens
@@ -0,0 +1,3 @@
1
+ language=tcl
2
+ scanner=coderay
3
+ @include=coderay.tokens
@@ -144,16 +144,7 @@ class FilesHistrory < ArcadiaExt
144
144
  selectcommand proc{ do_select_item.call(self) }
145
145
  # place('relwidth' => 1,'relheight' => '1', 'x' => '0','y' => '22', 'height' => -22)
146
146
  }
147
- _wrapper = TkScrollWidget.new(@htree)
148
- _wrapper.show(0,26)
149
- _wrapper.show_v_scroll
150
- _wrapper.show_h_scroll
151
- # _scrollcommand = proc{|*args| @htree.yview(*args)}
152
- # _scrollbar = TkScrollbar.new(self.frame.hinner_frame, Arcadia.style('scrollbar')){|s|
153
- # width 8
154
- # command _scrollcommand
155
- # }.pack('side'=>'right', 'fill'=>'y')
156
- # @htree.yscrollcommand proc{|first,last| _scrollbar.set(first,last)}
147
+ @htree.extend(TkScrollableWidget).show(0,26)
157
148
 
158
149
  do_double_click = proc{
159
150
  _selected = @htree.selection_get[0]
@@ -347,13 +338,15 @@ class FilesHistrory < ArcadiaExt
347
338
  :tearoff=>0,
348
339
  :title => 'Menu tree'
349
340
  )
341
+ @pop_up_tree.extend(TkAutoPostMenu)
350
342
  @pop_up_tree.configure(Arcadia.style('menu'))
351
343
  #----- search submenu
352
344
  sub_ref_search = TkMenu.new(
353
- :parent=>@pop_up,
345
+ :parent=>@pop_up_tree,
354
346
  :tearoff=>0,
355
347
  :title => 'Ref'
356
348
  )
349
+ sub_ref_search.extend(TkAutoPostMenu)
357
350
  sub_ref_search.configure(Arcadia.style('menu'))
358
351
  sub_ref_search.insert('end',
359
352
  :command,
@@ -27,9 +27,7 @@ class OutputView
27
27
  @text = TkArcadiaText.new(right_frame,
28
28
  {'wrap'=> 'none'}.update(Arcadia.style('edit'))
29
29
  )
30
- @text.show
31
- @text.show_v_scroll
32
- @text.show_h_scroll
30
+ @text.extend(TkScrollableWidget).show
33
31
 
34
32
  @text.tag_configure('simple_msg',
35
33
  # 'background' => '#d9d994',
@@ -44,18 +42,17 @@ class OutputView
44
42
  )
45
43
  @text.tag_configure('error_msg',
46
44
  # 'background' => '#f6c9f6',
47
- 'foreground' => 'red',
45
+ 'foreground' => Arcadia.conf('hightlight.string.foreground'),
48
46
  'borderwidth'=>1,
49
47
  'relief'=> 'flat'
50
48
  )
51
-
52
49
  @text.tag_configure('bord_msg',
53
50
  #'foreground' => '#b9b8b9'
54
- 'foreground' => '#7c9b10'
51
+ 'foreground' => Arcadia.conf('hightlight.comment.foreground')
55
52
  )
56
53
  @text.tag_configure('sel',
57
- 'background'=>parent.conf('hightlight.sel.color.background'),
58
- 'foreground'=>parent.conf('hightlight.sel.color.foreground')
54
+ 'background'=>Arcadia.conf('hightlight.sel.background'),
55
+ 'foreground'=>Arcadia.conf('hightlight.sel.foreground')
59
56
  )
60
57
  pop_up_menu
61
58
  end
@@ -66,6 +63,7 @@ class OutputView
66
63
  :tearoff=>0,
67
64
  :title => 'Menu'
68
65
  )
66
+ @pop_up.extend(TkAutoPostMenu)
69
67
  @pop_up.configure(Arcadia.style('menu'))
70
68
 
71
69
  @pop_up.insert('end',
@@ -126,7 +124,6 @@ class OutputView
126
124
  ensure
127
125
  f.close unless f.nil?
128
126
  end
129
- #EditorContract.instance.file_saved(self,'file' =>@file)
130
127
  end
131
128
  end
132
129
 
@@ -162,45 +159,66 @@ class Output < ArcadiaExt
162
159
  end
163
160
 
164
161
  def on_msg(_event)
165
- self.frame.show
166
- _txt = "\n+--- "+format_time(_event.time)+" ---+\n"+_event.msg.strip+"\n"
167
- _index_begin = @main_frame.text.index('end')
168
- @main_frame.text.insert(_index_begin,_txt)
169
- _index_end = @main_frame.text.index('end')
170
- case _event.level
171
- when 'debug'
172
- @main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
173
- @main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
174
- @main_frame.text.tag_add('debug_msg',_index_begin, _index_end+ ' lineend')
175
- parse_debug(_index_begin.split('.')[0].to_i)
176
- when 'error'
177
- @main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
178
- @main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
179
- @main_frame.text.tag_add('error_msg',_index_begin, _index_end+ ' lineend')
180
- parse_debug(_index_begin.split('.')[0].to_i)
181
- else
182
- @main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
183
- @main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
184
- @main_frame.text.tag_add('simple_msg',_index_begin, _index_end+ ' lineend')
162
+ self.frame.show
163
+ if _event.mark
164
+ _index_begin = "#{@main_frame.text.index(_event.mark)} + 1 lines + 1 chars"
165
+ # _b = Tk::BWidget::Button.new(@main_frame.text,
166
+ # 'helptext'=>Time.now.strftime("-> %d-%b-%Y %H:%M:%S"),
167
+ # 'background'=>Arcadia.style('edit')['background'],
168
+ # 'borderwidth'=>0,
169
+ # 'image'=> TkPhotoImage.new('data' => ITEM_LOG_GIF),
170
+ # 'relief'=>'flat')
171
+ # TkTextWindow.new(@main_frame.text, _index_begin, 'window'=> _b)
172
+ # TkTextImage.new(@main_frame.text, _index_begin, 'padx'=>0, 'pady'=>0, 'image'=> TkPhotoImage.new('data' => ITEM_LOG_GIF))
173
+ else
174
+ @main_frame.text.insert("end","\n")
175
+ _index_begin = @main_frame.text.index('end')
176
+ TkTextImage.new(@main_frame.text, _index_begin, 'padx'=>0, 'pady'=>0, 'image'=> TkPhotoImage.new('data' => ITEM_START_LOG_GIF))
177
+ @main_frame.text.insert("end"," +--- #{format_time(_event.time)} ---+\n", 'bord_msg')
178
+ end
179
+ if _event.append
180
+ _index_begin = "#{@main_frame.text.index(_index_begin)} - 2 lines lineend"
181
+ _txt = _event.msg
182
+ elsif _event.msg[-1] == "\n"
183
+ _txt = _event.msg
184
+ else
185
+ _txt = "#{_event.msg}\n"
185
186
  end
186
- @main_frame.text.tag_add('bord_msg',_index_begin+' linestart', _index_begin+ ' lineend')
187
- @main_frame.text.tag_add('bord_msg',_index_end+' -1 lines linestart', _index_end+ ' -1 lines lineend')
187
+ if _event.level == 'error'
188
+ TkTextImage.new(@main_frame.text, _index_begin, 'padx'=>0, 'pady'=>0, 'image'=> TkPhotoImage.new('data' => ERROR_9X9_GIF))
189
+ end
190
+ @main_frame.text.insert(_index_begin,_txt, "#{_event.level}_msg")
191
+ _index_end = @main_frame.text.index('end')
192
+ if ['debug','error'].include?(_event.level)
193
+ parse_debug(_index_begin.split('.')[0].to_i, _index_end.split('.')[0].to_i)
194
+ end
188
195
  @main_frame.text.see(_index_end)
196
+ @main_frame.text.mark_unset(_event.mark)
197
+ _event.mark="mark-#{_index_end}"
198
+ @main_frame.text.mark_set(_event.mark, "#{_index_end} - 1 lines -1 chars")
199
+ # if _event.instance_of?(MsgRunEvent)
200
+ # _b = TkButton.new(@main_frame.text,
201
+ # 'command'=>proc{_event.abort_action.call;_b.destroy},
202
+ # 'image'=> TkPhotoImage.new('data' => CLOSE_GIF),
203
+ # 'relief'=>'groove')
204
+ # TkTextWindow.new(@main_frame.text, 'end', 'window'=> _b)
205
+ # end
189
206
  end
190
207
 
191
- def parse_debug(_from_row=0)
192
- _row = 0
208
+ def parse_debug(_from_row=0, _to_row=-1)
209
+ return if _from_row == _to_row
210
+ _row = _from_row
193
211
  @cursor = @main_frame.text.cget('cursor')
194
212
  @j=0
195
213
  file_tag=Hash.new
196
214
  if String.method_defined?(:lines)
197
- lines = @main_frame.text.value.lines
215
+ lines = @main_frame.text.value.lines.to_a[_from_row.._to_row]
198
216
  else
199
- lines = @main_frame.text.value
217
+ lines = @main_frame.text.value.to_a[_from_row.._to_row]
200
218
  end
201
219
  lines.each{|l|
202
220
  _row = _row+1
203
- if _row >= _from_row
221
+ #if _row >= _from_row
204
222
  _end = 0
205
223
  #m = /([\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*\.rb):(\d*)/.match(l)
206
224
  re = Regexp.new('([\w\:]*[\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*):(\d*)')
@@ -223,14 +241,15 @@ class Output < ArcadiaExt
223
241
  end
224
242
  m = re.match(_txt)
225
243
  end
226
- end
244
+ #end
227
245
  }
228
246
  end
229
247
 
230
248
  def file_binding(_file, _line, _ibegin, _iend)
249
+ _line = '0' if _line.nil? || _line.strip.length == 0
231
250
  tag_name = "tag_#{@j}"
232
251
  @main_frame.text.tag_configure(tag_name,
233
- 'foreground' => '#800000',
252
+ 'foreground' => Arcadia.conf('hightlight.link.foreground'),
234
253
  'borderwidth'=>0,
235
254
  'relief'=>'flat',
236
255
  'underline'=>true
@@ -4,7 +4,7 @@
4
4
  #
5
5
 
6
6
  require 'tk'
7
- require 'lib/a-tkcommons'
7
+ require "#{Dir.pwd}/lib/a-tkcommons"
8
8
  require 'tkextlib/bwidget'
9
9
  require "observer"
10
10
 
@@ -3,8 +3,8 @@
3
3
  # by Antonio Galeone <antonio-galeone@rubyforge.org>
4
4
  #
5
5
 
6
- require 'ext/ae-rad/ae-rad-libs'
7
- require 'ext/ae-rad/lib/tk/al-tk'
6
+ require "#{Dir.pwd}/ext/ae-rad/ae-rad-libs"
7
+ require "#{Dir.pwd}/ext/ae-rad/lib/tk/al-tk"
8
8
  require 'tk'
9
9
  require 'tkmenubar'
10
10
  require 'tkextlib/bwidget'
@@ -3,9 +3,9 @@
3
3
  # by Antonio Galeone <antonio-galeone@rubyforge.org>
4
4
  #
5
5
 
6
- require 'ext/ae-rad/ae-rad-libs'
7
- require 'ext/ae-rad/ae-rad-palette'
8
- require 'ext/ae-rad/ae-rad-inspector'
6
+ require "#{Dir.pwd}/ext/ae-rad/ae-rad-libs"
7
+ require "#{Dir.pwd}/ext/ae-rad/ae-rad-palette"
8
+ require "#{Dir.pwd}/ext/ae-rad/ae-rad-inspector"
9
9
 
10
10
  class Rad < ArcadiaExt
11
11
  attr_reader :libs
@@ -30,16 +30,16 @@ class Rad < ArcadiaExt
30
30
  libs.each{|lib|
31
31
  if lib
32
32
  begin
33
- require conf('libraries.'+lib+'.source')
33
+ require "#{Dir.pwd}/#{conf('libraries.'+lib+'.source')}"
34
34
  @libs.add_lib(
35
35
  ArcadiaLibs::ArcadiaLibParams.new(
36
36
  conf('libraries.'+lib+'.name'),
37
- conf('libraries.'+lib+'.source'),
37
+ "#{Dir.pwd}/#{conf('libraries.'+lib+'.source')}",
38
38
  conf('libraries.'+lib+'.require'),
39
39
  eval(conf('libraries.'+lib+'.collection.class')))
40
40
  )
41
41
  rescue Exception
42
- msg = "Loading lib "+'"'+lib+'"'+" ("+$!.class.to_s+") "+" : "+$! + " at : "+$@.to_s
42
+ msg = %Q{Loading lib "#{lib}" ("#{$!.class.to_s}") : #{$!.to_s} at : #{$@.to_s}}
43
43
  if Tk.messageBox('icon' => 'error', 'type' => 'okcancel',
44
44
  'title' => '(Rad) Libs',
45
45
  'message' => msg) == 'cancel'
@@ -53,4 +53,4 @@ class Rad < ArcadiaExt
53
53
  }
54
54
  end
55
55
 
56
- end
56
+ end
@@ -4,9 +4,9 @@
4
4
  #
5
5
 
6
6
  require 'tk'
7
- require 'ext/ae-rad/ae-rad-libs'
8
- require "lib/a-tkcommons"
9
- require "ext/ae-rad/lib/tk/al-tk.res"
7
+ require "#{Dir.pwd}/ext/ae-rad/ae-rad-libs"
8
+ require "#{Dir.pwd}/lib/a-tkcommons"
9
+ require "#{Dir.pwd}/ext/ae-rad/lib/tk/al-tk.res"
10
10
 
11
11
  TkAllPhotoImage = TkPhotoImage
12
12
 
@@ -3,7 +3,7 @@
3
3
  # by Antonio Galeone <antonio-galeone@rubyforge.org>
4
4
  #
5
5
 
6
- require 'ext/ae-rad/lib/tk/al-tk'
6
+ require "#{Dir.pwd}/ext/ae-rad/lib/tk/al-tk"
7
7
 
8
8
  class TkLabelWatch < TkLabel
9
9
  def show(_format="%I:%M:%S %p")
@@ -67,4 +67,4 @@ class ArcadiaLibTkCustom < ArcadiaLib
67
67
  def register_classes
68
68
  self.add_class(AGTkLabelWatch)
69
69
  end
70
- end
70
+ end
@@ -23,4 +23,23 @@ auto_resume_break_on_first_line=yes
23
23
  #freebsd::font.bold=courier 10 bold
24
24
  #win::font={Courier New} 8
25
25
  #win::font.bold={Courier New} 8 bold
26
- #========================================
26
+ #========================================
27
+ user_toolbar.contexts=debug
28
+ user_toolbar.debug.context_path=run
29
+ user_toolbar.debug=debugcurr,debuglast,debugquit
30
+
31
+ user_toolbar.debug.debugcurr.name=debug
32
+ user_toolbar.debug.debugcurr.hint=Debug current
33
+ user_toolbar.debug.debugcurr.image_data=!DEBUG_CURRENT_GIF
34
+ user_toolbar.debug.debugcurr.event_class=!StartDebugEvent
35
+
36
+ user_toolbar.debug.debuglast.name=debug
37
+ user_toolbar.debug.debuglast.hint=Debug last
38
+ user_toolbar.debug.debuglast.image_data=!DEBUG_LAST_GIF
39
+ user_toolbar.debug.debuglast.event_class=!StartDebugEvent
40
+ user_toolbar.debug.debuglast.event_args=!{'file'=>"*LAST"}
41
+
42
+ user_toolbar.debug.debugquit.name=debugquit
43
+ user_toolbar.debug.debugquit.hint=Quit debug
44
+ user_toolbar.debug.debugquit.image_data=!DEBUG_QUIT_GIF
45
+ user_toolbar.debug.debugquit.event_class=!StopDebugEvent
@@ -29,51 +29,51 @@ class RubyDebugView
29
29
  # 'helptext'=>'step over',
30
30
  # 'image'=> TkPhotoImage.new('dat' => D_NEXT_GIF)})
31
31
  # )
32
- @debug_button_box.add(
32
+ @debug_button_box.add(Arcadia.style('toolbarbutton').update({
33
33
  'name'=>'debug_over',
34
- 'background' => 'white',
34
+ # 'background' => 'white',
35
35
  'anchor' => 'nw',
36
36
  'command'=>proc{self.debug_send(:step_over)},
37
37
  'helptext'=>'step over',
38
38
  'image'=> TkPhotoImage.new('dat' => D_NEXT_GIF),
39
- 'relief'=> _relief
39
+ 'relief'=> _relief })
40
40
  )
41
- @debug_button_box.add(
41
+ @debug_button_box.add(Arcadia.style('toolbarbutton').update({
42
42
  'name'=>'debug_into',
43
- 'background' => 'white',
43
+ # 'background' => 'white',
44
44
  'anchor' => 'nw',
45
45
  'command'=>proc{self.debug_send(:step_into)},
46
46
  'helptext'=>'step into',
47
47
  'image'=> TkPhotoImage.new('dat' => D_STEP_INTO_GIF),
48
- 'relief'=>_relief
48
+ 'relief'=>_relief })
49
49
  )
50
- @debug_button_box.add(
50
+ @debug_button_box.add(Arcadia.style('toolbarbutton').update({
51
51
  'name'=>'debug_out',
52
- 'background' => 'white',
52
+ # 'background' => 'white',
53
53
  'anchor' => 'nw',
54
54
  'helptext'=>'step out',
55
55
  'command'=>proc{self.debug_send(:step_out)},
56
56
  'image'=> TkPhotoImage.new('dat' => D_STEP_OUT_GIF),
57
- 'relief'=>_relief
57
+ 'relief'=>_relief })
58
58
  )
59
- @debug_button_box.add(
59
+ @debug_button_box.add(Arcadia.style('toolbarbutton').update({
60
60
  'name'=>'debug_resume',
61
- 'background' => 'white',
61
+ # 'background' => 'white',
62
62
  'anchor' => 'nw',
63
63
  'helptext'=>'resume',
64
64
  'image'=> TkPhotoImage.new('dat' => D_RESUME_GIF),
65
65
  'command'=>proc{self.debug_send(:resume)},
66
- 'relief'=>_relief
66
+ 'relief'=>_relief })
67
67
  )
68
68
 
69
- @debug_button_box.add(
69
+ @debug_button_box.add(Arcadia.style('toolbarbutton').update({
70
70
  'name'=>'debug_quit',
71
- 'background' => 'white',
71
+ # 'background' => 'white',
72
72
  'anchor' => 'nw',
73
73
  'helptext'=>'quit',
74
74
  'image'=> TkPhotoImage.new('dat' => D_QUIT_GIF),
75
75
  'command'=>proc{self.debug_send(:quit)},
76
- 'relief'=>_relief
76
+ 'relief'=>_relief })
77
77
  )
78
78
 
79
79
  # @debug_button_box.bind_append("KeyPress"){|e|
@@ -93,48 +93,34 @@ class RubyDebugView
93
93
  background Arcadia.conf('panel.background')
94
94
  }.place('height'=> _y)
95
95
 
96
- @debug_frame = TkFrame.new(@frame, Arcadia.style('panel')){
97
- border 2
98
- place(
99
- 'y'=>_y,
100
- 'height'=> -_y,
101
- 'relheight'=> 1,
102
- 'relwidth'=> 1
103
- )
104
- }
96
+ # @debug_frame = TkFrame.new(@frame, Arcadia.style('panel')){
97
+ # border 2
98
+ # place(
99
+ # 'y'=>_y,
100
+ # 'height'=> -_y,
101
+ # 'relheight'=> 1,
102
+ # 'relwidth'=> 1
103
+ # )
104
+ # }
105
105
 
106
106
  self.build_buttons_set
107
107
 
108
- # sf = AGTkOSplittedFrames.new(@debug_frame,@debug_frame,70)
109
-
110
- #-------------------------------------------------
111
108
  build_process_panel(@frame_server)
112
- # build_process_panel(sf.top_frame)
113
- #-------------------------------------------------
114
-
115
- @enb = Tk::BWidget::NoteBook.new(@debug_frame, Arcadia.style('tabpanel')){
116
- tabbevelsize 0
117
- internalborderwidth 2
118
- place('relwidth' => 1,'relheight' => '1')
119
- }
120
- _tab_var = @enb.insert('end', 'vars' ,
121
- 'text'=> 'Variables',
122
- 'raisecmd'=>proc{}
123
- )
124
- # _tab_breakpoint = @enb.insert('end', 'Breakpoint' ,
125
- # 'text'=> 'Breakpoints',
126
- # 'raisecmd'=>proc{}
127
- # )
128
109
 
129
- # _tab_catchpoint = @enb.insert('end', 'catchpoint' ,
130
- # 'text'=> 'catchpoint',
110
+ # @enb = Tk::BWidget::NoteBook.new(@debug_frame, Arcadia.style('tabpanel')){
111
+ # tabbevelsize 0
112
+ # internalborderwidth 2
113
+ # place('relwidth' => 1,'relheight' => '1')
114
+ # }
115
+ #
116
+ # _tab_var = @enb.insert('end', 'vars' ,
117
+ # 'text'=> 'Variables',
131
118
  # 'raisecmd'=>proc{}
132
119
  # )
133
120
 
134
- build_var_panel(_tab_var)
135
- #build_break_panel(_tab_breakpoint)
121
+ build_var_panel(@frame)
136
122
  @stack_nodes = Array.new
137
- @enb.raise('vars')
123
+ # @enb.raise('vars')
138
124
 
139
125
  end
140
126
 
@@ -196,17 +182,22 @@ class RubyDebugView
196
182
  end
197
183
 
198
184
  @tree_var = Tk::BWidget::Tree.new(_frame, Arcadia.style('treepanel')){
199
- showlines true
185
+ showlines false
200
186
  deltay 15
201
187
  opencmd _open_proc
202
- }.place('relwidth' => 1,'relheight' => '1','bordermode' => 'inside')
188
+ }
189
+
190
+ #.place('relwidth' => 1,'relheight' => '1','bordermode' => 'inside')
203
191
 
204
- _scrollcommand = proc{|*args| @tree_var.yview(*args)}
205
- _scrollbar = TkScrollbar.new(_frame, Arcadia.style('scrollbar')){|s|
206
- width 8
207
- command _scrollcommand
208
- }.pack('side'=>'right', 'fill'=>'y')
209
- @tree_var.yscrollcommand proc{|first,last| _scrollbar.set(first,last)}
192
+ @tree_var.extend(TkScrollableWidget).show(0,26)
193
+
194
+
195
+ # _scrollcommand = proc{|*args| @tree_var.yview(*args)}
196
+ # _scrollbar = TkScrollbar.new(_frame, Arcadia.style('scrollbar')){|s|
197
+ # width 8
198
+ # command _scrollcommand
199
+ # }.pack('side'=>'right', 'fill'=>'y')
200
+ # @tree_var.yscrollcommand proc{|first,last| _scrollbar.set(first,last)}
210
201
 
211
202
  @tree_var.textbind("Double-ButtonPress-1", proc{
212
203
  _selected = @tree_var.selection_get[0]
@@ -781,7 +772,8 @@ class RubyDebugServer
781
772
  else
782
773
  commandLine = "rdebug --host #{_host} --port #{_remote_port} -sw #{_filename}"
783
774
  end
784
- Arcadia.process_event(SystemExecEvent.new(self, 'command'=>commandLine))
775
+ #Arcadia.process_event(SystemExecEvent.new(self, 'command'=>commandLine))
776
+ Arcadia.process_event(RunCmdEvent.new(self, 'cmd'=>commandLine, 'file'=>_filename))
785
777
  end
786
778
 
787
779
  def is_alive?
@@ -816,7 +808,7 @@ class RubyDebugServer
816
808
  Arcadia.console(self, 'msg'=>"#{$?.inspect}")
817
809
  #Arcadia.new_msg(self,"#{$?.inspect}")
818
810
  else
819
- _event = Arcadia.process_event(RunRubyFileEvent.new(self, 'file'=>_filename))
811
+ _event = Arcadia.process_event(RunCmdEvent.new(self, {'file'=>_filename}))
820
812
  Arcadia.console(self, 'msg'=>"#{_event.results[0].output}", 'level'=>'debug')
821
813
  #Arcadia.new_debug_msg(self,"#{_event.results[0].output}")
822
814
  end
@@ -826,6 +818,19 @@ class RubyDebugServer
826
818
  end
827
819
  else
828
820
  @pid = Process.fork do
821
+ # pid = Process.pid
822
+ # abort_action = proc{
823
+ # ArcadiaUtils.unix_child_pids(pid).each {|pid|
824
+ # Process.kill(9,pid.to_i)
825
+ # }
826
+ # Process.kill(9,pid.to_i)
827
+ # }
828
+ #
829
+ # alive_check = proc{
830
+ # num = `ps -p #{pid}|wc -l`
831
+ # num.to_i > 1
832
+ # }
833
+ # Arcadia.process_event(SubProcessEvent.new(self,'pid'=>pid, 'name'=>"debugging :#{_filename}",'abort_action'=>abort_action, 'alive_check'=>alive_check))
829
834
  if Kernel.system(commandLine)
830
835
  set_alive(false)
831
836
  #p "alive=#{is_alive?}"
@@ -1295,9 +1300,9 @@ class RubyDebugClient
1295
1300
  begin
1296
1301
  #variables = read[1..-2].split(', ').collect!{|x| x[1..-2]}
1297
1302
  to_eval = read("eval #{_type}")
1298
- #Arcadia.new_msg(self,"to_eval="+to_eval.to_s)
1303
+ #Arcadia.console(self,'msg'=>"to_eval=#{to_eval.to_s}")
1299
1304
  variables = eval(to_eval)
1300
- #Arcadia.new_msg(self,"variables="+variables.to_s)
1305
+ #Arcadia.console(self,'msg'=>"variables=#{variables.to_s}")
1301
1306
  rescue Exception => e
1302
1307
  variables = []
1303
1308
  #p "on command eval #{_type}:#{e.inspect}"
@@ -1306,12 +1311,12 @@ class RubyDebugClient
1306
1311
  variables = [] if variables.nil?
1307
1312
  variable_values = Hash.new
1308
1313
  variables.each do |var|
1309
- next if var=='$;'
1314
+ next if var.to_s=='$;'
1310
1315
  # command("eval #{var}.to_s + '|||' + #{var}.class.to_s")
1311
1316
  # _str = eval(read)
1312
1317
  # _value, _class = _str.split('|||')
1313
1318
  # variable_values[var] = Var.new(_value, _class)
1314
- variable_values[var] = debug_eval(var)
1319
+ variable_values[var.to_s] = debug_eval(var.to_s)
1315
1320
  end
1316
1321
  return variable_values
1317
1322
  end
@@ -1385,10 +1390,9 @@ class RubyDebug < ArcadiaExt
1385
1390
  attr_reader :rdc
1386
1391
  def on_before_build(_event)
1387
1392
  if RubyWhich.new.which("rdebug") != []
1388
- #ArcadiaContractListener.new(self, EditorContract, :do_editor_event)
1389
- Arcadia.attach_listener(self, BufferEvent)
1390
1393
  @breakpoints = Hash.new
1391
1394
  @static_breakpoints = Array.new
1395
+ Arcadia.attach_listener(self, BufferEvent)
1392
1396
  else
1393
1397
  Arcadia.console(self, 'msg'=>"Warning: Extension ae-ruby-debug depend upon rdebug command (install it or update system path!)", 'level'=>'error')
1394
1398
  #Arcadia.new_error_msg(self, "Warning: Extension ae-ruby-debug depend upon rdebug command (install it or update system path!)")
@@ -1495,7 +1499,7 @@ class RubyDebug < ArcadiaExt
1495
1499
  end
1496
1500
 
1497
1501
  def breakpoint_free_live
1498
- @breakpoints.clear
1502
+ @breakpoints.clear if @breakpoints
1499
1503
  #@rdv.break_list_free if @rdv
1500
1504
  end
1501
1505