arcadia 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +8 -10
- data/bin/arcadia +13 -13
- data/bin/arcadia.bat +0 -0
- data/conf/arcadia.conf +35 -18
- data/conf/arcadia.init.rb +0 -0
- data/conf/arcadia.res.rb +10 -0
- data/ext/ae-breakpoints/ae-breakpoints.conf +0 -0
- data/ext/ae-breakpoints/ae-breakpoints.rb +368 -349
- data/ext/ae-editor/ae-editor.conf +2 -2
- data/ext/ae-editor/ae-editor.rb +1248 -445
- data/ext/ae-editor/langs/conf.lang +0 -0
- data/ext/ae-editor/langs/lang.lang.bind +0 -0
- data/ext/ae-editor/langs/rb.lang +0 -0
- data/ext/ae-editor/langs/rbw.lang.bind +0 -0
- data/ext/ae-file-history/ae-file-history.conf +1 -1
- data/ext/ae-file-history/ae-file-history.rb +23 -17
- data/ext/ae-output/ae-output.conf +0 -0
- data/ext/ae-output/ae-output.rb +262 -200
- data/ext/ae-rad/ae-rad-inspector.rb +34 -26
- data/ext/ae-rad/ae-rad-libs.rb +0 -0
- data/ext/ae-rad/ae-rad-palette.rb +0 -0
- data/ext/ae-rad/ae-rad.conf +0 -0
- data/ext/ae-rad/ae-rad.rb +0 -0
- data/ext/ae-rad/lib/tk/al-tk.rb +6 -2
- data/ext/ae-rad/lib/tk/al-tk.res.rb +0 -0
- data/ext/ae-rad/lib/tk/al-tkarcadia.rb +0 -0
- data/ext/ae-rad/lib/tk/al-tkcustom.rb +0 -0
- data/ext/ae-rad/lib/tkext/al-bwidget.rb +0 -0
- data/ext/ae-rad/lib/tkext/al-iwidgets.rb +0 -0
- data/ext/ae-rad/lib/tkext/al-tile.rb +0 -0
- data/ext/ae-rad/lib/tkext/al-tktable.rb +0 -0
- data/ext/ae-ruby-debug/ae-ruby-debug.conf +0 -0
- data/ext/ae-ruby-debug/ae-ruby-debug.rb +1 -0
- data/ext/ae-search-in-files/ae-search-in-files.conf +0 -0
- data/ext/ae-search-in-files/ae-search-in-files.rb +14 -10
- data/ext/ae-shell/ae-shell.conf +0 -0
- data/ext/ae-shell/ae-shell.rb +1 -1
- data/ext/ae-shell/sh.rb +0 -0
- data/lib/a-commons.rb +5 -1
- data/lib/a-contracts.rb +1 -0
- data/lib/a-core.rb +40 -9
- data/lib/a-tkcommons.rb +229 -1
- data/tcl/BWidget-1.8.0/BWman/ArrowButton.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/BWidget.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/Button.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/ButtonBox.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/ComboBox.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/Dialog.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/DragSite.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/DropSite.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/DynamicHelp.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/Entry.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/Label.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/LabelEntry.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/LabelFrame.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/ListBox.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/MainFrame.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/MessageDlg.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/NoteBook.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/PagesManager.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/PanedWindow.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/PanelFrame.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/PasswdDlg.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/ProgressBar.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/ProgressDlg.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/ScrollView.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/ScrollableFrame.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/ScrolledWindow.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/SelectColor.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/SelectFont.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/Separator.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/SpinBox.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/StatusBar.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/TitleFrame.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/Tree.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/Widget.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/contents.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/index.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/navtree.html +0 -0
- data/tcl/BWidget-1.8.0/BWman/options.htm +0 -0
- data/tcl/BWidget-1.8.0/CHANGES.txt +0 -0
- data/tcl/BWidget-1.8.0/ChangeLog +0 -0
- data/tcl/BWidget-1.8.0/LICENSE.txt +0 -0
- data/tcl/BWidget-1.8.0/README.txt +0 -0
- data/tcl/BWidget-1.8.0/arrow.tcl +0 -0
- data/tcl/BWidget-1.8.0/bitmap.tcl +0 -0
- data/tcl/BWidget-1.8.0/button.tcl +0 -0
- data/tcl/BWidget-1.8.0/buttonbox.tcl +0 -0
- data/tcl/BWidget-1.8.0/color.tcl +0 -0
- data/tcl/BWidget-1.8.0/combobox.tcl +0 -0
- data/tcl/BWidget-1.8.0/demo/basic.tcl +0 -0
- data/tcl/BWidget-1.8.0/demo/bwidget.xbm +0 -0
- data/tcl/BWidget-1.8.0/demo/demo.tcl +0 -0
- data/tcl/BWidget-1.8.0/demo/dnd.tcl +0 -0
- data/tcl/BWidget-1.8.0/demo/manager.tcl +0 -0
- data/tcl/BWidget-1.8.0/demo/select.tcl +0 -0
- data/tcl/BWidget-1.8.0/demo/tmpldlg.tcl +0 -0
- data/tcl/BWidget-1.8.0/demo/tree.tcl +0 -0
- data/tcl/BWidget-1.8.0/demo/x1.xbm +0 -0
- data/tcl/BWidget-1.8.0/dialog.tcl +0 -0
- data/tcl/BWidget-1.8.0/dragsite.tcl +0 -0
- data/tcl/BWidget-1.8.0/dropsite.tcl +0 -0
- data/tcl/BWidget-1.8.0/dynhelp.tcl +0 -0
- data/tcl/BWidget-1.8.0/entry.tcl +0 -0
- data/tcl/BWidget-1.8.0/font.tcl +0 -0
- data/tcl/BWidget-1.8.0/images/bold.gif +0 -0
- data/tcl/BWidget-1.8.0/images/copy.gif +0 -0
- data/tcl/BWidget-1.8.0/images/cut.gif +0 -0
- data/tcl/BWidget-1.8.0/images/dragfile.gif +0 -0
- data/tcl/BWidget-1.8.0/images/dragicon.gif +0 -0
- data/tcl/BWidget-1.8.0/images/error.gif +0 -0
- data/tcl/BWidget-1.8.0/images/file.gif +0 -0
- data/tcl/BWidget-1.8.0/images/folder.gif +0 -0
- data/tcl/BWidget-1.8.0/images/hourglass.gif +0 -0
- data/tcl/BWidget-1.8.0/images/info.gif +0 -0
- data/tcl/BWidget-1.8.0/images/italic.gif +0 -0
- data/tcl/BWidget-1.8.0/images/minus.xbm +0 -0
- data/tcl/BWidget-1.8.0/images/new.gif +0 -0
- data/tcl/BWidget-1.8.0/images/opcopy.xbm +0 -0
- data/tcl/BWidget-1.8.0/images/open.gif +0 -0
- data/tcl/BWidget-1.8.0/images/openfold.gif +0 -0
- data/tcl/BWidget-1.8.0/images/oplink.xbm +0 -0
- data/tcl/BWidget-1.8.0/images/opmove.xbm +0 -0
- data/tcl/BWidget-1.8.0/images/overstrike.gif +0 -0
- data/tcl/BWidget-1.8.0/images/palette.gif +0 -0
- data/tcl/BWidget-1.8.0/images/passwd.gif +0 -0
- data/tcl/BWidget-1.8.0/images/paste.gif +0 -0
- data/tcl/BWidget-1.8.0/images/plus.xbm +0 -0
- data/tcl/BWidget-1.8.0/images/print.gif +0 -0
- data/tcl/BWidget-1.8.0/images/question.gif +0 -0
- data/tcl/BWidget-1.8.0/images/redo.gif +0 -0
- data/tcl/BWidget-1.8.0/images/save.gif +0 -0
- data/tcl/BWidget-1.8.0/images/target.xbm +0 -0
- data/tcl/BWidget-1.8.0/images/underline.gif +0 -0
- data/tcl/BWidget-1.8.0/images/undo.gif +0 -0
- data/tcl/BWidget-1.8.0/images/warning.gif +0 -0
- data/tcl/BWidget-1.8.0/init.tcl +0 -0
- data/tcl/BWidget-1.8.0/label.tcl +0 -0
- data/tcl/BWidget-1.8.0/labelentry.tcl +0 -0
- data/tcl/BWidget-1.8.0/labelframe.tcl +0 -0
- data/tcl/BWidget-1.8.0/lang/da.rc +0 -0
- data/tcl/BWidget-1.8.0/lang/de.rc +0 -0
- data/tcl/BWidget-1.8.0/lang/en.rc +0 -0
- data/tcl/BWidget-1.8.0/lang/es.rc +0 -0
- data/tcl/BWidget-1.8.0/lang/fr.rc +0 -0
- data/tcl/BWidget-1.8.0/listbox.tcl +0 -0
- data/tcl/BWidget-1.8.0/mainframe.tcl +0 -0
- data/tcl/BWidget-1.8.0/messagedlg.tcl +0 -0
- data/tcl/BWidget-1.8.0/notebook.tcl +0 -0
- data/tcl/BWidget-1.8.0/pagesmgr.tcl +0 -0
- data/tcl/BWidget-1.8.0/panedw.tcl +0 -0
- data/tcl/BWidget-1.8.0/panelframe.tcl +0 -0
- data/tcl/BWidget-1.8.0/passwddlg.tcl +0 -0
- data/tcl/BWidget-1.8.0/pkgIndex.tcl +0 -0
- data/tcl/BWidget-1.8.0/progressbar.tcl +0 -0
- data/tcl/BWidget-1.8.0/progressdlg.tcl +0 -0
- data/tcl/BWidget-1.8.0/scrollframe.tcl +0 -0
- data/tcl/BWidget-1.8.0/scrollview.tcl +0 -0
- data/tcl/BWidget-1.8.0/scrollw.tcl +0 -0
- data/tcl/BWidget-1.8.0/separator.tcl +0 -0
- data/tcl/BWidget-1.8.0/spinbox.tcl +0 -0
- data/tcl/BWidget-1.8.0/statusbar.tcl +0 -0
- data/tcl/BWidget-1.8.0/tests/entry.test +0 -0
- data/tcl/BWidget-1.8.0/titleframe.tcl +0 -0
- data/tcl/BWidget-1.8.0/tree.tcl +0 -0
- data/tcl/BWidget-1.8.0/utils.tcl +0 -0
- data/tcl/BWidget-1.8.0/widget.tcl +0 -0
- data/tcl/BWidget-1.8.0/wizard.tcl +0 -0
- data/tcl/BWidget-1.8.0/xpm2image.tcl +0 -0
- metadata +2 -25
- data/ext/ae-complete-code/ae-complete-code.conf +0 -6
- data/ext/ae-complete-code/ae-complete-code.rb +0 -74
- data/ext/ae-doc-code/ae-doc-code.conf +0 -15
- data/ext/ae-doc-code/ae-doc-code.rb +0 -300
- data/ext/ae-event-log/ae-event-log.conf +0 -5
- data/ext/ae-event-log/ae-event-log.rb +0 -46
- data/ext/ae-flag/ae-flag.conf +0 -6
- data/ext/ae-flag/ae-flag.rb +0 -12
- data/ext/ae-output-event/ae-output-event.conf +0 -15
File without changes
|
File without changes
|
data/ext/ae-editor/langs/rb.lang
CHANGED
File without changes
|
File without changes
|
@@ -2,6 +2,11 @@
|
|
2
2
|
# ae-file-history.rb - Arcadia Ruby ide
|
3
3
|
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
4
4
|
#
|
5
|
+
# §require_dir_ref=../..
|
6
|
+
# §require_omissis=conf/arcadia.init
|
7
|
+
# §require_omissis=lib/a-commons
|
8
|
+
# §require_omissis=lib/a-tkcommons
|
9
|
+
# §require_omissis=lib/a-core
|
5
10
|
|
6
11
|
|
7
12
|
class TreeNode
|
@@ -163,27 +168,28 @@ class FilesHistrory < ArcadiaExt
|
|
163
168
|
@font_b = "#{Arcadia.conf('treeitem.font')} bold"
|
164
169
|
|
165
170
|
@htree = Tk::BWidget::Tree.new(self.frame.hinner_frame, Arcadia.style('treepanel')){
|
166
|
-
#relief 'flat'
|
167
171
|
showlines false
|
168
172
|
deltay 18
|
169
|
-
#background _background
|
170
|
-
#crossfill _foreground
|
171
|
-
#dragenabled true
|
172
173
|
selectcommand proc{ do_select_item.call(self) }
|
173
|
-
place('relwidth' => 1,'relheight' => '1', 'x' => '0','y' => '22', 'height' => -22)
|
174
|
+
# place('relwidth' => 1,'relheight' => '1', 'x' => '0','y' => '22', 'height' => -22)
|
174
175
|
}
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
176
|
+
_wrapper = TkScrollWidget.new(@htree)
|
177
|
+
_wrapper.show(0,22)
|
178
|
+
_wrapper.show_v_scroll
|
179
|
+
_wrapper.show_h_scroll
|
180
|
+
# _scrollcommand = proc{|*args| @htree.yview(*args)}
|
181
|
+
# _scrollbar = TkScrollbar.new(self.frame.hinner_frame, Arcadia.style('scrollbar')){|s|
|
182
|
+
# width 8
|
183
|
+
# command _scrollcommand
|
184
|
+
# }.pack('side'=>'right', 'fill'=>'y')
|
185
|
+
# @htree.yscrollcommand proc{|first,last| _scrollbar.set(first,last)}
|
181
186
|
|
182
187
|
self.build_tree
|
183
188
|
end
|
184
189
|
|
185
190
|
def on_after_build(_event)
|
186
191
|
Arcadia.attach_listener(self, OpenBufferEvent)
|
192
|
+
self.frame.show
|
187
193
|
#Arcadia.attach_listener(self, CloseBufferEvent)
|
188
194
|
end
|
189
195
|
|
@@ -201,12 +207,12 @@ class FilesHistrory < ArcadiaExt
|
|
201
207
|
end
|
202
208
|
end
|
203
209
|
|
204
|
-
def on_after_close_buffer(_event)
|
205
|
-
if _event.file
|
206
|
-
self.add2history(_event.file)
|
207
|
-
add_to_tree(_event.file)
|
208
|
-
end
|
209
|
-
end
|
210
|
+
# def on_after_close_buffer(_event)
|
211
|
+
# if _event.file
|
212
|
+
# self.add2history(_event.file)
|
213
|
+
# add_to_tree(_event.file)
|
214
|
+
# end
|
215
|
+
# end
|
210
216
|
|
211
217
|
def select_file_without_event(_file)
|
212
218
|
_d, _f = File.split(File.expand_path(_file))
|
File without changes
|
data/ext/ae-output/ae-output.rb
CHANGED
@@ -1,200 +1,262 @@
|
|
1
|
-
#
|
2
|
-
# ae-output.rb - Arcadia Ruby ide
|
3
|
-
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
#
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
@text.tag_configure('simple_msg',
|
35
|
-
|
36
|
-
'borderwidth'=>1,
|
37
|
-
'relief'=> 'flat'
|
38
|
-
)
|
39
|
-
@text.tag_configure('debug_msg',
|
40
|
-
|
41
|
-
|
42
|
-
'borderwidth'=>1,
|
43
|
-
'relief'=> 'flat'
|
44
|
-
)
|
45
|
-
@text.tag_configure('error_msg',
|
46
|
-
|
47
|
-
'foreground' => 'red',
|
48
|
-
'borderwidth'=>1,
|
49
|
-
'relief'=> 'flat'
|
50
|
-
)
|
51
|
-
|
52
|
-
@text.tag_configure('bord_msg',
|
53
|
-
#'foreground' => '#b9b8b9'
|
54
|
-
'foreground' => '#7c9b10'
|
55
|
-
)
|
56
|
-
@text.tag_configure('sel',
|
57
|
-
'background'=>parent.conf('hightlight.sel.color.background'),
|
58
|
-
'foreground'=>parent.conf('hightlight.sel.color.foreground')
|
59
|
-
|
60
|
-
|
61
|
-
end
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
@
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
#
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
#
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
1
|
+
#
|
2
|
+
# ae-output.rb - Arcadia Ruby ide
|
3
|
+
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
4
|
+
#
|
5
|
+
# §require_dir_ref=../..
|
6
|
+
# §require_omissis=conf/arcadia.init
|
7
|
+
# §require_omissis=lib/a-commons
|
8
|
+
|
9
|
+
require "tk"
|
10
|
+
#require "base/a-utils"
|
11
|
+
|
12
|
+
class OutputView
|
13
|
+
attr_reader :text
|
14
|
+
def initialize(parent=nil)
|
15
|
+
left_frame = TkFrame.new(parent.frame.hinner_frame, Arcadia.style('panel')).place('x' => '0','y' => '0','relheight' => '1','width' => '25')
|
16
|
+
right_frame = TkFrame.new(parent.frame.hinner_frame, Arcadia.style('panel')).place('x' => '25','y' => '0','relheight' => '1','relwidth' => '1','width' => '-25')
|
17
|
+
|
18
|
+
@button_u = Tk::BWidget::Button.new(left_frame, Arcadia.style('toolbarbutton')){
|
19
|
+
image TkPhotoImage.new('dat' => CLEAR_GIF)
|
20
|
+
helptext 'Clear'
|
21
|
+
#foreground 'blue'
|
22
|
+
command proc{parent.main_frame.text.delete('1.0','end')}
|
23
|
+
#relief 'groove'
|
24
|
+
pack('side' =>'top', 'anchor'=>'n',:padx=>0, :pady=>0)
|
25
|
+
}
|
26
|
+
|
27
|
+
@text = TkScrollText.new(right_frame,
|
28
|
+
{'wrap'=> 'none'}.update(Arcadia.style('edit'))
|
29
|
+
)
|
30
|
+
@text.show
|
31
|
+
@text.show_v_scroll
|
32
|
+
@text.show_h_scroll
|
33
|
+
|
34
|
+
@text.tag_configure('simple_msg',
|
35
|
+
# 'background' => '#d9d994',
|
36
|
+
'borderwidth'=>1,
|
37
|
+
'relief'=> 'flat'
|
38
|
+
)
|
39
|
+
@text.tag_configure('debug_msg',
|
40
|
+
# 'background' => '#f6c9f6',
|
41
|
+
# 'foreground' => '#000000',
|
42
|
+
'borderwidth'=>1,
|
43
|
+
'relief'=> 'flat'
|
44
|
+
)
|
45
|
+
@text.tag_configure('error_msg',
|
46
|
+
# 'background' => '#f6c9f6',
|
47
|
+
'foreground' => 'red',
|
48
|
+
'borderwidth'=>1,
|
49
|
+
'relief'=> 'flat'
|
50
|
+
)
|
51
|
+
|
52
|
+
@text.tag_configure('bord_msg',
|
53
|
+
#'foreground' => '#b9b8b9'
|
54
|
+
'foreground' => '#7c9b10'
|
55
|
+
)
|
56
|
+
@text.tag_configure('sel',
|
57
|
+
'background'=>parent.conf('hightlight.sel.color.background'),
|
58
|
+
'foreground'=>parent.conf('hightlight.sel.color.foreground')
|
59
|
+
)
|
60
|
+
pop_up_menu
|
61
|
+
end
|
62
|
+
|
63
|
+
def pop_up_menu
|
64
|
+
@pop_up = TkMenu.new(
|
65
|
+
:parent=>@text,
|
66
|
+
:tearoff=>0,
|
67
|
+
:title => 'Menu'
|
68
|
+
)
|
69
|
+
@pop_up.configure(Arcadia.style('menu'))
|
70
|
+
|
71
|
+
@pop_up.insert('end',
|
72
|
+
:command,
|
73
|
+
:state=>'disabled',
|
74
|
+
:label=>'Output',
|
75
|
+
:background=>Arcadia.conf('titlelabel.background'),
|
76
|
+
:font => "#{Arcadia.conf('menu.font')} bold",
|
77
|
+
:hidemargin => true
|
78
|
+
)
|
79
|
+
|
80
|
+
|
81
|
+
#Arcadia.instance.main_menu.update_style(@pop_up)
|
82
|
+
@pop_up.insert('end',
|
83
|
+
:command,
|
84
|
+
:label=>'Save',
|
85
|
+
:hidemargin => false,
|
86
|
+
:command=> proc{save_as}
|
87
|
+
)
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
@pop_up.insert('end',
|
92
|
+
:command,
|
93
|
+
:label=>'Set wrap',
|
94
|
+
:hidemargin => false,
|
95
|
+
:command=> proc{@text.configure('wrap'=>'word');@text.hide_h_scroll}
|
96
|
+
)
|
97
|
+
|
98
|
+
@pop_up.insert('end',
|
99
|
+
:command,
|
100
|
+
:label=>'Set no wrap',
|
101
|
+
:hidemargin => false,
|
102
|
+
:command=> proc{@text.configure('wrap'=>'none');@text.show_h_scroll}
|
103
|
+
)
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
@text.bind("Button-3",
|
109
|
+
proc{|x,y|
|
110
|
+
_x = TkWinfo.pointerx(@text)
|
111
|
+
_y = TkWinfo.pointery(@text)
|
112
|
+
@pop_up.popup(_x,_y)
|
113
|
+
},
|
114
|
+
"%x %y")
|
115
|
+
end
|
116
|
+
|
117
|
+
def save
|
118
|
+
if !@file
|
119
|
+
save_as
|
120
|
+
else
|
121
|
+
f = File.new(@file, "w")
|
122
|
+
begin
|
123
|
+
if f
|
124
|
+
f.syswrite(@text.value)
|
125
|
+
end
|
126
|
+
ensure
|
127
|
+
f.close unless f.nil?
|
128
|
+
end
|
129
|
+
#EditorContract.instance.file_saved(self,'file' =>@file)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
def save_as
|
134
|
+
@file = Tk.getSaveFile("filetypes"=>[["Ruby Files", [".rb", ".rbw"]],["All Files", [".*"]]])
|
135
|
+
@file = nil if @file == "" # cancelled
|
136
|
+
if @file
|
137
|
+
save
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
|
142
|
+
end
|
143
|
+
|
144
|
+
class Output < ArcadiaExt
|
145
|
+
attr_reader :main_frame
|
146
|
+
|
147
|
+
def on_before_build(_event)
|
148
|
+
#ArcadiaContractListener.new(self, MsgContract, :do_msg_event)
|
149
|
+
Arcadia.attach_listener(self, MsgEvent)
|
150
|
+
#_frame = @arcadia.layout.register_panel('_rome_',@name, 'Output')
|
151
|
+
@main_frame = OutputView.new(self)
|
152
|
+
@run_threads = Array.new
|
153
|
+
end
|
154
|
+
|
155
|
+
|
156
|
+
def on_after_build(_event)
|
157
|
+
self.frame.show
|
158
|
+
end
|
159
|
+
|
160
|
+
def format_time(_time)
|
161
|
+
_time.strftime("at %a %d-%b-%Y %H:%M:%S")
|
162
|
+
end
|
163
|
+
|
164
|
+
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')
|
185
|
+
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')
|
188
|
+
@main_frame.text.see(_index_end)
|
189
|
+
end
|
190
|
+
|
191
|
+
def parse_debug(_from_row=0)
|
192
|
+
_row = 0
|
193
|
+
@cursor = @main_frame.text.cget('cursor')
|
194
|
+
@j=0
|
195
|
+
file_tag=Hash.new
|
196
|
+
@main_frame.text.value.each{|l|
|
197
|
+
_row = _row+1
|
198
|
+
if _row >= _from_row
|
199
|
+
_end = 0
|
200
|
+
#m = /([\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*\.rb):(\d*)/.match(l)
|
201
|
+
re = Regexp.new('([\w\:]*[\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*):(\d*)')
|
202
|
+
m = re.match(l)
|
203
|
+
#m = /([\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*):(\d*)/.match(l)
|
204
|
+
while m
|
205
|
+
_txt = m.post_match
|
206
|
+
if m[1] && m[2]
|
207
|
+
_file = m[1]
|
208
|
+
if File.exist?(_file)
|
209
|
+
@j=@j+1
|
210
|
+
_line = m[2]
|
211
|
+
_ibegin = _row.to_s+'.'+(m.begin(1)+_end).to_s
|
212
|
+
_iend = _row.to_s+'.'+(m.end(2)+_end).to_s
|
213
|
+
file_binding(_file, _line, _ibegin, _iend)
|
214
|
+
end
|
215
|
+
_end = m.end(2) + _end
|
216
|
+
|
217
|
+
|
218
|
+
end
|
219
|
+
m = re.match(_txt)
|
220
|
+
end
|
221
|
+
end
|
222
|
+
}
|
223
|
+
end
|
224
|
+
|
225
|
+
def file_binding(_file, _line, _ibegin, _iend)
|
226
|
+
tag_name = "tag_#{@j}"
|
227
|
+
@main_frame.text.tag_configure(tag_name,
|
228
|
+
'foreground' => '#800000',
|
229
|
+
'borderwidth'=>0,
|
230
|
+
'relief'=>'flat',
|
231
|
+
'underline'=>true
|
232
|
+
)
|
233
|
+
@main_frame.text.tag_add(tag_name,_ibegin,_iend)
|
234
|
+
@main_frame.text.tag_bind(tag_name,"Double-ButtonPress-1",
|
235
|
+
proc{
|
236
|
+
Arcadia.process_event(OpenBufferEvent.new(self,'file'=>_file, 'row'=>_line))
|
237
|
+
}
|
238
|
+
)
|
239
|
+
@main_frame.text.tag_bind(tag_name,"Enter",
|
240
|
+
proc{@main_frame.text.configure('cursor'=> 'hand2')}
|
241
|
+
)
|
242
|
+
@main_frame.text.tag_bind(tag_name,"Leave",
|
243
|
+
proc{@main_frame.text.configure('cursor'=> @cursor)}
|
244
|
+
)
|
245
|
+
|
246
|
+
end
|
247
|
+
|
248
|
+
def out(_txt=nil, _tag=nil)
|
249
|
+
if @main_frame && _txt
|
250
|
+
if _tag
|
251
|
+
@main_frame.text.insert('end',_txt, _tag)
|
252
|
+
else
|
253
|
+
@main_frame.text.insert('end',_txt)
|
254
|
+
end
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
def outln(_txt=nil, _tag=nil)
|
259
|
+
self.out(_txt+"\n",_tag)
|
260
|
+
end
|
261
|
+
|
262
|
+
end
|