arcadia 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +126 -123
- data/arcadia.rb +770 -756
- data/base/a-contracts.rb +130 -93
- data/base/a-ext.rb +280 -280
- data/base/a-libs.rb +5 -11
- data/base/a-utils.rb +235 -44
- data/conf/arcadia.conf +20 -16
- data/conf/arcadia.init.rb +0 -0
- data/conf/arcadia.res.rb +74 -0
- data/ext/ae-complete-code/ae-complete-code.conf +0 -0
- data/ext/ae-complete-code/ae-complete-code.rb +80 -79
- data/ext/ae-debug/ae-debug.conf +0 -0
- data/ext/ae-debug/ae-debug.rb +2 -6
- data/ext/ae-debug/debug1.57.rb +0 -0
- data/ext/ae-doc-code/ae-doc-code.conf +15 -0
- data/ext/ae-doc-code/ae-doc-code.rb +289 -0
- data/ext/ae-editor/ae-editor.conf +17 -8
- data/ext/ae-editor/ae-editor.rb +738 -396
- data/ext/ae-event-log/ae-event-log.conf +0 -0
- data/ext/ae-event-log/ae-event-log.rb +0 -0
- data/ext/ae-file-history/ae-file-history.conf +2 -2
- data/ext/ae-file-history/ae-file-history.rb +286 -290
- data/ext/ae-inspector/ae-inspector.conf +0 -0
- data/ext/ae-inspector/ae-inspector.rb +0 -0
- data/ext/ae-output-event/ae-output-event.conf +2 -2
- data/ext/ae-output/ae-output.conf +2 -2
- data/ext/ae-output/ae-output.rb +173 -178
- data/ext/ae-palette/ae-palette.conf +0 -0
- data/ext/ae-palette/ae-palette.rb +0 -0
- data/ext/ae-shell/ae-shell.conf +0 -0
- data/ext/ae-shell/ae-shell.rb +54 -54
- data/lib/tk/al-tk.rb +3076 -3082
- data/lib/tk/al-tk.res.rb +0 -0
- data/lib/tk/al-tkarcadia.rb +0 -0
- data/lib/tk/al-tkcustom.rb +0 -0
- data/lib/tkext/al-bwidget.rb +0 -0
- data/lib/tkext/al-iwidgets.rb +0 -0
- data/lib/tkext/al-tile.rb +0 -0
- data/lib/tkext/al-tktable.rb +0 -0
- data/tcl/BWidget-1.8.0/BWman/ArrowButton.html +276 -0
- data/tcl/BWidget-1.8.0/BWman/BWidget.html +228 -0
- data/tcl/BWidget-1.8.0/BWman/Button.html +273 -0
- data/tcl/BWidget-1.8.0/BWman/ButtonBox.html +264 -0
- data/tcl/BWidget-1.8.0/BWman/ComboBox.html +402 -0
- data/tcl/BWidget-1.8.0/BWman/Dialog.html +314 -0
- data/tcl/BWidget-1.8.0/BWman/DragSite.html +139 -0
- data/tcl/BWidget-1.8.0/BWman/DropSite.html +254 -0
- data/tcl/BWidget-1.8.0/BWman/DynamicHelp.html +248 -0
- data/tcl/BWidget-1.8.0/BWman/Entry.html +341 -0
- data/tcl/BWidget-1.8.0/BWman/Label.html +331 -0
- data/tcl/BWidget-1.8.0/BWman/LabelEntry.html +194 -0
- data/tcl/BWidget-1.8.0/BWman/LabelFrame.html +144 -0
- data/tcl/BWidget-1.8.0/BWman/ListBox.html +678 -0
- data/tcl/BWidget-1.8.0/BWman/MainFrame.html +283 -0
- data/tcl/BWidget-1.8.0/BWman/MessageDlg.html +218 -0
- data/tcl/BWidget-1.8.0/BWman/NoteBook.html +374 -0
- data/tcl/BWidget-1.8.0/BWman/PagesManager.html +180 -0
- data/tcl/BWidget-1.8.0/BWman/PanedWindow.html +142 -0
- data/tcl/BWidget-1.8.0/BWman/PanelFrame.html +153 -0
- data/tcl/BWidget-1.8.0/BWman/PasswdDlg.html +214 -0
- data/tcl/BWidget-1.8.0/BWman/ProgressBar.html +152 -0
- data/tcl/BWidget-1.8.0/BWman/ProgressDlg.html +145 -0
- data/tcl/BWidget-1.8.0/BWman/ScrollView.html +130 -0
- data/tcl/BWidget-1.8.0/BWman/ScrollableFrame.html +191 -0
- data/tcl/BWidget-1.8.0/BWman/ScrolledWindow.html +116 -0
- data/tcl/BWidget-1.8.0/BWman/SelectColor.html +164 -0
- data/tcl/BWidget-1.8.0/BWman/SelectFont.html +152 -0
- data/tcl/BWidget-1.8.0/BWman/Separator.html +77 -0
- data/tcl/BWidget-1.8.0/BWman/SpinBox.html +250 -0
- data/tcl/BWidget-1.8.0/BWman/StatusBar.html +147 -0
- data/tcl/BWidget-1.8.0/BWman/TitleFrame.html +107 -0
- data/tcl/BWidget-1.8.0/BWman/Tree.html +947 -0
- data/tcl/BWidget-1.8.0/BWman/Widget.html +502 -0
- data/tcl/BWidget-1.8.0/BWman/contents.html +84 -0
- data/tcl/BWidget-1.8.0/BWman/index.html +7 -0
- data/tcl/BWidget-1.8.0/BWman/navtree.html +41 -0
- data/tcl/BWidget-1.8.0/BWman/options.htm +458 -0
- data/tcl/BWidget-1.8.0/CHANGES.txt +266 -0
- data/tcl/BWidget-1.8.0/ChangeLog +1641 -0
- data/tcl/BWidget-1.8.0/LICENSE.txt +41 -0
- data/tcl/BWidget-1.8.0/README.txt +127 -0
- data/tcl/BWidget-1.8.0/arrow.tcl +551 -0
- data/tcl/BWidget-1.8.0/bitmap.tcl +94 -0
- data/tcl/BWidget-1.8.0/button.tcl +324 -0
- data/tcl/BWidget-1.8.0/buttonbox.tcl +403 -0
- data/tcl/BWidget-1.8.0/color.tcl +493 -0
- data/tcl/BWidget-1.8.0/combobox.tcl +809 -0
- data/tcl/BWidget-1.8.0/demo/basic.tcl +199 -0
- data/tcl/BWidget-1.8.0/demo/bwidget.xbm +46 -0
- data/tcl/BWidget-1.8.0/demo/demo.tcl +212 -0
- data/tcl/BWidget-1.8.0/demo/dnd.tcl +42 -0
- data/tcl/BWidget-1.8.0/demo/manager.tcl +141 -0
- data/tcl/BWidget-1.8.0/demo/select.tcl +59 -0
- data/tcl/BWidget-1.8.0/demo/tmpldlg.tcl +214 -0
- data/tcl/BWidget-1.8.0/demo/tree.tcl +260 -0
- data/tcl/BWidget-1.8.0/demo/x1.xbm +2258 -0
- data/tcl/BWidget-1.8.0/dialog.tcl +345 -0
- data/tcl/BWidget-1.8.0/dragsite.tcl +197 -0
- data/tcl/BWidget-1.8.0/dropsite.tcl +455 -0
- data/tcl/BWidget-1.8.0/dynhelp.tcl +625 -0
- data/tcl/BWidget-1.8.0/entry.tcl +469 -0
- data/tcl/BWidget-1.8.0/font.tcl +566 -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 +5 -0
- data/tcl/BWidget-1.8.0/images/new.gif +0 -0
- data/tcl/BWidget-1.8.0/images/opcopy.xbm +5 -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 +5 -0
- data/tcl/BWidget-1.8.0/images/opmove.xbm +5 -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 +5 -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 +9 -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 +40 -0
- data/tcl/BWidget-1.8.0/label.tcl +271 -0
- data/tcl/BWidget-1.8.0/labelentry.tcl +100 -0
- data/tcl/BWidget-1.8.0/labelframe.tcl +160 -0
- data/tcl/BWidget-1.8.0/lang/da.rc +52 -0
- data/tcl/BWidget-1.8.0/lang/de.rc +52 -0
- data/tcl/BWidget-1.8.0/lang/en.rc +52 -0
- data/tcl/BWidget-1.8.0/lang/es.rc +53 -0
- data/tcl/BWidget-1.8.0/lang/fr.rc +52 -0
- data/tcl/BWidget-1.8.0/listbox.tcl +1638 -0
- data/tcl/BWidget-1.8.0/mainframe.tcl +711 -0
- data/tcl/BWidget-1.8.0/messagedlg.tcl +128 -0
- data/tcl/BWidget-1.8.0/notebook.tcl +1164 -0
- data/tcl/BWidget-1.8.0/pagesmgr.tcl +294 -0
- data/tcl/BWidget-1.8.0/panedw.tcl +381 -0
- data/tcl/BWidget-1.8.0/panelframe.tcl +246 -0
- data/tcl/BWidget-1.8.0/passwddlg.tcl +178 -0
- data/tcl/BWidget-1.8.0/pkgIndex.tcl +47 -0
- data/tcl/BWidget-1.8.0/progressbar.tcl +208 -0
- data/tcl/BWidget-1.8.0/progressdlg.tcl +87 -0
- data/tcl/BWidget-1.8.0/scrollframe.tcl +226 -0
- data/tcl/BWidget-1.8.0/scrollview.tcl +254 -0
- data/tcl/BWidget-1.8.0/scrollw.tcl +280 -0
- data/tcl/BWidget-1.8.0/separator.tcl +75 -0
- data/tcl/BWidget-1.8.0/spinbox.tcl +331 -0
- data/tcl/BWidget-1.8.0/statusbar.tcl +422 -0
- data/tcl/BWidget-1.8.0/tests/entry.test +173 -0
- data/tcl/BWidget-1.8.0/titleframe.tcl +170 -0
- data/tcl/BWidget-1.8.0/tree.tcl +2228 -0
- data/tcl/BWidget-1.8.0/utils.tcl +645 -0
- data/tcl/BWidget-1.8.0/widget.tcl +1576 -0
- data/tcl/BWidget-1.8.0/wizard.tcl +1028 -0
- data/tcl/BWidget-1.8.0/xpm2image.tcl +115 -0
- metadata +141 -5
File without changes
|
File without changes
|
@@ -6,8 +6,8 @@ require=ext/ae-output/ae-output
|
|
6
6
|
class=Output
|
7
7
|
MsgContract.channel=0
|
8
8
|
|
9
|
-
font=courier
|
10
|
-
font.bold=courier
|
9
|
+
font=courier 10
|
10
|
+
font.bold=courier 10 bold
|
11
11
|
i386-freebsd6::font=courier 12
|
12
12
|
i386-freebsd6::font.bold=courier 12 bold
|
13
13
|
i386-mswin32::font={Courier New} 9
|
data/ext/ae-output/ae-output.rb
CHANGED
@@ -1,178 +1,173 @@
|
|
1
|
-
#
|
2
|
-
# ae-output.rb - Arcadia Ruby ide
|
3
|
-
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
4
|
-
#
|
5
|
-
|
6
|
-
require "tk"
|
7
|
-
require "base/a-utils"
|
8
|
-
|
9
|
-
class OutputView
|
10
|
-
attr_reader :text
|
11
|
-
def initialize(parent=nil)
|
12
|
-
|
13
|
-
left_frame = TkFrame.new(parent.frame).place('x' => '0','y' => '0','relheight' => '1','width' => '25')
|
14
|
-
|
15
|
-
@button_u = Tk::BWidget::Button.new(left_frame){
|
16
|
-
image TkPhotoImage.new('dat' => CLEAR_GIF)
|
17
|
-
helptext 'Clear'
|
18
|
-
foreground 'blue'
|
19
|
-
command proc{parent.main_frame.text.delete('1.0','end')}
|
20
|
-
relief 'groove'
|
21
|
-
pack('side' =>'top', 'anchor'=>'n',:padx=>0, :pady=>0)
|
22
|
-
}
|
23
|
-
|
24
|
-
|
25
|
-
#@splitted_frame = AGTkVSplittedFrames.new(parent.frame,20)
|
26
|
-
@text = TkText.new(parent.frame,
|
27
|
-
'wrap'=> 'none',
|
28
|
-
'relief' => 'sunken',
|
29
|
-
'font' => parent.conf('font')
|
30
|
-
){|j|
|
31
|
-
TkScrollbar.new(j){|s|
|
32
|
-
command proc{|*args| j.yview(*args)}
|
33
|
-
j.yscrollcommand proc{|first,last| s.set first,last}
|
34
|
-
}.pack('side'=>'right', 'fill'=>'y')
|
35
|
-
}.place('relwidth' => '1','x' => '25','y' => '0','relheight' => '1', 'width' => '-25')
|
36
|
-
@text.tag_configure('simple_msg',
|
37
|
-
'background' => '#d9d994',
|
38
|
-
'borderwidth'=>1,
|
39
|
-
'relief'=> 'flat'
|
40
|
-
)
|
41
|
-
@text.tag_configure('debug_msg',
|
42
|
-
'background' => '#f6c9f6',
|
43
|
-
'foreground' => '#000000',
|
44
|
-
'borderwidth'=>1,
|
45
|
-
'relief'=> 'flat'
|
46
|
-
)
|
47
|
-
@text.tag_configure('error_msg',
|
48
|
-
'background' => '#f6c9f6',
|
49
|
-
'foreground' => 'red',
|
50
|
-
'borderwidth'=>1,
|
51
|
-
'relief'=> 'flat'
|
52
|
-
)
|
53
|
-
|
54
|
-
@text.tag_configure('bord_msg',
|
55
|
-
#'foreground' => '#b9b8b9'
|
56
|
-
'foreground' => '#7c9b10'
|
57
|
-
)
|
58
|
-
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
class Output < ArcadiaExt
|
63
|
-
attr_reader :main_frame
|
64
|
-
|
65
|
-
def before_build
|
66
|
-
ArcadiaContractListener.new(self, MsgContract, :do_msg_event)
|
67
|
-
#_frame = @arcadia.layout.register_panel('_rome_',@name, 'Output')
|
68
|
-
@main_frame = OutputView.new(self)
|
69
|
-
@run_threads = Array.new
|
70
|
-
@main_frame.text.tag_configure('error','foreground' => 'red')
|
71
|
-
end
|
72
|
-
|
73
|
-
|
74
|
-
def build
|
75
|
-
#@ae_file_contract = @arcadia.retrieve_contract(self, EditorActionContract, :file_state)
|
76
|
-
end
|
77
|
-
|
78
|
-
def after_build
|
79
|
-
MainContract.instance.raise_extension(
|
80
|
-
'domain'=>@arcadia['conf'][@name+'.frame'],
|
81
|
-
'extension' =>@name,
|
82
|
-
'channel'=>conf('MsgContract.channel')
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
@main_frame.text.
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
@main_frame.text.
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
@main_frame.text.
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
@main_frame.text.
|
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
|
-
def outln(_txt=nil, _tag=nil)
|
175
|
-
self.out(_txt+"\n",_tag)
|
176
|
-
end
|
177
|
-
|
178
|
-
end
|
1
|
+
#
|
2
|
+
# ae-output.rb - Arcadia Ruby ide
|
3
|
+
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
4
|
+
#
|
5
|
+
|
6
|
+
require "tk"
|
7
|
+
require "base/a-utils"
|
8
|
+
|
9
|
+
class OutputView
|
10
|
+
attr_reader :text
|
11
|
+
def initialize(parent=nil)
|
12
|
+
|
13
|
+
left_frame = TkFrame.new(parent.frame).place('x' => '0','y' => '0','relheight' => '1','width' => '25')
|
14
|
+
|
15
|
+
@button_u = Tk::BWidget::Button.new(left_frame){
|
16
|
+
image TkPhotoImage.new('dat' => CLEAR_GIF)
|
17
|
+
helptext 'Clear'
|
18
|
+
foreground 'blue'
|
19
|
+
command proc{parent.main_frame.text.delete('1.0','end')}
|
20
|
+
relief 'groove'
|
21
|
+
pack('side' =>'top', 'anchor'=>'n',:padx=>0, :pady=>0)
|
22
|
+
}
|
23
|
+
|
24
|
+
|
25
|
+
#@splitted_frame = AGTkVSplittedFrames.new(parent.frame,20)
|
26
|
+
@text = TkText.new(parent.frame,
|
27
|
+
'wrap'=> 'none',
|
28
|
+
'relief' => 'sunken',
|
29
|
+
'font' => parent.conf('font')
|
30
|
+
){|j|
|
31
|
+
TkScrollbar.new(j){|s|
|
32
|
+
command proc{|*args| j.yview(*args)}
|
33
|
+
j.yscrollcommand proc{|first,last| s.set first,last}
|
34
|
+
}.pack('side'=>'right', 'fill'=>'y')
|
35
|
+
}.place('relwidth' => '1','x' => '25','y' => '0','relheight' => '1', 'width' => '-25')
|
36
|
+
@text.tag_configure('simple_msg',
|
37
|
+
'background' => '#d9d994',
|
38
|
+
'borderwidth'=>1,
|
39
|
+
'relief'=> 'flat'
|
40
|
+
)
|
41
|
+
@text.tag_configure('debug_msg',
|
42
|
+
'background' => '#f6c9f6',
|
43
|
+
'foreground' => '#000000',
|
44
|
+
'borderwidth'=>1,
|
45
|
+
'relief'=> 'flat'
|
46
|
+
)
|
47
|
+
@text.tag_configure('error_msg',
|
48
|
+
'background' => '#f6c9f6',
|
49
|
+
'foreground' => 'red',
|
50
|
+
'borderwidth'=>1,
|
51
|
+
'relief'=> 'flat'
|
52
|
+
)
|
53
|
+
|
54
|
+
@text.tag_configure('bord_msg',
|
55
|
+
#'foreground' => '#b9b8b9'
|
56
|
+
'foreground' => '#7c9b10'
|
57
|
+
)
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
class Output < ArcadiaExt
|
63
|
+
attr_reader :main_frame
|
64
|
+
|
65
|
+
def before_build
|
66
|
+
ArcadiaContractListener.new(self, MsgContract, :do_msg_event)
|
67
|
+
#_frame = @arcadia.layout.register_panel('_rome_',@name, 'Output')
|
68
|
+
@main_frame = OutputView.new(self)
|
69
|
+
@run_threads = Array.new
|
70
|
+
@main_frame.text.tag_configure('error','foreground' => 'red')
|
71
|
+
end
|
72
|
+
|
73
|
+
|
74
|
+
def build
|
75
|
+
#@ae_file_contract = @arcadia.retrieve_contract(self, EditorActionContract, :file_state)
|
76
|
+
end
|
77
|
+
|
78
|
+
def after_build
|
79
|
+
MainContract.instance.raise_extension(self,
|
80
|
+
'domain'=>@arcadia['conf'][@name+'.frame'],
|
81
|
+
'extension' =>@name,
|
82
|
+
'channel'=>conf('MsgContract.channel'))
|
83
|
+
end
|
84
|
+
|
85
|
+
def format_time(_time)
|
86
|
+
_time.strftime("at %a %d-%b-%Y %H:%M:%S")
|
87
|
+
end
|
88
|
+
|
89
|
+
def do_msg_event(_event)
|
90
|
+
#p _event.context.text.class
|
91
|
+
_txt = "\n+--- "+format_time(_event.time)+" ---+\n"+_event.context.text.strip+"\n"
|
92
|
+
_index_begin = @main_frame.text.index('end')
|
93
|
+
@main_frame.text.insert(_index_begin,_txt)
|
94
|
+
_index_end = @main_frame.text.index('end')
|
95
|
+
if _event.context.type == MsgContract::TYPE_DEBUG
|
96
|
+
@main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
|
97
|
+
@main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
|
98
|
+
@main_frame.text.tag_add('debug_msg',_index_begin, _index_end+ ' lineend')
|
99
|
+
parse_debug(_index_begin.split('.')[0].to_i)
|
100
|
+
elsif _event.context.type == MsgContract::TYPE_ERROR
|
101
|
+
@main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
|
102
|
+
@main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
|
103
|
+
@main_frame.text.tag_add('error_msg',_index_begin, _index_end+ ' lineend')
|
104
|
+
parse_debug(_index_begin.split('.')[0].to_i)
|
105
|
+
else
|
106
|
+
@main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
|
107
|
+
@main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
|
108
|
+
@main_frame.text.tag_add('simple_msg',_index_begin, _index_end+ ' lineend')
|
109
|
+
end
|
110
|
+
@main_frame.text.tag_add('bord_msg',_index_begin+' linestart', _index_begin+ ' lineend')
|
111
|
+
@main_frame.text.tag_add('bord_msg',_index_end+' -1 lines linestart', _index_end+ ' -1 lines lineend')
|
112
|
+
@main_frame.text.see(_index_end)
|
113
|
+
end
|
114
|
+
|
115
|
+
def parse_debug(_from_row=0)
|
116
|
+
_row = 0
|
117
|
+
_cursor = @main_frame.text.cget('cursor')
|
118
|
+
@main_frame.text.value.each{|l|
|
119
|
+
_row = _row+1
|
120
|
+
if _row >= _from_row
|
121
|
+
_end = 0
|
122
|
+
m = /([\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*\.rb):(\d*)/.match(l)
|
123
|
+
while m
|
124
|
+
_txt = m.post_match
|
125
|
+
if m[1] && m[2]
|
126
|
+
_file = m[1]
|
127
|
+
_line = m[2]
|
128
|
+
_ibegin = _row.to_s+'.'+(m.begin(1)+_end).to_s
|
129
|
+
_iend = _row.to_s+'.'+(m.end(2)+_end).to_s
|
130
|
+
_end = m.end(2) + _end
|
131
|
+
@main_frame.text.tag_configure(_row,
|
132
|
+
'foreground' => '#800000',
|
133
|
+
'borderwidth'=>0,
|
134
|
+
'relief'=>'flat',
|
135
|
+
'underline'=>true
|
136
|
+
)
|
137
|
+
@main_frame.text.tag_add(_row,_ibegin,_iend)
|
138
|
+
@main_frame.text.tag_bind(_row,"Double-ButtonPress-1",
|
139
|
+
proc{
|
140
|
+
EditorContract.instance.open_file(self, 'file'=>_file, 'line'=>_line)
|
141
|
+
}
|
142
|
+
)
|
143
|
+
@main_frame.text.tag_bind(_row,"Enter",
|
144
|
+
proc{@main_frame.text.configure('cursor'=> 'hand2')}
|
145
|
+
)
|
146
|
+
@main_frame.text.tag_bind(_row,"Leave",
|
147
|
+
proc{@main_frame.text.configure('cursor'=> _cursor)}
|
148
|
+
)
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
end
|
153
|
+
m = /([A-Za-z]*[\.:]{0,1}[\/\w\d]*\.rb):(\d*)/.match(_txt)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
}
|
157
|
+
end
|
158
|
+
|
159
|
+
def out(_txt=nil, _tag=nil)
|
160
|
+
if @main_frame && _txt
|
161
|
+
if _tag
|
162
|
+
@main_frame.text.insert('end',_txt, _tag)
|
163
|
+
else
|
164
|
+
@main_frame.text.insert('end',_txt)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
def outln(_txt=nil, _tag=nil)
|
170
|
+
self.out(_txt+"\n",_tag)
|
171
|
+
end
|
172
|
+
|
173
|
+
end
|
File without changes
|
File without changes
|
data/ext/ae-shell/ae-shell.conf
CHANGED
File without changes
|
data/ext/ae-shell/ae-shell.rb
CHANGED
@@ -1,54 +1,54 @@
|
|
1
|
-
#
|
2
|
-
# ae-shell.rb - Arcadia Ruby ide
|
3
|
-
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
4
|
-
#
|
5
|
-
|
6
|
-
require "tk"
|
7
|
-
require "base/a-utils"
|
8
|
-
|
9
|
-
class Shell < ArcadiaExt
|
10
|
-
|
11
|
-
def build
|
12
|
-
#@ae_msg_contract = @arcadia.retrieve_contract(self, MsgContract)
|
13
|
-
@run_threads = Array.new
|
14
|
-
end
|
15
|
-
|
16
|
-
def run_last
|
17
|
-
run($arcadia['pers']['run.file.last'])
|
18
|
-
end
|
19
|
-
|
20
|
-
def run_current
|
21
|
-
current_editor = $arcadia['editor'].raised
|
22
|
-
run(current_editor.file) if current_editor
|
23
|
-
end
|
24
|
-
|
25
|
-
def stop
|
26
|
-
@run_threads.each{|t|
|
27
|
-
if t.alive?
|
28
|
-
t.kill
|
29
|
-
end
|
30
|
-
}
|
31
|
-
debug_quit if @adw
|
32
|
-
end
|
33
|
-
|
34
|
-
|
35
|
-
def run(_filename=nil)
|
36
|
-
if _filename
|
37
|
-
begin
|
38
|
-
$arcadia['pers']['run.file.last']=_filename
|
39
|
-
@run_threads << Thread.new{
|
40
|
-
@cmd = open("|"+$arcadia['conf']['shell.ruby']+" "+_filename+" 2>&1","r"){
|
41
|
-
|f|
|
42
|
-
MsgContract.instance.out_debug(self, f.read)
|
43
|
-
#@ae_msg_contract.out_debug(f.read)
|
44
|
-
}
|
45
|
-
}
|
46
|
-
rescue Exception => e
|
47
|
-
MsgContract.instance.out_debug(self, e)
|
48
|
-
#@ae_msg_contract.out_debug(e)
|
49
|
-
#@main_frame.text.insert('end', "---> "+e )
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
end
|
1
|
+
#
|
2
|
+
# ae-shell.rb - Arcadia Ruby ide
|
3
|
+
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
4
|
+
#
|
5
|
+
|
6
|
+
require "tk"
|
7
|
+
require "base/a-utils"
|
8
|
+
|
9
|
+
class Shell < ArcadiaExt
|
10
|
+
|
11
|
+
def build
|
12
|
+
#@ae_msg_contract = @arcadia.retrieve_contract(self, MsgContract)
|
13
|
+
@run_threads = Array.new
|
14
|
+
end
|
15
|
+
|
16
|
+
def run_last
|
17
|
+
run($arcadia['pers']['run.file.last'])
|
18
|
+
end
|
19
|
+
|
20
|
+
def run_current
|
21
|
+
current_editor = $arcadia['editor'].raised
|
22
|
+
run(current_editor.file) if current_editor
|
23
|
+
end
|
24
|
+
|
25
|
+
def stop
|
26
|
+
@run_threads.each{|t|
|
27
|
+
if t.alive?
|
28
|
+
t.kill
|
29
|
+
end
|
30
|
+
}
|
31
|
+
debug_quit if @adw
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
def run(_filename=nil)
|
36
|
+
if _filename
|
37
|
+
begin
|
38
|
+
$arcadia['pers']['run.file.last']=_filename
|
39
|
+
@run_threads << Thread.new{
|
40
|
+
@cmd = open("|"+$arcadia['conf']['shell.ruby']+" "+_filename+" 2>&1","r"){
|
41
|
+
|f|
|
42
|
+
MsgContract.instance.out_debug(self, f.read)
|
43
|
+
#@ae_msg_contract.out_debug(f.read)
|
44
|
+
}
|
45
|
+
}
|
46
|
+
rescue Exception => e
|
47
|
+
MsgContract.instance.out_debug(self, e)
|
48
|
+
#@ae_msg_contract.out_debug(e)
|
49
|
+
#@main_frame.text.insert('end', "---> "+e )
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|