arcadia 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +9 -5
- data/bin/arcadia +13 -13
- data/bin/arcadia.bat +1 -0
- data/conf/arcadia.conf +6 -5
- data/conf/arcadia.init.rb +34 -34
- data/conf/arcadia.res.rb +6 -0
- data/ext/ae-breakpoints/ae-breakpoints.conf +10 -0
- data/ext/ae-breakpoints/ae-breakpoints.rb +349 -0
- data/ext/ae-complete-code/ae-complete-code.conf +0 -0
- data/ext/ae-complete-code/ae-complete-code.rb +74 -76
- data/ext/ae-doc-code/ae-doc-code.conf +15 -15
- data/ext/ae-doc-code/ae-doc-code.rb +300 -295
- data/ext/ae-editor/ae-editor.conf +4 -4
- data/ext/ae-editor/ae-editor.rb +450 -140
- 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-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 +0 -0
- data/ext/ae-file-history/ae-file-history.rb +437 -373
- data/ext/ae-flag/ae-flag.conf +0 -0
- data/ext/ae-flag/ae-flag.rb +0 -0
- data/ext/ae-output-event/ae-output-event.conf +0 -0
- data/ext/ae-output/ae-output.conf +0 -0
- data/ext/ae-output/ae-output.rb +0 -0
- data/ext/ae-rad/ae-rad-inspector.rb +0 -0
- 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 +4 -4
- data/ext/ae-rad/lib/tk/al-tk.res.rb +0 -0
- data/ext/ae-rad/lib/tk/al-tkarcadia.rb +25 -26
- 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 +1589 -1566
- data/ext/ae-search-in-files/ae-search-in-files.conf +0 -0
- data/ext/ae-search-in-files/ae-search-in-files.rb +0 -0
- data/ext/ae-shell/ae-shell.conf +0 -0
- data/ext/ae-shell/ae-shell.rb +0 -0
- data/ext/ae-shell/sh.rb +0 -0
- data/lib/a-commons.rb +27 -8
- data/lib/a-contracts.rb +3 -1
- data/lib/a-core.rb +33 -12
- data/lib/a-tkcommons.rb +17 -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 +158 -154
data/README
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
= Arcadia Ruby Ide
|
2
|
-
version 0.
|
2
|
+
version 0.4.0
|
3
3
|
|
4
4
|
by Antonio Galeone
|
5
|
-
on
|
5
|
+
on Jul 29, 2008
|
6
6
|
|
7
7
|
|
8
8
|
== About
|
@@ -18,7 +18,10 @@ Some of Arcadia ruby ide project features include:
|
|
18
18
|
* Highly extensibility architecture.
|
19
19
|
|
20
20
|
== In this release
|
21
|
-
* [fix]
|
21
|
+
* [fix] bug-fixing
|
22
|
+
* [mod] Improved file-history
|
23
|
+
* [mod] Improved editor
|
24
|
+
* [mod] Improved debugger
|
22
25
|
|
23
26
|
== How to install
|
24
27
|
There are two way:
|
@@ -108,10 +111,11 @@ under ~/.arcadia directory. The format of property definition are:
|
|
108
111
|
|
109
112
|
== Requirement
|
110
113
|
I include into distribution also the BWidget lib (under tcl directory) so
|
111
|
-
are require realy only the standard tcl tk lib (tested on tcl tk 8.4).
|
114
|
+
are require realy only the standard tcl tk lib (tested on tcl tk 8.4 & tcl tk 8.5).
|
112
115
|
I have tested arcadia with ruby 1.8.4, 1.8.5, 1.8.6 on
|
113
116
|
* FreeBsd6.x,
|
114
|
-
* Vector linux 5
|
117
|
+
* Vector linux 5.*,
|
118
|
+
* Archlinux
|
115
119
|
* Windows 2000/XP,
|
116
120
|
* Cygwin (note: same page fault error on dll under cygwin may be solved in this way:
|
117
121
|
by ash.exe exec "/bin/rebaseall").
|
data/bin/arcadia
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# arcadia - Arcadia Ruby ide
|
4
|
-
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
5
|
-
#
|
6
|
-
|
7
|
-
$pwd = Dir.pwd
|
8
|
-
Dir.chdir("#{File.dirname(__FILE__)}/..")
|
9
|
-
if FileTest.exist?('conf/arcadia.init.rb')
|
10
|
-
require 'conf/arcadia.init'
|
11
|
-
end
|
12
|
-
require "lib/a-core"
|
13
|
-
Arcadia.new.run
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# arcadia - Arcadia Ruby ide
|
4
|
+
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
5
|
+
#
|
6
|
+
|
7
|
+
$pwd = Dir.pwd
|
8
|
+
Dir.chdir("#{File.dirname(__FILE__)}/..")
|
9
|
+
if FileTest.exist?('conf/arcadia.init.rb')
|
10
|
+
require 'conf/arcadia.init'
|
11
|
+
end
|
12
|
+
require "lib/a-core"
|
13
|
+
Arcadia.new.run
|
data/bin/arcadia.bat
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby arcadia
|
data/conf/arcadia.conf
CHANGED
@@ -18,9 +18,10 @@ layout.split.2=0.1r70%
|
|
18
18
|
#:::::::::::::::::::::::::::::::::::::::::::::::::<begin>
|
19
19
|
font.h1=
|
20
20
|
font.h2=
|
21
|
-
font.h3=courier
|
21
|
+
font.h3=courier 10
|
22
22
|
freebsd::font.h3=courier 12
|
23
23
|
win::font.h3={Courier New} 9
|
24
|
+
darwin::font.h3={Courier New} 12
|
24
25
|
font.h4=
|
25
26
|
font.h5=
|
26
27
|
font.h6=
|
@@ -258,10 +259,10 @@ user_toolbar_show=yes
|
|
258
259
|
|
259
260
|
#:::::::::::::::: splash group ::::::::::::::::::::::<begin>
|
260
261
|
splash.show=yes
|
261
|
-
splash.title.font=Courier
|
262
|
-
splash.subtitle.font=Courier
|
263
|
-
splash.version.font=Courier
|
264
|
-
splash.credits.font=Courier
|
262
|
+
splash.title.font=Courier 28 bold
|
263
|
+
splash.subtitle.font=Courier 10 bold
|
264
|
+
splash.version.font=Courier 9
|
265
|
+
splash.credits.font=Courier 9
|
265
266
|
splash.banner.font=Courier 8 italic
|
266
267
|
|
267
268
|
win::splash.title.font=Ariel 26 bold
|
data/conf/arcadia.init.rb
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
# In this file init configuration
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'tk'
|
5
|
-
rescue LoadError => e
|
6
|
-
print <<EOL
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
EOL
|
13
|
-
i=30
|
14
|
-
l=i
|
15
|
-
msg=e.message
|
16
|
-
while l < msg.length
|
17
|
-
while l < msg.length-1 && msg[l..l]!="\s"
|
18
|
-
l=l+1
|
19
|
-
end
|
20
|
-
msg = msg[0..l]+"\n"+"\s"*4+msg[l+1..-1]
|
21
|
-
l=l+i
|
22
|
-
end
|
23
|
-
print <<EOL
|
24
|
-
---Tk LoadError Details-----------------------
|
25
|
-
Platform : "#{RUBY_PLATFORM}"
|
26
|
-
Ruby version : "#{RUBY_VERSION}"
|
27
|
-
Message :
|
28
|
-
"#{msg}"
|
29
|
-
----------------------------------------------
|
30
|
-
EOL
|
31
|
-
exit
|
32
|
-
end
|
33
|
-
|
34
|
-
Tk.tk_call "eval","set auto_path [concat $::auto_path tcl]"
|
1
|
+
# In this file init configuration
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'tk'
|
5
|
+
rescue LoadError => e
|
6
|
+
print <<EOL
|
7
|
+
----------------------------------------------
|
8
|
+
Arcadia require ruby-tk extension
|
9
|
+
and tcl/tk run-time
|
10
|
+
you must install before run ...
|
11
|
+
----------------------------------------------
|
12
|
+
EOL
|
13
|
+
i=30
|
14
|
+
l=i
|
15
|
+
msg=e.message
|
16
|
+
while l < msg.length
|
17
|
+
while l < msg.length-1 && msg[l..l]!="\s"
|
18
|
+
l=l+1
|
19
|
+
end
|
20
|
+
msg = msg[0..l]+"\n"+"\s"*4+msg[l+1..-1]
|
21
|
+
l=l+i
|
22
|
+
end
|
23
|
+
print <<EOL
|
24
|
+
---Tk LoadError Details-----------------------
|
25
|
+
Platform : "#{RUBY_PLATFORM}"
|
26
|
+
Ruby version : "#{RUBY_VERSION}"
|
27
|
+
Message :
|
28
|
+
"#{msg}"
|
29
|
+
----------------------------------------------
|
30
|
+
EOL
|
31
|
+
exit
|
32
|
+
end
|
33
|
+
|
34
|
+
Tk.tk_call "eval","set auto_path [concat $::auto_path tcl]"
|
data/conf/arcadia.res.rb
CHANGED
@@ -1340,3 +1340,9 @@ pBMKA7ykCEjW58fvoQCU9gYAcYIPMHcKeU0xBj4BBgNQM3gGRmqIFIQ/JYaX
|
|
1340
1340
|
fRR4Ent9fwBqgoFphpZ5Pm0DRq1gAbJ6SqsVa11ZJZ+XFH0vwS9pvXkrVFNi
|
1341
1341
|
awKVYxYIsw0D09TV1tcNGBEAOw==
|
1342
1342
|
EOS
|
1343
|
+
|
1344
|
+
|
1345
|
+
ICON_FOLDER_OPEN_GIF=<<EOS
|
1346
|
+
R0lGODlhEAAQAIAAAGaZ/////yH5BAEAAAEALAAAAAAQABAAAAImjI+pq+DP
|
1347
|
+
wptgwXORi2kbCnpSSH2VdYlatanrCDen283khN0ZpxQAOw==
|
1348
|
+
EOS
|
@@ -0,0 +1,10 @@
|
|
1
|
+
#========================================
|
2
|
+
#========================================
|
3
|
+
name=breakpoints
|
4
|
+
labels=Breakpoints
|
5
|
+
frames=1.1
|
6
|
+
active=yes
|
7
|
+
require=ext/ae-breakpoints/ae-breakpoints
|
8
|
+
class=Breakpoints
|
9
|
+
#========================================
|
10
|
+
#========================================
|
@@ -0,0 +1,349 @@
|
|
1
|
+
#
|
2
|
+
# ae-breakpoints.rb - Arcadia Ruby ide
|
3
|
+
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
4
|
+
#
|
5
|
+
|
6
|
+
class Breakpoints < ArcadiaExt
|
7
|
+
def on_before_build(_event)
|
8
|
+
@ui_builded = false
|
9
|
+
@breakpoints =Array.new
|
10
|
+
Arcadia.attach_listener(self, DebugEvent)
|
11
|
+
end
|
12
|
+
|
13
|
+
def on_build(_event)
|
14
|
+
load_persistent_breakpoints
|
15
|
+
end
|
16
|
+
|
17
|
+
def on_finalize(_event)
|
18
|
+
_breakpoints = '';
|
19
|
+
@breakpoints.each{|point|
|
20
|
+
if point[:file] != nil
|
21
|
+
_breakpoints=_breakpoints+'|' if _breakpoints.strip.length > 0
|
22
|
+
_breakpoints=_breakpoints + "#{point[:file]}@@@#{point[:line]}@@@#{point[:active]}"
|
23
|
+
# _file_node = file2node_name(point[:file])
|
24
|
+
# _line_node = line2node_name(_file_node, point[:line])
|
25
|
+
# _check = @tree_break.itemcget(_line_node, 'window')
|
26
|
+
# if _check
|
27
|
+
# _breakpoints="#{_breakpoints}@@@#{_check.cget('variable').value}"
|
28
|
+
# end
|
29
|
+
end
|
30
|
+
}
|
31
|
+
Arcadia.persistent('breakpoints', _breakpoints)
|
32
|
+
end
|
33
|
+
|
34
|
+
def load_persistent_breakpoints
|
35
|
+
b = Arcadia.persistent('breakpoints')
|
36
|
+
if b
|
37
|
+
_files_list =b.split("|")
|
38
|
+
_files_list.each do |value|
|
39
|
+
_file,_line,_active = value.split('@@@')
|
40
|
+
if _file && _line && _active
|
41
|
+
Arcadia.process_event(SetBreakpointEvent.new(self, 'file'=>_file, 'row'=>_line, 'active'=>_active.to_i))
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
def ensure_build_ui
|
49
|
+
if !@ui_builded
|
50
|
+
build_ui
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def build_ui
|
55
|
+
do_select_item = proc{|_self|
|
56
|
+
if _self.selection_get[0].length >0
|
57
|
+
_selected = ""
|
58
|
+
_self.selection_get[0].each{|_block|
|
59
|
+
_selected = _selected + _block.to_s + "\s"
|
60
|
+
}
|
61
|
+
_selected = _selected.strip
|
62
|
+
else
|
63
|
+
_selected = _self.selection_get[0]
|
64
|
+
end
|
65
|
+
_node_name, _line = _selected.split('_')
|
66
|
+
if _node_name && _line
|
67
|
+
_file = _self.itemcget(_node_name, 'text')
|
68
|
+
if _file
|
69
|
+
Arcadia.process_event(OpenBufferEvent.new(self,'file'=>_file, 'row'=>_line))
|
70
|
+
end
|
71
|
+
end
|
72
|
+
#p "selected = #{_selected}"
|
73
|
+
}
|
74
|
+
|
75
|
+
@tree_break = Tk::BWidget::Tree.new(self.frame.hinner_frame, Arcadia.style('treepanel')){
|
76
|
+
#showlines true
|
77
|
+
deltay 18
|
78
|
+
padx 25
|
79
|
+
selectcommand proc{ do_select_item.call(self) }
|
80
|
+
}.place('relwidth' => 1,'relheight' => '1')
|
81
|
+
|
82
|
+
build_popup
|
83
|
+
|
84
|
+
@ui_builded = true
|
85
|
+
end
|
86
|
+
|
87
|
+
|
88
|
+
def unbuild_ui
|
89
|
+
if @ui_builded
|
90
|
+
|
91
|
+
@ui_builded = false
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def raise_clear_selected(_delete=false)
|
96
|
+
_file, _line = get_tree_selection(@tree_break)
|
97
|
+
if _file && _line
|
98
|
+
Arcadia.process_event(UnsetBreakpointEvent.new(self, 'file'=>_file, 'row'=>_line, 'delete'=>_delete))
|
99
|
+
elsif _file
|
100
|
+
_node_name = file2node_name(_file)
|
101
|
+
sons = @tree_break.nodes(_node_name)
|
102
|
+
if sons
|
103
|
+
sons.each{|son|
|
104
|
+
_nil, _l = son.split('_')
|
105
|
+
Arcadia.process_event(UnsetBreakpointEvent.new(self, 'file'=>_file, 'row'=>_l, 'delete'=>_delete)) if _l
|
106
|
+
}
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
def build_popup
|
112
|
+
_pop_up = TkMenu.new(
|
113
|
+
:parent=>@tree_break,
|
114
|
+
:tearoff=>0,
|
115
|
+
:title => 'Menu'
|
116
|
+
)
|
117
|
+
_pop_up.configure(Arcadia.style('menu'))
|
118
|
+
_title_item = _pop_up.insert('end',
|
119
|
+
:command,
|
120
|
+
:label=>'...',
|
121
|
+
:state=>'disabled',
|
122
|
+
:background=>Arcadia.conf('titlelabel.background'),
|
123
|
+
:hidemargin => true
|
124
|
+
)
|
125
|
+
|
126
|
+
_pop_up.insert('end',
|
127
|
+
:command,
|
128
|
+
:label=>'Clear breakpoint',
|
129
|
+
:hidemargin => false,
|
130
|
+
:command=> proc{raise_clear_selected}
|
131
|
+
)
|
132
|
+
|
133
|
+
_pop_up.insert('end',
|
134
|
+
:command,
|
135
|
+
:label=>'Delete breakpoint',
|
136
|
+
:hidemargin => false,
|
137
|
+
:command=> proc{raise_clear_selected(true)}
|
138
|
+
)
|
139
|
+
|
140
|
+
|
141
|
+
@tree_break.textbind_append("Button-3",
|
142
|
+
proc{|*x|
|
143
|
+
_x = TkWinfo.pointerx(@tree_break)
|
144
|
+
_y = TkWinfo.pointery(@tree_break)
|
145
|
+
_selected = @tree_break.selection_get[0]
|
146
|
+
_file, _line = get_tree_selection(@tree_break)
|
147
|
+
_label = _file
|
148
|
+
if _line
|
149
|
+
_label << " line: #{_line}"
|
150
|
+
end
|
151
|
+
_pop_up.entryconfigure(0,'label'=>_label)
|
152
|
+
|
153
|
+
_pop_up.popup(_x,_y)
|
154
|
+
})
|
155
|
+
end
|
156
|
+
|
157
|
+
def get_tree_selection(_tree)
|
158
|
+
_ret = Array.new
|
159
|
+
_selected = _tree.selection_get[0]
|
160
|
+
_node_name, _line = _selected.split('_')
|
161
|
+
_ret << _tree.itemcget(_node_name, 'text')
|
162
|
+
_ret << _line if _line
|
163
|
+
_ret
|
164
|
+
end
|
165
|
+
|
166
|
+
|
167
|
+
def on_debug(_event)
|
168
|
+
case _event
|
169
|
+
when SetBreakpointEvent
|
170
|
+
ensure_build_ui
|
171
|
+
@breakpoints << {:file=>_event.file,:line=>_event.row, :active=>_event.active}
|
172
|
+
self.breakpoint_add(File.expand_path(_event.file), _event.row, _event.active==1)
|
173
|
+
when UnsetBreakpointEvent
|
174
|
+
if @ui_builded
|
175
|
+
if _event.delete
|
176
|
+
@breakpoints.delete_if{|b| (b[:file]==_event.file && b[:line]==_event.row)}
|
177
|
+
else
|
178
|
+
@breakpoints.collect! {|b|
|
179
|
+
if b[:file]==_event.file && b[:line]==_event.row
|
180
|
+
b[:active]=0
|
181
|
+
end
|
182
|
+
b
|
183
|
+
}
|
184
|
+
end
|
185
|
+
self.breakpoint_del(File.expand_path(_event.file), _event.row, _event.delete)
|
186
|
+
#self.breakpoint_del(File.expand_path(_event.file), _event.row, _event.sender != self)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
def on_debug_step_info(_event)
|
192
|
+
#Arcadia.console(self, :msg=> "ae-breakpoints -> DebugStepInfoEvent")
|
193
|
+
if @ui_builded
|
194
|
+
self.breakpoint_select(_event.file, _event.row)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
def file2node_name(_file)
|
199
|
+
_file = File.expand_path(_file)
|
200
|
+
#_file = File.basename(_file)
|
201
|
+
_s = ""
|
202
|
+
_file.gsub("/",_s).gsub(".",_s).gsub(":",_s).gsub("\\",_s).gsub("-",_s)
|
203
|
+
end
|
204
|
+
|
205
|
+
def new_check_button(_node_name, _value=1)
|
206
|
+
_command = proc {|_checkbutton|
|
207
|
+
_file_node_name, _line = _node_name.split('_')
|
208
|
+
_file = @tree_break.itemcget(_file_node_name, 'text')
|
209
|
+
if _checkbutton.cget('variable').value.to_i==0
|
210
|
+
if _file && _line
|
211
|
+
Arcadia.process_event(UnsetBreakpointEvent.new(self, 'file'=>_file, 'row'=>_line))
|
212
|
+
elsif _file
|
213
|
+
sons = @tree_break.nodes(_node_name)
|
214
|
+
if sons
|
215
|
+
sons.each{|son|
|
216
|
+
_nil, _l = son.split('_')
|
217
|
+
Arcadia.process_event(UnsetBreakpointEvent.new(self, 'file'=>_file, 'row'=>_l)) if _l
|
218
|
+
}
|
219
|
+
end
|
220
|
+
end
|
221
|
+
else
|
222
|
+
if _file && _line
|
223
|
+
Arcadia.process_event(SetBreakpointEvent.new(self, 'file'=>_file, 'row'=>_line, 'active'=>1))
|
224
|
+
elsif _file
|
225
|
+
sons = @tree_break.nodes(_node_name)
|
226
|
+
if sons
|
227
|
+
sons.each{|son|
|
228
|
+
_nil, _l = son.split('_')
|
229
|
+
Arcadia.process_event(SetBreakpointEvent.new(self, 'file'=>_file, 'row'=>_l, 'active'=>1)) if _l
|
230
|
+
}
|
231
|
+
end
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
235
|
+
}
|
236
|
+
TkCheckButton.new(@tree_break, Arcadia.style('checkbox')){
|
237
|
+
#text _label
|
238
|
+
indicatoron true
|
239
|
+
padx 0
|
240
|
+
pady 0
|
241
|
+
variable TkVariable.new(_value)
|
242
|
+
background Arcadia.style('treepanel')['background']
|
243
|
+
borderwidth 0
|
244
|
+
command proc{_command.call(self)}
|
245
|
+
relief 'flat'
|
246
|
+
}
|
247
|
+
# _item_on_img = TkPhotoImage.new('dat' => ON_GIF)
|
248
|
+
# @item_off_img = TkPhotoImage.new('dat' => OFF_GIF)
|
249
|
+
# @b_item_onoff = TkButton.new(@tree_break, Arcadia.style('button')){
|
250
|
+
# image _item_on_img
|
251
|
+
# anchor 'nw'
|
252
|
+
# }.bind("1",proc{ })
|
253
|
+
end
|
254
|
+
|
255
|
+
def line2node_name(_parent, _line)
|
256
|
+
"#{_parent}_#{_line.to_s}"
|
257
|
+
end
|
258
|
+
|
259
|
+
def breakpoint_add(_file,_line, _active=true)
|
260
|
+
_file_node = file2node_name(_file)
|
261
|
+
_line_node = line2node_name(_file_node, _line)
|
262
|
+
(_active)?_check_value=1 : _check_value=0
|
263
|
+
if !@tree_break.exist?(_file_node)
|
264
|
+
@tree_break.insert('end', 'root' ,_file_node, {
|
265
|
+
'open'=>true,
|
266
|
+
'anchor'=>'w',
|
267
|
+
'text' => _file,
|
268
|
+
'deltax'=>-1,
|
269
|
+
'window' => new_check_button(_file_node, _check_value)
|
270
|
+
}.update(Arcadia.style('treeitem')))
|
271
|
+
elsif _active
|
272
|
+
_check = @tree_break.itemcget(_file_node, 'window')
|
273
|
+
_check.cget('variable').value=1
|
274
|
+
end
|
275
|
+
|
276
|
+
if !@tree_break.exist?(_line_node)
|
277
|
+
@tree_break.insert('end', _file_node ,_line_node, {
|
278
|
+
'open'=>true,
|
279
|
+
'anchor'=>'w',
|
280
|
+
'text' => "line: #{_line}",
|
281
|
+
'deltax'=>-1,
|
282
|
+
'window' => new_check_button(_line_node, _check_value)
|
283
|
+
}.update(Arcadia.style('treeitem')))
|
284
|
+
@tree_break.reorder(_file_node,@tree_break.nodes(_file_node).sort)
|
285
|
+
elsif _active
|
286
|
+
_check = @tree_break.itemcget(_line_node, 'window')
|
287
|
+
_check.cget('variable').value=1
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
def breakpoint_del(_file,_line, _delete=false)
|
292
|
+
_file_node = file2node_name(_file)
|
293
|
+
_line_node = line2node_name(_file_node, _line)
|
294
|
+
if @tree_break.exist?(_line_node)
|
295
|
+
begin
|
296
|
+
if _delete
|
297
|
+
_sc = @tree_break.cget('selectcommand')
|
298
|
+
@tree_break.configure('selectcommand'=>nil)
|
299
|
+
@tree_break.delete(_line_node)
|
300
|
+
else
|
301
|
+
_check = @tree_break.itemcget(_line_node, 'window')
|
302
|
+
_check.cget('variable').value=0
|
303
|
+
end
|
304
|
+
_bro = @tree_break.nodes(_file_node)
|
305
|
+
if _bro.nil? || _bro.length == 0
|
306
|
+
if _delete
|
307
|
+
@tree_break.delete(_file_node)
|
308
|
+
else
|
309
|
+
_check = @tree_break.itemcget(_file_node, 'window')
|
310
|
+
_check.cget('variable').value=0
|
311
|
+
end
|
312
|
+
elsif _bro.length > 0 && !_delete
|
313
|
+
is_checked = false
|
314
|
+
_bro.each{|n|
|
315
|
+
_check = @tree_break.itemcget(n, 'window')
|
316
|
+
v = _check.cget('variable').value
|
317
|
+
is_checked = is_checked || v.to_i==1
|
318
|
+
}
|
319
|
+
if !is_checked
|
320
|
+
_check = @tree_break.itemcget(_file_node, 'window')
|
321
|
+
_check.cget('variable').value=0
|
322
|
+
end
|
323
|
+
end
|
324
|
+
ensure
|
325
|
+
@tree_break.configure('selectcommand'=>_sc) if _delete
|
326
|
+
end
|
327
|
+
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
def breakpoint_select(_file, _line)
|
332
|
+
_file_node = file2node_name(_file)
|
333
|
+
_line_node = line2node_name(_file_node, _line)
|
334
|
+
@tree_break.selection_clear
|
335
|
+
#p "line node = #{_line_node}"
|
336
|
+
if @tree_break.exist?(_line_node)
|
337
|
+
@tree_break.open_tree(_file_node, false)
|
338
|
+
@tree_break.selection_add(_line_node)
|
339
|
+
@tree_break.see(_line_node)
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
|
344
|
+
def breakpoint_list_free
|
345
|
+
@tree_break.delete(@tree_break.nodes('root'))
|
346
|
+
end
|
347
|
+
|
348
|
+
|
349
|
+
end
|