arcadia 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +69 -77
- data/arcadia.rb +1097 -770
- data/base/a-commons.rb +480 -0
- data/base/a-contracts.rb +207 -322
- data/base/{a-utils.rb → a-tkcommons.rb} +933 -993
- data/conf/arcadia.conf +130 -203
- data/conf/arcadia.res.rb +1332 -1325
- data/ext/ae-action-dispatcher/ae-action-dispatcher.conf +6 -0
- data/ext/ae-action-dispatcher/ae-action-dispatcher.rb +22 -0
- data/ext/ae-complete-code/ae-complete-code.conf +2 -2
- data/ext/ae-complete-code/ae-complete-code.rb +82 -80
- data/ext/ae-doc-code/ae-doc-code.conf +2 -2
- data/ext/ae-doc-code/ae-doc-code.rb +114 -111
- data/ext/ae-editor/ae-editor.conf +110 -105
- data/ext/ae-editor/ae-editor.rb +2501 -2287
- data/ext/ae-editor/langs/conf.lang +15 -0
- data/ext/ae-editor/langs/lang.lang.bind +1 -0
- data/ext/ae-editor/langs/rb.lang +67 -0
- data/ext/ae-editor/langs/rbw.lang.bind +1 -0
- data/ext/ae-event-log/ae-event-log.rb +45 -52
- data/ext/ae-file-history/ae-file-history.conf +4 -4
- data/ext/ae-file-history/ae-file-history.rb +298 -286
- data/ext/ae-flag/ae-flag.conf +6 -6
- data/ext/ae-flag/ae-flag.rb +12 -12
- data/ext/ae-inspector/ae-inspector.conf +3 -3
- data/ext/ae-inspector/ae-inspector.rb +2 -2
- data/ext/ae-output-event/ae-output-event.conf +15 -15
- data/ext/ae-output/ae-output.conf +5 -3
- data/ext/ae-output/ae-output.rb +62 -33
- data/ext/ae-palette/ae-palette.conf +3 -3
- data/ext/ae-palette/ae-palette.rb +265 -306
- data/ext/ae-rad/ae-rad-inspector.rb +1534 -0
- data/{base/a-libs.rb → ext/ae-rad/ae-rad-libs.rb} +1118 -846
- data/ext/ae-rad/ae-rad-palette.rb +273 -0
- data/ext/ae-rad/ae-rad.conf +71 -0
- data/ext/ae-rad/ae-rad.rb +56 -0
- data/{lib → ext/ae-rad/lib}/tk/al-tk.rb +21 -110
- data/{lib → ext/ae-rad/lib}/tk/al-tk.res.rb +0 -0
- data/{lib → ext/ae-rad/lib}/tk/al-tkarcadia.rb +26 -26
- data/{lib → ext/ae-rad/lib}/tk/al-tkcustom.rb +70 -70
- data/{lib → ext/ae-rad/lib}/tkext/al-bwidget.rb +194 -194
- data/{lib → ext/ae-rad/lib}/tkext/al-iwidgets.rb +25 -25
- data/{lib → ext/ae-rad/lib}/tkext/al-tile.rb +173 -173
- data/{lib → ext/ae-rad/lib}/tkext/al-tktable.rb +0 -0
- data/ext/ae-ruby-debug/ae-ruby-debug.conf +7 -4
- data/ext/ae-ruby-debug/ae-ruby-debug.rb +278 -142
- data/ext/ae-search-in-files/ae-search-in-files.conf +15 -0
- data/ext/ae-search-in-files/ae-search-in-files.rb +284 -0
- data/ext/ae-shell/ae-shell.rb +88 -8
- data/ext/ae-shell/sh.rb +7 -0
- metadata +93 -79
- data/base/a-contracts-work.rb +0 -219
- data/base/a-ext.rb +0 -280
- data/ext/ae-debug/ae-debug.conf +0 -7
- data/ext/ae-debug/ae-debug.rb +0 -601
- data/ext/ae-debug/debug1.57.rb +0 -998
data/base/a-contracts.rb
CHANGED
@@ -1,322 +1,207 @@
|
|
1
|
-
#
|
2
|
-
# a-contracts.rb - Arcadia Ruby ide
|
3
|
-
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
4
|
-
#
|
5
|
-
|
6
|
-
# Catalog of
|
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
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
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
|
-
end
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
class
|
180
|
-
|
181
|
-
end
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
def run(_sender, *args)
|
209
|
-
end
|
210
|
-
|
211
|
-
def debug(_sender, *args)
|
212
|
-
end
|
213
|
-
end
|
214
|
-
|
215
|
-
|
216
|
-
class DebugContract < ArcadiaContract
|
217
|
-
SObj = Struct.new("DebugState"
|
218
|
-
)
|
219
|
-
class TDebugObj < TObj
|
220
|
-
attr_accessor :file, :line, :error_text, :error_class,:callers, :variables
|
221
|
-
end
|
222
|
-
|
223
|
-
DEBUG_BEGIN="DEBUG_BEGIN"
|
224
|
-
DEBUG_END="DEBUG_END"
|
225
|
-
DEBUG_STEP="DEBUG_STEP"
|
226
|
-
|
227
|
-
def debug_begin(_sender, *args)
|
228
|
-
raise_event(DEBUG_BEGIN, TDebugObj.new(_sender, *args))
|
229
|
-
end
|
230
|
-
def debug_end(_sender, *args)
|
231
|
-
raise_event(DEBUG_END, TDebugObj.new(_sender, *args))
|
232
|
-
end
|
233
|
-
def debug_step(_sender, *args)
|
234
|
-
raise_event(DEBUG_STEP, TDebugObj.new(_sender, *args))
|
235
|
-
end
|
236
|
-
end
|
237
|
-
|
238
|
-
class InspectorContract < ArcadiaContract
|
239
|
-
SObj = Struct.new("InspectorActionState"
|
240
|
-
)
|
241
|
-
class TInspectorObj < TObj
|
242
|
-
attr_accessor :wrapper, :requires, :property_family,:property_name,:property_value
|
243
|
-
end
|
244
|
-
|
245
|
-
SELECT_WRAPPER = "SELECT_WRAPPER"
|
246
|
-
#ACTIVATE_WRAPPER = "ACTIVATE_WRAPPER"
|
247
|
-
DELETE_WRAPPER = "DELETE_WRAPPER"
|
248
|
-
ADD_REQUIRE = "ADD_REQUIRE"
|
249
|
-
REGISTER_WRAPPER = "REGISTER_WRAPPER"
|
250
|
-
# UPDATE_PROPERTY = "UPDATE_PROPERTY"
|
251
|
-
DELETE_INSPECTOR = "DELETE_INSPECTOR"
|
252
|
-
RAISE_LAST_WIDGET = "RAISE_LAST_WIDGET"
|
253
|
-
RAISE_ACTIVE_TOPLEVEL = "RAISE_ACTIVE_TOPLEVEL"
|
254
|
-
|
255
|
-
def delete_wrapper(_sender, *args)
|
256
|
-
raise_action(DELETE_WRAPPER, TInspectorObj.new(_sender, *args))
|
257
|
-
end
|
258
|
-
|
259
|
-
def raise_last_widget(_sender, *args)
|
260
|
-
raise_action(RAISE_LAST_WIDGET, TInspectorObj.new(_sender, *args))
|
261
|
-
end
|
262
|
-
|
263
|
-
def raise_active_toplevel(_sender, *args)
|
264
|
-
raise_action(RAISE_ACTIVE_TOPLEVEL, TInspectorObj.new(_sender, *args))
|
265
|
-
end
|
266
|
-
|
267
|
-
def select(_sender, *args)
|
268
|
-
raise_action(SELECT_WRAPPER, TInspectorObj.new(_sender, *args))
|
269
|
-
end
|
270
|
-
|
271
|
-
def add_require(_sender, *args)
|
272
|
-
raise_action(ADD_REQUIRE, TInspectorObj.new(_sender, *args))
|
273
|
-
end
|
274
|
-
|
275
|
-
def register(_sender, *args)
|
276
|
-
raise_action(REGISTER_WRAPPER, TInspectorObj.new(_sender, *args))
|
277
|
-
end
|
278
|
-
|
279
|
-
def delete_inspector(_sender, *args)
|
280
|
-
raise_action(DELETE_INSPECTOR, TInspectorObj.new(_sender, *args))
|
281
|
-
end
|
282
|
-
|
283
|
-
publish_action :raise_active_object
|
284
|
-
end
|
285
|
-
|
286
|
-
class PublishContract < ArcadiaContract
|
287
|
-
ADD_COMAND_ACTOR = "ADD_COMAND_ACTOR"
|
288
|
-
def add_command_actor(_sender, *args)
|
289
|
-
raise_action(ADD_COMAND_ACTOR, TObj.new(_sender, *args))
|
290
|
-
end
|
291
|
-
end
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
class WrapperContract < ArcadiaContract
|
296
|
-
class TWrapperObj < TObj
|
297
|
-
attr_accessor :wrapper, :property_name, :property_family, :property_old_value, :property_new_value
|
298
|
-
end
|
299
|
-
WRAPPER_AFTER_CREATE="WRAPPER_AFTER_CREATE"
|
300
|
-
PROPERTY_AFTER_UPDATE="PROPERTY_AFTER_UPDATE"
|
301
|
-
UPDATE_PROPERTY="UPDATE_PROPERTY"
|
302
|
-
def update_property(_sender, *args)
|
303
|
-
raise_action(UPDATE_PROPERTY, TWrapperObj.new(_sender, *args))
|
304
|
-
end
|
305
|
-
def property_updated(_sender, *args)
|
306
|
-
raise_event(PROPERTY_AFTER_UPDATE, TWrapperObj.new(_sender, *args))
|
307
|
-
end
|
308
|
-
def wrapper_created(_sender, *args)
|
309
|
-
raise_event(WRAPPER_AFTER_CREATE, TWrapperObj.new(_sender, *args))
|
310
|
-
end
|
311
|
-
end
|
312
|
-
|
313
|
-
class PaletteContract < ArcadiaContract
|
314
|
-
class TPaletteObj < TObj
|
315
|
-
attr_accessor :parent, :x, :y
|
316
|
-
end
|
317
|
-
MAKE_SELECTED_WRAPPER = "MAKE_SELECTED_WRAPPER"
|
318
|
-
def make_selected(_sender, *args)
|
319
|
-
raise_action(MAKE_SELECTED_WRAPPER, TPaletteObj.new(_sender, *args))
|
320
|
-
end
|
321
|
-
end
|
322
|
-
|
1
|
+
#
|
2
|
+
# a-contracts.rb - Arcadia Ruby ide
|
3
|
+
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
4
|
+
#
|
5
|
+
|
6
|
+
# Catalog of events used by arcadia obj.
|
7
|
+
# Obj must comunicate through raise/catch event
|
8
|
+
# in order to guarantees decoupling
|
9
|
+
|
10
|
+
# +------------------------------------------+
|
11
|
+
# Arcadia Event
|
12
|
+
# +------------------------------------------+
|
13
|
+
|
14
|
+
class ArcadiaEvent < Event
|
15
|
+
end
|
16
|
+
|
17
|
+
class QuitEvent < ArcadiaEvent
|
18
|
+
end
|
19
|
+
|
20
|
+
# +------------------------------------------+
|
21
|
+
# Extention Event (raised only by Arcadia)
|
22
|
+
# do not raise!
|
23
|
+
# +------------------------------------------+
|
24
|
+
|
25
|
+
class BuildEvent < ArcadiaEvent
|
26
|
+
attr_accessor :name
|
27
|
+
end
|
28
|
+
|
29
|
+
class ExitQueryEvent < ArcadiaEvent
|
30
|
+
attr_accessor :can_exit
|
31
|
+
end
|
32
|
+
|
33
|
+
class FinalizeEvent < ArcadiaEvent
|
34
|
+
end
|
35
|
+
|
36
|
+
# +---------------------------------------------+
|
37
|
+
# Buffer event
|
38
|
+
# +---------------------------------------------+
|
39
|
+
|
40
|
+
class BufferEvent < ArcadiaEvent # Abstract
|
41
|
+
attr_accessor :file, :title, :text, :row, :col
|
42
|
+
# if file==nil && title==nil buffer=current buffer
|
43
|
+
end
|
44
|
+
|
45
|
+
class NewBufferEvent < BufferEvent
|
46
|
+
end
|
47
|
+
|
48
|
+
class OpenBufferEvent < BufferEvent
|
49
|
+
end
|
50
|
+
|
51
|
+
class CloseBufferEvent < BufferEvent
|
52
|
+
end
|
53
|
+
|
54
|
+
class SaveBufferEvent < BufferEvent
|
55
|
+
end
|
56
|
+
|
57
|
+
class SaveAsBufferEvent < SaveBufferEvent
|
58
|
+
attr_accessor :new_file
|
59
|
+
end
|
60
|
+
|
61
|
+
class GoToLineBufferEvent < BufferEvent
|
62
|
+
attr_accessor :line
|
63
|
+
end
|
64
|
+
|
65
|
+
class SearchBufferEvent < BufferEvent
|
66
|
+
class Result < Result
|
67
|
+
attr_accessor :row, :col
|
68
|
+
end
|
69
|
+
attr_accessor :what
|
70
|
+
end
|
71
|
+
|
72
|
+
class CompleteCodeEvent < BufferEvent
|
73
|
+
class Result < Result
|
74
|
+
attr_accessor :candidates
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
class DocCodeEvent < BufferEvent
|
79
|
+
class Result < Result
|
80
|
+
attr_accessor :doc, :title
|
81
|
+
end
|
82
|
+
attr_accessor :xdoc, :ydoc, :doc_entry
|
83
|
+
end
|
84
|
+
|
85
|
+
class BufferRaisedEvent < BufferEvent
|
86
|
+
end
|
87
|
+
|
88
|
+
# +---------------------------------------------+
|
89
|
+
# Debug event
|
90
|
+
# +---------------------------------------------+
|
91
|
+
|
92
|
+
class DebugEvent < ArcadiaEvent
|
93
|
+
attr_accessor :file, :row
|
94
|
+
end
|
95
|
+
|
96
|
+
class SetBreakpointEvent < DebugEvent
|
97
|
+
end
|
98
|
+
|
99
|
+
class UnsetBreakpointEvent < DebugEvent
|
100
|
+
end
|
101
|
+
|
102
|
+
class EvalExpressionEvent < DebugEvent
|
103
|
+
attr_accessor :expression
|
104
|
+
end
|
105
|
+
|
106
|
+
class StartDebugEvent < DebugEvent
|
107
|
+
end
|
108
|
+
|
109
|
+
class StopDebugEvent < DebugEvent
|
110
|
+
end
|
111
|
+
|
112
|
+
class StepDebugEvent < DebugEvent
|
113
|
+
class Result < Result
|
114
|
+
attr_accessor :file, :row
|
115
|
+
end
|
116
|
+
# step_over, step_into, step_out, resume, where, quit
|
117
|
+
attr_accessor :command
|
118
|
+
end
|
119
|
+
|
120
|
+
class DebugStepInfoEvent < DebugEvent
|
121
|
+
attr_accessor :file, :row
|
122
|
+
end
|
123
|
+
|
124
|
+
# +---------------------------------------------+
|
125
|
+
# Message event (raised only by Arcadia)
|
126
|
+
# to raise use:
|
127
|
+
# Arcadia.new_msg
|
128
|
+
# Arcadia.new_debug_msg
|
129
|
+
# Arcadia.new_error_msg
|
130
|
+
# +---------------------------------------------+
|
131
|
+
|
132
|
+
class MsgEvent < ArcadiaEvent
|
133
|
+
attr_accessor :msg
|
134
|
+
end
|
135
|
+
|
136
|
+
class DebugMsgEvent < MsgEvent
|
137
|
+
end
|
138
|
+
|
139
|
+
class ErrorMsgEvent < MsgEvent
|
140
|
+
end
|
141
|
+
|
142
|
+
# +---------------------------------------------+
|
143
|
+
# Other event
|
144
|
+
# +---------------------------------------------+
|
145
|
+
|
146
|
+
class SearchInFilesEvent < ArcadiaEvent
|
147
|
+
class Result < SearchBufferEvent::Result
|
148
|
+
attr_accessor :file
|
149
|
+
end
|
150
|
+
attr_accessor :what, :files_filter, :dir
|
151
|
+
end
|
152
|
+
|
153
|
+
class SystemExecEvent < ArcadiaEvent
|
154
|
+
class Result < Result
|
155
|
+
attr_accessor :std_output, :std_error
|
156
|
+
end
|
157
|
+
attr_accessor :command
|
158
|
+
end
|
159
|
+
|
160
|
+
class RunRubyFileEvent < ArcadiaEvent
|
161
|
+
class Result < Result
|
162
|
+
attr_accessor :output
|
163
|
+
end
|
164
|
+
attr_accessor :file
|
165
|
+
end
|
166
|
+
|
167
|
+
# +---------------------------------------------+
|
168
|
+
# Dialog event (raised only by Arcadia)
|
169
|
+
# to raise use:
|
170
|
+
# Arcadia.ok
|
171
|
+
# Arcadia.ok_cancel
|
172
|
+
# Arcadia.yes_no_cancel
|
173
|
+
# Arcadia.abort_retry_ignore
|
174
|
+
# +---------------------------------------------+
|
175
|
+
|
176
|
+
# default actions_pattern = 'OK'
|
177
|
+
class DialogEvent < ArcadiaEvent
|
178
|
+
TYPE_PATTERNS = ['ok', 'yes_no', 'ok_cancel', 'yes_no_cancel', 'abort_retry_ignore']
|
179
|
+
class Result < Result
|
180
|
+
attr_accessor :value
|
181
|
+
end
|
182
|
+
attr_accessor :title, :msg, :type
|
183
|
+
end
|
184
|
+
|
185
|
+
class QuestionDialogEvent < DialogEvent
|
186
|
+
end
|
187
|
+
|
188
|
+
class InfoDialogEvent < DialogEvent
|
189
|
+
end
|
190
|
+
|
191
|
+
class WarningDialogEvent < DialogEvent
|
192
|
+
end
|
193
|
+
|
194
|
+
class ErrorDialogEvent < DialogEvent
|
195
|
+
end
|
196
|
+
|
197
|
+
|
198
|
+
# +---------------------------------------------+
|
199
|
+
# Action event
|
200
|
+
# +---------------------------------------------+
|
201
|
+
|
202
|
+
class ActionEvent < ArcadiaEvent
|
203
|
+
attr_accessor :receiver
|
204
|
+
attr_accessor :action
|
205
|
+
attr_accessor :action_args
|
206
|
+
end
|
207
|
+
|