arcadia 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README +11 -28
- data/ext/ae-breakpoints/ae-breakpoints.rb +44 -19
- data/ext/ae-dir-projects/ae-dir-projects.rb +38 -35
- data/ext/ae-editor/ae-editor.rb +252 -97
- data/ext/ae-file-history/ae-file-history.rb +30 -31
- data/ext/ae-output/ae-output.rb +137 -133
- data/ext/ae-ruby-debug/ae-ruby-debug.conf +4 -2
- data/ext/ae-ruby-debug/ae-ruby-debug.rb +95 -47
- data/ext/ae-search-in-files/ae-search-in-files.rb +32 -37
- data/ext/ae-shell/ae-shell.rb +1 -0
- data/lib/a-commons.rb +22 -16
- data/lib/a-contracts.rb +7 -2
- data/lib/a-core.rb +24 -12
- data/lib/a-tkcommons.rb +31 -3
- metadata +5 -5
data/ext/ae-shell/ae-shell.rb
CHANGED
@@ -253,6 +253,7 @@ class Shell < ArcadiaExt
|
|
253
253
|
# output_mark = Arcadia.console(self,'msg'=>output_dump, 'level'=>'debug', 'mark'=>output_mark)
|
254
254
|
# _event.add_result(self, 'output'=>_readed)
|
255
255
|
# }
|
256
|
+
#p "da cancellare #{ _event.file } #{_event.file[-2..-1] == '~~'} #{_event.persistent == false} #{File.exist?(_event.file)}"
|
256
257
|
if _event.persistent == false && _event.file[-2..-1] == '~~'
|
257
258
|
File.delete(_event.file) if File.exist?(_event.file)
|
258
259
|
end
|
data/lib/a-commons.rb
CHANGED
@@ -510,24 +510,30 @@ module EventBus #(or SourceEvent)
|
|
510
510
|
end
|
511
511
|
|
512
512
|
|
513
|
-
module
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
RUBY_PLATFORM =~ /win32|mingw/ ? _sep = ';':_sep=':'
|
518
|
-
ENV['PATH'].split(_sep).each{|_path|
|
519
|
-
_file = File.join(_path, _command)
|
520
|
-
if FileTest.exist?(_file)
|
521
|
-
_ret = _file
|
522
|
-
end
|
523
|
-
}
|
524
|
-
_ret
|
525
|
-
end
|
513
|
+
module Cacheble
|
514
|
+
def self.extended(_obj)
|
515
|
+
_obj.__initialize_cache(_obj)
|
516
|
+
end
|
526
517
|
|
527
|
-
def
|
528
|
-
|
518
|
+
def self.included(_obj)
|
519
|
+
_obj.__initialize_cache(_obj)
|
520
|
+
end
|
521
|
+
|
522
|
+
def __initialize_cache(_obj)
|
523
|
+
@@cache = Hash.new
|
524
|
+
end
|
525
|
+
|
526
|
+
def self.clear_cache
|
527
|
+
@@cache.clear
|
528
|
+
end
|
529
|
+
|
530
|
+
def self.set_cache(_key, _value)
|
531
|
+
@@cache[_key]=_value
|
532
|
+
end
|
533
|
+
|
534
|
+
def self.get_cache(_key, _value)
|
535
|
+
@@cache[_key]
|
529
536
|
end
|
530
|
-
|
531
537
|
end
|
532
538
|
|
533
539
|
module Configurable
|
data/lib/a-contracts.rb
CHANGED
@@ -131,16 +131,21 @@ end
|
|
131
131
|
class BufferRaisedEvent < BufferEvent
|
132
132
|
end
|
133
133
|
|
134
|
+
class NoBufferExistEvent < BufferEvent
|
135
|
+
end
|
136
|
+
|
137
|
+
class OneBufferExistEvent < BufferEvent
|
138
|
+
end
|
139
|
+
|
134
140
|
# +---------------------------------------------+
|
135
141
|
# Debug event
|
136
142
|
# +---------------------------------------------+
|
137
143
|
|
138
144
|
class DebugEvent < ArcadiaEvent
|
139
|
-
attr_accessor :file, :row, :active
|
145
|
+
attr_accessor :id, :file, :row, :active, :persistent
|
140
146
|
end
|
141
147
|
|
142
148
|
class SetBreakpointEvent < DebugEvent
|
143
|
-
attr_accessor :active
|
144
149
|
attr_accessor :line_code
|
145
150
|
end
|
146
151
|
|
data/lib/a-core.rb
CHANGED
@@ -22,7 +22,7 @@ class Arcadia < TkApplication
|
|
22
22
|
super(
|
23
23
|
ApplicationParams.new(
|
24
24
|
'arcadia',
|
25
|
-
'0.9.
|
25
|
+
'0.9.3',
|
26
26
|
'conf/arcadia.conf',
|
27
27
|
'conf/arcadia.pers'
|
28
28
|
)
|
@@ -939,7 +939,20 @@ class Arcadia < TkApplication
|
|
939
939
|
def Arcadia.is_windows?
|
940
940
|
RUBY_PLATFORM =~ /mingw|mswin/
|
941
941
|
end
|
942
|
-
|
942
|
+
|
943
|
+
def Arcadia.which(_command=nil)
|
944
|
+
return nil if _command.nil?
|
945
|
+
_ret = nil
|
946
|
+
ENV['PATH'].split(File::PATH_SEPARATOR).each{|_path|
|
947
|
+
_file = File.join(_path, _command)
|
948
|
+
if FileTest.exist?(_file)
|
949
|
+
_ret = _file
|
950
|
+
break
|
951
|
+
end
|
952
|
+
}
|
953
|
+
_ret
|
954
|
+
end
|
955
|
+
|
943
956
|
def Arcadia.menu_root(_menu_root_name, _menu_root=nil)
|
944
957
|
if @@instance['menu_roots'] == nil
|
945
958
|
@@instance['menu_roots'] = Hash.new
|
@@ -1582,7 +1595,7 @@ class ArcadiaAboutSplash < TkToplevel
|
|
1582
1595
|
place('x' => 100,'y' => 65,'height' => 19)
|
1583
1596
|
}
|
1584
1597
|
@tkLabel21 = TkLabel.new(self){
|
1585
|
-
text 'by Antonio Galeone - 2004/
|
1598
|
+
text 'by Antonio Galeone - 2004/2011'
|
1586
1599
|
background _bgcolor
|
1587
1600
|
foreground '#ffffff'
|
1588
1601
|
font Arcadia.instance['conf']['splash.credits.font']
|
@@ -1632,13 +1645,13 @@ class ArcadiaAboutSplash < TkToplevel
|
|
1632
1645
|
def set_progress(_max=10)
|
1633
1646
|
@max = _max
|
1634
1647
|
Tk::BWidget::ProgressBar.new(self, :width=>150, :height=>10,
|
1635
|
-
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1648
|
+
:background=>'#000000',
|
1649
|
+
:troughcolor=>'#000000',
|
1650
|
+
:foreground=>'#a11934',
|
1651
|
+
:variable=>@progress,
|
1652
|
+
:borderwidth=>0,
|
1653
|
+
:relief=>'flat',
|
1654
|
+
:maximum=>_max).place('relwidth' => '1','y' => 146,'height' => 2)
|
1642
1655
|
end
|
1643
1656
|
|
1644
1657
|
def reset
|
@@ -1828,7 +1841,6 @@ class EventWatcherForGem
|
|
1828
1841
|
end
|
1829
1842
|
|
1830
1843
|
class ArcadiaGemsWizard
|
1831
|
-
include Autils
|
1832
1844
|
def initialize(_arcadia)
|
1833
1845
|
@arcadia = _arcadia
|
1834
1846
|
Arcadia.attach_listener(self, NeedRubyGemWizardEvent)
|
@@ -1862,7 +1874,7 @@ class ArcadiaGemsWizard
|
|
1862
1874
|
|
1863
1875
|
sh=ArcadiaSh.new
|
1864
1876
|
cmd = "gem install --remote --include-dependencies #{name}"
|
1865
|
-
cmd="sudo #{cmd}" if !is_windows?
|
1877
|
+
cmd="sudo #{cmd}" if !Arcadia.is_windows?
|
1866
1878
|
cmd+=" --source=#{repository}" if repository
|
1867
1879
|
sh.prepare_exec(cmd)
|
1868
1880
|
while sh.wait
|
data/lib/a-tkcommons.rb
CHANGED
@@ -46,6 +46,31 @@ class BWidgetTreePatched < Tk::BWidget::Tree
|
|
46
46
|
# def selectcommand(_proc=nil)
|
47
47
|
# self.configure('selectcommand'=>_proc)
|
48
48
|
# end
|
49
|
+
|
50
|
+
def selected
|
51
|
+
if self.selection_get[0]
|
52
|
+
if self.selection_get[0].respond_to?(:length) && self.selection_get[0].length >0
|
53
|
+
_selected = ""
|
54
|
+
if self.selection_get[0].instance_of?(Array)
|
55
|
+
selection_lines = self.selection_get[0]
|
56
|
+
else
|
57
|
+
if String.method_defined?(:lines)
|
58
|
+
selection_lines = self.selection_get[0].lines
|
59
|
+
else
|
60
|
+
selection_lines = self.selection_get[0].split("\n")
|
61
|
+
end
|
62
|
+
end
|
63
|
+
selection_lines.each{|_block|
|
64
|
+
_selected = _selected + _block.to_s + "\s"
|
65
|
+
}
|
66
|
+
_selected = _selected.strip
|
67
|
+
else
|
68
|
+
_selected = self.selection_get[0]
|
69
|
+
end
|
70
|
+
end
|
71
|
+
return _selected
|
72
|
+
end
|
73
|
+
|
49
74
|
end
|
50
75
|
|
51
76
|
|
@@ -873,6 +898,9 @@ class TkTitledFrame < TkBaseTitledFrame
|
|
873
898
|
@apy = Array.new
|
874
899
|
@apw = Array.new
|
875
900
|
@aph = Array.new
|
901
|
+
@top.bind_append("Double-Button-1", proc{resize})
|
902
|
+
@left_label.bind_append("Double-Button-1", proc{resize})
|
903
|
+
@right_label.bind_append("Double-Button-1", proc{resize})
|
876
904
|
end
|
877
905
|
|
878
906
|
def create_left_label
|
@@ -1495,14 +1523,14 @@ module TkAutoPostMenu
|
|
1495
1523
|
@last_clicked.unpost
|
1496
1524
|
@last_clicked = nil
|
1497
1525
|
end
|
1498
|
-
|
1526
|
+
|
1499
1527
|
ch.menu.post(x-rx,y-ry+hh)
|
1500
|
-
|
1501
1528
|
#just_posted = TkWinfo.containing(x, y+hh)
|
1502
1529
|
|
1503
1530
|
chmenus = TkWinfo.children(ch)
|
1504
1531
|
@last_menu_posted = chmenus[0]
|
1505
1532
|
@last_menu_posted.set_focus
|
1533
|
+
|
1506
1534
|
@last_menu_posted.bind("Enter", proc{
|
1507
1535
|
@last_menu_posted.bind("Leave", proc{
|
1508
1536
|
if @posting_on
|
@@ -1524,7 +1552,7 @@ module TkAutoPostMenu
|
|
1524
1552
|
if @last_post
|
1525
1553
|
_x = TkWinfo.x(@last_post)
|
1526
1554
|
_y = TkWinfo.y(@last_post)
|
1527
|
-
ch.event_generate("KeyPress", :keysym=>"Escape")
|
1555
|
+
ch.event_generate("KeyPress", :keysym=>"Escape") if Tk.focus.kind_of?(TkMenu) && Tk.focus != ch.menu
|
1528
1556
|
@last_post.post(_x,_y) if @last_clicked && @last_clicked == ch.menu
|
1529
1557
|
end
|
1530
1558
|
if @last_post!=ch.menu
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arcadia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 3
|
10
|
+
version: 0.9.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Antonio Galeone
|
@@ -15,11 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-12-02 00:00:00 +01:00
|
19
19
|
default_executable: arcadia
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name:
|
22
|
+
name: coderay
|
23
23
|
prerelease: false
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|