arcadia 0.1.2 → 0.1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README +142 -126
- data/arcadia.rb +770 -770
- data/base/a-utils.rb +30 -13
- data/conf/arcadia.conf +33 -32
- data/ext/ae-debug/ae-debug.rb +1 -1
- data/ext/ae-doc-code/ae-doc-code.conf +15 -15
- data/ext/ae-editor/ae-editor.conf +11 -11
- data/ext/ae-editor/ae-editor.rb +14 -20
- data/ext/ae-file-history/ae-file-history.conf +4 -4
- data/ext/ae-output-event/ae-output-event.conf +4 -4
- data/ext/ae-output/ae-output.conf +4 -4
- data/ext/ae-shell/ae-shell.conf +2 -2
- data/ext/ae-shell/ae-shell.rb +7 -10
- data/ext/ae-shell/ae-shell.rb~~ +49 -0
- metadata +3 -2
data/base/a-utils.rb
CHANGED
@@ -656,18 +656,27 @@ class Application
|
|
656
656
|
if FileTest.exist?(local_file_config)
|
657
657
|
self['conf'].update(self.config_file2hash(local_file_config))
|
658
658
|
elsif _create_if_not_exist
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
p
|
665
|
-
|
666
|
-
|
659
|
+
if FileTest.writable?(local_dir)
|
660
|
+
f = File.new(local_file_config, "w")
|
661
|
+
begin
|
662
|
+
if f
|
663
|
+
p = self['conf']
|
664
|
+
if p
|
665
|
+
p.keys.sort.each{|key|
|
666
|
+
f.syswrite('#'+key+'='+self['conf'][key]+"\n")
|
667
|
+
}
|
668
|
+
end
|
667
669
|
end
|
670
|
+
ensure
|
671
|
+
f.close unless f.nil?
|
668
672
|
end
|
669
|
-
|
670
|
-
|
673
|
+
else
|
674
|
+
msg = "Locad dir "+'"'+local_dir+'"'+" must be writable!"
|
675
|
+
Tk.messageBox('icon' => 'error', 'type' => 'ok',
|
676
|
+
'title' => '(Arcadia)',
|
677
|
+
'message' => msg)
|
678
|
+
exit
|
679
|
+
|
671
680
|
end
|
672
681
|
end
|
673
682
|
end
|
@@ -675,8 +684,16 @@ class Application
|
|
675
684
|
def local_dir
|
676
685
|
_local_dir = File.join(ENV["HOME"],'.'+self['applicationParams'].name) if ENV["HOME"]
|
677
686
|
if _local_dir && !File.exist?(_local_dir)
|
678
|
-
|
679
|
-
|
687
|
+
if FileTest.exist?(ENV["HOME"])
|
688
|
+
Dir.mkdir(_local_dir)
|
689
|
+
@first_run = true
|
690
|
+
else
|
691
|
+
msg = "Locad dir "+'"'+ENV["HOME"]+'"'+" must be writable!"
|
692
|
+
Tk.messageBox('icon' => 'error', 'type' => 'ok',
|
693
|
+
'title' => '(Arcadia)',
|
694
|
+
'message' => msg)
|
695
|
+
exit
|
696
|
+
end
|
680
697
|
end
|
681
698
|
return _local_dir
|
682
699
|
end
|
@@ -689,7 +706,7 @@ class Application
|
|
689
706
|
_lines.each{|_line|
|
690
707
|
_strip_line = _line.strip
|
691
708
|
if (_strip_line.length > 0)&&(_strip_line[0,1]!='#')
|
692
|
-
var_plat = _line.split('
|
709
|
+
var_plat = _line.split('::')
|
693
710
|
if var_plat.length > 1
|
694
711
|
if (RUBY_PLATFORM.include?(var_plat[0]))
|
695
712
|
#if (var_plat[0] == RUBY_PLATFORM)
|
data/conf/arcadia.conf
CHANGED
@@ -84,7 +84,7 @@ toolbar_show=yes
|
|
84
84
|
|
85
85
|
libraries=tk,tkCustom
|
86
86
|
#libraries=tk,tkBWidget,tkCustom,tkArcadia
|
87
|
-
#
|
87
|
+
#win::libraries=tk,tkBWidget,tkCustom, tkIWidget
|
88
88
|
# tk library properties
|
89
89
|
libraries.tk.name=Tk
|
90
90
|
libraries.tk.source=lib/tk/al-tk.rb
|
@@ -140,51 +140,52 @@ splash.version.font=Courier 10
|
|
140
140
|
splash.credits.font=Courier 10
|
141
141
|
splash.banner.font=Courier 8 italic
|
142
142
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
143
|
+
win::splash.title.font=Ariel 26 bold
|
144
|
+
win::splash.subtitle.font=Ariel 8 bold
|
145
|
+
win::splash.version.font=Ariel 8
|
146
|
+
win::splash.credits.font=Ariel 8
|
147
|
+
win::splash.banner.font=Ariel 8 italic
|
148
|
+
|
148
149
|
#:::::::::::::::: splash group ::::::::::::::::::::::<begin>
|
149
150
|
|
150
151
|
#:::::::::::::::: main group ::::::::::::::::::::::<begin>
|
151
152
|
main.mainmenu.font=courier 12
|
152
|
-
|
153
|
-
|
153
|
+
freebsd::main.mainmenu.font=courier 12
|
154
|
+
win::main.mainmenu.font=Ariel 8
|
154
155
|
main.font=courier 12
|
155
156
|
main.font.bold=courier 12 bold
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
157
|
+
freebsd::main.font=courier 12
|
158
|
+
freebsd::main.font=courier 12 bold
|
159
|
+
win::main.font=Ariel 8
|
160
|
+
win::main.font.bold=Ariel 8 bold
|
160
161
|
main.component.font=times 8
|
161
|
-
|
162
|
+
win::main.component.font=Ariel 8
|
162
163
|
#:::::::::::::::: main group ::::::::::::::::::::::<end>
|
163
164
|
|
164
165
|
#:::::::::::::::: inspector group ::::::::::::::::::::::<begin>
|
165
166
|
inspectors.tabs.font=courier 12
|
166
|
-
|
167
|
-
|
167
|
+
win::inspectors.tabs.font=Ariel 8
|
168
|
+
freebsd::inspectors.tabs.font=courier 12
|
168
169
|
inspectors.tabs.side=top
|
169
170
|
inspectors.inspector.tabs.font=courier 12
|
170
|
-
|
171
|
-
|
171
|
+
freebsd::inspectors.inspector.tabs.font=courier 12
|
172
|
+
win::inspectors.inspector.tabs.font=Ariel 8
|
172
173
|
inspectors.inspector.tabs.side=top
|
173
174
|
inspectors.inspector.key.font=courier 12
|
174
175
|
inspectors.inspector.value.font=courier 12
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
176
|
+
freebsd::inspectors.inspector.key.font=courier 12
|
177
|
+
freebsd::inspectors.inspector.value.font=courier 12
|
178
|
+
win::inspectors.inspector.key.font=Ariel 8
|
179
|
+
win::inspectors.inspector.value.font=Ariel 8
|
179
180
|
inspectors.inspector.tree.font=courier 12
|
180
|
-
|
181
|
+
win::inspectors.inspector.tree.font=Ariel 8
|
181
182
|
|
182
183
|
inspectors.debug.tabs.font=courier 12
|
183
184
|
inspectors.debug.tabs.font.bold=courier 12 bold
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
185
|
+
freebsd::inspectors.debug.tabs.font=courier 12
|
186
|
+
freebsd::inspectors.debug.tabs.font.bold=courier 12 bold
|
187
|
+
win::inspectors.debug.tabs.font=courier 8
|
188
|
+
win::inspectors.debug.tabs.font.bold=courier 8 bold
|
188
189
|
#:::::::::::::::: inspector group ::::::::::::::::::::::<end>
|
189
190
|
|
190
191
|
|
@@ -193,10 +194,10 @@ i386-mswin32::inspectors.debug.tabs.font.bold=courier 8 bold
|
|
193
194
|
all.frame.title.font=courier 12
|
194
195
|
all.frame.title.font.bold=courier 12 bold
|
195
196
|
all.frame.title.font.italic=courier 12 italic
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
197
|
+
freebsd::all.frame.title.font=courier 12
|
198
|
+
freebsd::all.frame.title.font.bold=courier 12 bold
|
199
|
+
freebsd::all.frame.title.font.italic=courier 12 italic
|
200
|
+
win::all.frame.title.font=courier 9
|
201
|
+
win::all.frame.title.font.bold=courier 9 bold
|
202
|
+
win::all.frame.title.font.italic=courier 9 italic
|
202
203
|
#:::::::::::::::: all ::::::::::::::::::::::<end>
|
data/ext/ae-debug/ae-debug.rb
CHANGED
@@ -10,7 +10,7 @@ class ArcadiaDebugWrapper
|
|
10
10
|
attr_reader :last_command
|
11
11
|
attr_reader :debugging
|
12
12
|
def initialize
|
13
|
-
(RUBY_PLATFORM
|
13
|
+
(RUBY_PLATFORM.include?('mswin32'))?_cmd="cmd":_cmd='sh'
|
14
14
|
@io = IO.popen(_cmd,'w')
|
15
15
|
@last_command = _cmd
|
16
16
|
@stop = false
|
@@ -1,15 +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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
color.background=#ffffc1
|
15
|
-
color.foreground=#408080
|
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
|
+
freebsd::font=courier 12
|
11
|
+
freebsd::font.bold=courier 12 bold
|
12
|
+
win::font={Courier New} 9
|
13
|
+
win::font.bold={Courier New} 9 bold
|
14
|
+
color.background=#ffffc1
|
15
|
+
color.foreground=#408080
|
@@ -11,17 +11,17 @@ tab-replace-width-space=2
|
|
11
11
|
|
12
12
|
#tabs
|
13
13
|
tabs.font=courier 12
|
14
|
-
|
15
|
-
|
14
|
+
freebsd::tabs.font=courier 12
|
15
|
+
win::tabs.font={Courier New} 9
|
16
16
|
#tabs.side=bottom
|
17
17
|
tabs.side=top
|
18
18
|
# editor
|
19
19
|
font=courier 12
|
20
20
|
font.bold=courier 12 bold
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
freebsd::font=courier 12
|
22
|
+
freebsd::font.bold=courier 12 bold
|
23
|
+
win::font={Courier New} 9
|
24
|
+
win::font.bold={Courier New} 9 bold
|
25
25
|
#+--------------------------------------------------
|
26
26
|
#color.background=#000040
|
27
27
|
#color.foreground=white
|
@@ -86,16 +86,16 @@ line_number_panel.color.foreground=#333333
|
|
86
86
|
explorer_panel.tree.color.background=#ffffff
|
87
87
|
explorer_panel.tree.color.foreground=white
|
88
88
|
explorer_panel.tree.font=courier 12
|
89
|
-
|
90
|
-
|
89
|
+
freebsd::explorer_panel.tree.font=courier 12
|
90
|
+
win::explorer_panel.tree.font={Courier New} 9
|
91
91
|
explorer_panel.tree.class.color.foreground=#a42019
|
92
92
|
explorer_panel.tree.class.font=times 10 bold
|
93
|
-
|
93
|
+
win::explorer_panel.tree.class.font=times 10 bold
|
94
94
|
explorer_panel.tree.def.color.foreground=blue
|
95
95
|
explorer_panel.tree.def.font=times 10
|
96
|
-
|
96
|
+
win::explorer_panel.tree.def.font=times 10
|
97
97
|
explorer_panel.tree.module.color.foreground=#1b691e
|
98
98
|
explorer_panel.tree.module.font=times 8 bold
|
99
|
-
|
99
|
+
win::explorer_panel.tree.module.font={Courier New} 9 bold
|
100
100
|
|
101
101
|
#:::::::::::::::: Editor group ::::::::::::::::::::::<end>
|
data/ext/ae-editor/ae-editor.rb
CHANGED
@@ -370,13 +370,7 @@ class AgEditor
|
|
370
370
|
when 'Right','Left','Down', 'Up'
|
371
371
|
# do nil
|
372
372
|
else
|
373
|
-
|
374
|
-
if !@set_mod
|
375
|
-
set_modify
|
376
|
-
end
|
377
|
-
else
|
378
|
-
reset_modify
|
379
|
-
end
|
373
|
+
check_modify
|
380
374
|
end
|
381
375
|
case e.keysym
|
382
376
|
when 'Return'
|
@@ -907,12 +901,7 @@ class AgEditor
|
|
907
901
|
end
|
908
902
|
_row = _row+1
|
909
903
|
}
|
910
|
-
|
911
|
-
set_modify
|
912
|
-
else
|
913
|
-
reset_modify
|
914
|
-
end
|
915
|
-
|
904
|
+
check_modify
|
916
905
|
end
|
917
906
|
|
918
907
|
def indentation_tabs_2_space(_n_space=2)
|
@@ -931,11 +920,7 @@ class AgEditor
|
|
931
920
|
end
|
932
921
|
_row = _row+1
|
933
922
|
}
|
934
|
-
|
935
|
-
set_modify
|
936
|
-
else
|
937
|
-
reset_modify
|
938
|
-
end
|
923
|
+
check_modify
|
939
924
|
end
|
940
925
|
|
941
926
|
|
@@ -968,8 +953,8 @@ class AgEditor
|
|
968
953
|
end
|
969
954
|
|
970
955
|
def highlightline(_row, _line, _check_mod = false)
|
971
|
-
if _check_mod
|
972
|
-
|
956
|
+
if _check_mod
|
957
|
+
check_modify
|
973
958
|
end
|
974
959
|
_txt = _line
|
975
960
|
_end = 0
|
@@ -1143,6 +1128,13 @@ class AgEditor
|
|
1143
1128
|
end
|
1144
1129
|
end
|
1145
1130
|
|
1131
|
+
def check_modify
|
1132
|
+
if modified? && !@set_mod
|
1133
|
+
set_modify
|
1134
|
+
else
|
1135
|
+
reset_modify
|
1136
|
+
end
|
1137
|
+
end
|
1146
1138
|
|
1147
1139
|
def check_file_last_access_time
|
1148
1140
|
if @file && @file_last_access_time
|
@@ -2039,6 +2031,7 @@ class Find < Findview
|
|
2039
2031
|
if TkDialog2.new('message'=>_message, 'buttons'=>['Yes','No']).show() == 0
|
2040
2032
|
self.editor.text.delete(@idx1,@idx2)
|
2041
2033
|
self.editor.text.insert(@idx1,@e_with.value)
|
2034
|
+
self.editor.check_modify
|
2042
2035
|
end
|
2043
2036
|
end
|
2044
2037
|
end
|
@@ -2050,6 +2043,7 @@ class Find < Findview
|
|
2050
2043
|
if _rc == 0
|
2051
2044
|
self.editor.text.delete(@idx1,@idx2)
|
2052
2045
|
self.editor.text.insert(@idx1,@e_with.value)
|
2046
|
+
self.editor.check_modify
|
2053
2047
|
elsif _rc == 2
|
2054
2048
|
break
|
2055
2049
|
end
|
@@ -11,7 +11,7 @@ font=courier 12
|
|
11
11
|
font.bold=courier 12 bold
|
12
12
|
color.background=#ffffff
|
13
13
|
color.foreground=#000000
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
freebsd::font=courier 12 italic
|
15
|
+
freebsd::font.bold=courier 12 bold
|
16
|
+
win::font={Courier New} 9
|
17
|
+
win::font.bold={Courier New} 9 bold
|
@@ -9,7 +9,7 @@ MsgContract.channel=CH1
|
|
9
9
|
|
10
10
|
font=courier 10
|
11
11
|
font.bold=courier 10 bold
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
freebsd::font=courier 10
|
13
|
+
freebsd::font.bold=courier 12 bold
|
14
|
+
win::font={Courier New} 9
|
15
|
+
win::font.bold={Courier New} 9 bold
|
@@ -8,7 +8,7 @@ MsgContract.channel=0
|
|
8
8
|
|
9
9
|
font=courier 10
|
10
10
|
font.bold=courier 10 bold
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
freebsd::font=courier 12
|
12
|
+
freebsd::font.bold=courier 12 bold
|
13
|
+
win::font={Courier New} 9
|
14
|
+
win::font.bold={Courier New} 9 bold
|
data/ext/ae-shell/ae-shell.conf
CHANGED
data/ext/ae-shell/ae-shell.rb
CHANGED
@@ -9,7 +9,6 @@ require "base/a-utils"
|
|
9
9
|
class Shell < ArcadiaExt
|
10
10
|
|
11
11
|
def build
|
12
|
-
#@ae_msg_contract = @arcadia.retrieve_contract(self, MsgContract)
|
13
12
|
@run_threads = Array.new
|
14
13
|
end
|
15
14
|
|
@@ -31,23 +30,21 @@ class Shell < ArcadiaExt
|
|
31
30
|
debug_quit if @adw
|
32
31
|
end
|
33
32
|
|
34
|
-
|
35
33
|
def run(_filename=nil)
|
36
34
|
if _filename
|
37
35
|
begin
|
38
36
|
$arcadia['pers']['run.file.last']=_filename
|
39
37
|
@run_threads << Thread.new{
|
40
|
-
|
38
|
+
_cmd_ = "|"+$arcadia['conf']['shell.ruby']+" "+_filename+" 2>&1"
|
39
|
+
#MsgContract.instance.out_debug(self, _cmd_)
|
40
|
+
@cmd = open(_cmd_,"r"){
|
41
41
|
|f|
|
42
42
|
MsgContract.instance.out_debug(self, f.read)
|
43
|
-
|
44
|
-
}
|
43
|
+
}
|
45
44
|
}
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
#@main_frame.text.insert('end', "---> "+e )
|
50
|
-
end
|
45
|
+
rescue Exception => e
|
46
|
+
MsgContract.instance.out_debug(self, e)
|
47
|
+
end
|
51
48
|
end
|
52
49
|
end
|
53
50
|
|
@@ -0,0 +1,49 @@
|
|
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
|
+
@run_threads = Array.new
|
13
|
+
end
|
14
|
+
|
15
|
+
def run_last
|
16
|
+
run($arcadia['pers']['run.file.last'])
|
17
|
+
end
|
18
|
+
|
19
|
+
def run_current
|
20
|
+
current_editor = $arcadia['editor'].raised
|
21
|
+
run(current_editor.file) if current_editor
|
22
|
+
end
|
23
|
+
|
24
|
+
def stop
|
25
|
+
@run_threads.each{|t|
|
26
|
+
if t.alive?
|
27
|
+
t.kill
|
28
|
+
end
|
29
|
+
}
|
30
|
+
debug_quit if @adw
|
31
|
+
end
|
32
|
+
|
33
|
+
def run(_filename=nil)
|
34
|
+
if _filename
|
35
|
+
begin
|
36
|
+
$arcadia['pers']['run.file.last']=_filename
|
37
|
+
@run_threads << Thread.new{
|
38
|
+
@cmd = open("|"+$arcadia['conf']['shell.ruby']+" "+_filename+" 2>&1","r"){
|
39
|
+
|f|
|
40
|
+
MsgContract.instance.out_debug(self, f.read)
|
41
|
+
}
|
42
|
+
}
|
43
|
+
rescue Exception => e
|
44
|
+
MsgContract.instance.out_debug(self, e)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|