arcadia 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +8 -10
- data/bin/arcadia +13 -13
- data/bin/arcadia.bat +0 -0
- data/conf/arcadia.conf +35 -18
- data/conf/arcadia.init.rb +0 -0
- data/conf/arcadia.res.rb +10 -0
- data/ext/ae-breakpoints/ae-breakpoints.conf +0 -0
- data/ext/ae-breakpoints/ae-breakpoints.rb +368 -349
- data/ext/ae-editor/ae-editor.conf +2 -2
- data/ext/ae-editor/ae-editor.rb +1248 -445
- 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-file-history/ae-file-history.conf +1 -1
- data/ext/ae-file-history/ae-file-history.rb +23 -17
- data/ext/ae-output/ae-output.conf +0 -0
- data/ext/ae-output/ae-output.rb +262 -200
- data/ext/ae-rad/ae-rad-inspector.rb +34 -26
- 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 +6 -2
- data/ext/ae-rad/lib/tk/al-tk.res.rb +0 -0
- data/ext/ae-rad/lib/tk/al-tkarcadia.rb +0 -0
- 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 +1 -0
- data/ext/ae-search-in-files/ae-search-in-files.conf +0 -0
- data/ext/ae-search-in-files/ae-search-in-files.rb +14 -10
- data/ext/ae-shell/ae-shell.conf +0 -0
- data/ext/ae-shell/ae-shell.rb +1 -1
- data/ext/ae-shell/sh.rb +0 -0
- data/lib/a-commons.rb +5 -1
- data/lib/a-contracts.rb +1 -0
- data/lib/a-core.rb +40 -9
- data/lib/a-tkcommons.rb +229 -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 +2 -25
- data/ext/ae-complete-code/ae-complete-code.conf +0 -6
- data/ext/ae-complete-code/ae-complete-code.rb +0 -74
- data/ext/ae-doc-code/ae-doc-code.conf +0 -15
- data/ext/ae-doc-code/ae-doc-code.rb +0 -300
- data/ext/ae-event-log/ae-event-log.conf +0 -5
- data/ext/ae-event-log/ae-event-log.rb +0 -46
- data/ext/ae-flag/ae-flag.conf +0 -6
- data/ext/ae-flag/ae-flag.rb +0 -12
- data/ext/ae-output-event/ae-output-event.conf +0 -15
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/tcl/BWidget-1.8.0/ChangeLog
CHANGED
File without changes
|
File without changes
|
File without changes
|
data/tcl/BWidget-1.8.0/arrow.tcl
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/tcl/BWidget-1.8.0/color.tcl
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/tcl/BWidget-1.8.0/entry.tcl
CHANGED
File without changes
|
data/tcl/BWidget-1.8.0/font.tcl
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/tcl/BWidget-1.8.0/init.tcl
CHANGED
File without changes
|
data/tcl/BWidget-1.8.0/label.tcl
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/tcl/BWidget-1.8.0/tree.tcl
CHANGED
File without changes
|
data/tcl/BWidget-1.8.0/utils.tcl
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arcadia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antonio Galeone
|
@@ -9,18 +9,9 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-08-31 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: rcodetools
|
17
|
-
version_requirement:
|
18
|
-
version_requirements: !ruby/object:Gem::Requirement
|
19
|
-
requirements:
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 0.5.0.0
|
23
|
-
version:
|
24
15
|
- !ruby/object:Gem::Dependency
|
25
16
|
name: ruby-debug
|
26
17
|
version_requirement:
|
@@ -76,9 +67,6 @@ files:
|
|
76
67
|
- ext/ae-rad/ae-rad-palette.rb
|
77
68
|
- ext/ae-rad/ae-rad.conf
|
78
69
|
- ext/ae-rad/ae-rad.rb
|
79
|
-
- ext/ae-complete-code
|
80
|
-
- ext/ae-complete-code/ae-complete-code.conf
|
81
|
-
- ext/ae-complete-code/ae-complete-code.rb
|
82
70
|
- ext/ae-shell
|
83
71
|
- ext/ae-shell/sh.rb
|
84
72
|
- ext/ae-shell/ae-shell.conf
|
@@ -86,26 +74,15 @@ files:
|
|
86
74
|
- ext/ae-output
|
87
75
|
- ext/ae-output/ae-output.rb
|
88
76
|
- ext/ae-output/ae-output.conf
|
89
|
-
- ext/ae-output-event
|
90
|
-
- ext/ae-output-event/ae-output-event.conf
|
91
77
|
- ext/ae-file-history
|
92
78
|
- ext/ae-file-history/ae-file-history.rb
|
93
79
|
- ext/ae-file-history/ae-file-history.conf
|
94
|
-
- ext/ae-doc-code
|
95
|
-
- ext/ae-doc-code/ae-doc-code.rb
|
96
|
-
- ext/ae-doc-code/ae-doc-code.conf
|
97
|
-
- ext/ae-event-log
|
98
|
-
- ext/ae-event-log/ae-event-log.rb
|
99
|
-
- ext/ae-event-log/ae-event-log.conf
|
100
80
|
- ext/ae-ruby-debug
|
101
81
|
- ext/ae-ruby-debug/ae-ruby-debug.conf
|
102
82
|
- ext/ae-ruby-debug/ae-ruby-debug.rb
|
103
83
|
- ext/ae-search-in-files
|
104
84
|
- ext/ae-search-in-files/ae-search-in-files.conf
|
105
85
|
- ext/ae-search-in-files/ae-search-in-files.rb
|
106
|
-
- ext/ae-flag
|
107
|
-
- ext/ae-flag/ae-flag.conf
|
108
|
-
- ext/ae-flag/ae-flag.rb
|
109
86
|
- tcl/BWidget-1.8.0
|
110
87
|
- tcl/BWidget-1.8.0/scrollw.tcl
|
111
88
|
- tcl/BWidget-1.8.0/dropsite.tcl
|
@@ -1,74 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# ae-complete-code.rb - Arcadia Ruby ide
|
3
|
-
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
class CompleteCode < ArcadiaExt
|
8
|
-
def on_after_build(_event)
|
9
|
-
@complete_command=full_command('rct-complete')
|
10
|
-
@doc_command=full_command('rct-doc')
|
11
|
-
@ri_command="ri -T -f plain"
|
12
|
-
@finder_command="rct-meth-args -n"
|
13
|
-
if @complete_command !=nil #system(@rct_complete+" "+__FILE__)
|
14
|
-
Arcadia.attach_listener(self, CompleteCodeEvent)
|
15
|
-
else
|
16
|
-
Arcadia.console(self, 'msg'=>"Warning: Extension ae-complete-code depend upon rct-complete(rcodetools) command (install it or update system path!)", 'level'=>'error')
|
17
|
-
#Arcadia.new_error_msg(self, "Warning: Extension ae-complete-code depend upon rct-complete(rcodetools) command (install it or update system path!)")
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def full_command(_command='rct-complete')
|
22
|
-
_ret = nil
|
23
|
-
RUBY_PLATFORM.include?('win32') ? _sep = ';':_sep=':'
|
24
|
-
ENV['PATH'].split(_sep).each{|_path|
|
25
|
-
_file = File.join(_path, _command)
|
26
|
-
if FileTest.exist?(_file)
|
27
|
-
_ret = _file
|
28
|
-
end
|
29
|
-
}
|
30
|
-
_ret
|
31
|
-
end
|
32
|
-
|
33
|
-
def on_complete_code(_event)
|
34
|
-
if _event.file
|
35
|
-
_event.add_result(self,'candidates'=>candidates(_event.file, _event.row, _event.col))
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def enance(_file, line)
|
40
|
-
|
41
|
-
end
|
42
|
-
|
43
|
-
def candidates(_file, _line, _col)
|
44
|
-
begin
|
45
|
-
_options = "--completion-class-info --dev --fork --line="+_line+" --column="+_col
|
46
|
-
#_options = "--line="+_line+" --column="+_col
|
47
|
-
_cmp_s = "|ruby "+@complete_command+" "+_options+" "+_file
|
48
|
-
_ret = nil
|
49
|
-
open(_cmp_s,"r") do
|
50
|
-
|f|
|
51
|
-
_ret = f.readlines.collect!{| line | line.chomp}
|
52
|
-
#p _ret
|
53
|
-
end
|
54
|
-
if _ret.length == 0
|
55
|
-
_cmp_s_d = _cmp_s+" 2>&1"
|
56
|
-
_error = nil
|
57
|
-
open(_cmp_s_d,"r") do
|
58
|
-
|f|
|
59
|
-
_error = f.readlines.collect!{| line | line.chomp}
|
60
|
-
end
|
61
|
-
if _error != nil && _error.length > 0
|
62
|
-
Arcadia.console(self, 'msg'=>"Syntax error in current source", 'level'=>'error')
|
63
|
-
#Arcadia.new_error_msg(self, "Syntax error in current source")
|
64
|
-
end
|
65
|
-
end
|
66
|
-
_ret
|
67
|
-
rescue Exception => e
|
68
|
-
Arcadia.console(self, 'msg'=>e.to_s, 'level'=>'error')
|
69
|
-
#Arcadia.new_error_msg(self, e.to_s)
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
end
|
74
|
-
|
@@ -1,15 +0,0 @@
|
|
1
|
-
name=doc_code
|
2
|
-
labels=Doc
|
3
|
-
frames=1.1
|
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
|
@@ -1,300 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# ae-doc-code.rb - Arcadia Ruby ide
|
3
|
-
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
class DocCode < ArcadiaExt
|
8
|
-
def on_after_build(_event)
|
9
|
-
@doc_command=full_command('rct-doc')
|
10
|
-
@doc_command=full_command('RCT-DOC') if @doc_command == nil
|
11
|
-
@ri_command=full_command('ri')
|
12
|
-
if @ri_command !=nil #system(@rct_complete+" "+__FILE__)
|
13
|
-
Arcadia.attach_listener(self, DocCodeEvent)
|
14
|
-
#ArcadiaContractListener.new(self, EditorContract, :do_editor_event)
|
15
|
-
else
|
16
|
-
Arcadia.console(self, 'msg'=>"Warning: Extension ae-doc-code depend upon ri command!", 'level'=>'error')
|
17
|
-
#Arcadia.new_error_msg(self, "Warning: Extension ae-doc-code depend upon ri command!")
|
18
|
-
end
|
19
|
-
if @doc_command == nil #system(@rct_complete+" "+__FILE__)
|
20
|
-
Arcadia.console(self, 'msg'=>"Warning: Extension ae-doc-code depend upon rct-doc command!", 'level'=>'error')
|
21
|
-
#Arcadia.new_error_msg(self, "Warning: Extension ae-doc-code depend upon rct-doc command!")
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def full_command(_command='ri')
|
26
|
-
_ret = nil
|
27
|
-
RUBY_PLATFORM.include?('win32') ? _sep = ';':_sep=':'
|
28
|
-
ENV['PATH'].split(_sep).each{|_path|
|
29
|
-
_file = File.join(_path, _command)
|
30
|
-
if FileTest.exist?(_file)
|
31
|
-
_ret = _file
|
32
|
-
end
|
33
|
-
}
|
34
|
-
_ret
|
35
|
-
end
|
36
|
-
|
37
|
-
def on_doc_code(_event)
|
38
|
-
if _event.file && @doc_command != nil
|
39
|
-
res = _event.add_result(self)
|
40
|
-
res.doc = doc(_event)
|
41
|
-
elsif _event.doc_entry
|
42
|
-
_event.add_result(self, 'doc'=>doc_entry(_event.doc_entry),'title'=>_event.doc_entry)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def on_after_doc_code(_event)
|
47
|
-
res = _event.results[0]
|
48
|
-
if res !=nil && res.doc != nil && res.doc.length >0
|
49
|
-
raise_doc_code(_event)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
def raise_doc_code(_context)
|
54
|
-
if @docFrame
|
55
|
-
@docFrame.tkText.delete('1.0','end')
|
56
|
-
else
|
57
|
-
# _height = 140
|
58
|
-
# _width = 550
|
59
|
-
# _context.xdoc = TkWinfo.screenwidth(@arcadia.layout.root)/2 if !_context.xdoc
|
60
|
-
# _context.ydoc = TkWinfo.screenheight(@arcadia.layout.root)/2 if !_context.ydoc
|
61
|
-
# _x = _context.xdoc - _width/2
|
62
|
-
# _y = _context.ydoc - _height -20
|
63
|
-
# _x = 0 if _x < 0
|
64
|
-
# _y = 0 if _y < 0
|
65
|
-
# @docFrame = TkDocframe.new(@arcadia.layout.root).place('x'=>_x, 'y'=>_y, 'width'=>_width, 'height'=>_height)
|
66
|
-
|
67
|
-
@docFrame = TkDocframe.new(self.frame)
|
68
|
-
# do_close = proc{
|
69
|
-
# @docFrame.tframe.destroy
|
70
|
-
# @docFrame = nil
|
71
|
-
# Tk.callback_break
|
72
|
-
# }
|
73
|
-
# @docFrame.tframe.on_close = do_close
|
74
|
-
|
75
|
-
@docFrame.tkText.bind_append('KeyPress'){|e|
|
76
|
-
case e.keysym
|
77
|
-
when 'Escape'
|
78
|
-
do_close.call
|
79
|
-
end
|
80
|
-
}
|
81
|
-
@docFrame.tkText.font(conf('font'))
|
82
|
-
@docFrame.tkText.foreground(conf('color.foreground'))
|
83
|
-
@docFrame.tkText.background(conf('color.background'))
|
84
|
-
end
|
85
|
-
res = _context.results[0]
|
86
|
-
if res.doc
|
87
|
-
@docFrame.tkText.insert('end', res.doc.to_s)
|
88
|
-
@docFrame.tframe.title(res.title) if res.title
|
89
|
-
else
|
90
|
-
Arcadia.console(self,'msg'=>'???')
|
91
|
-
#Arcadia.new_msg(self, 'nulla di dire !')
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
|
-
def doc_entry(_entry=nil)
|
96
|
-
_ret = nil
|
97
|
-
if _entry
|
98
|
-
_cmp_doc = "|ruby #{@ri_command} -T -f plain #{_entry}"
|
99
|
-
_cmp_doc = "|ruby "+@ri_command+" -T -f plain "+_entry
|
100
|
-
open (_cmp_doc) do |f|
|
101
|
-
_ret = f.readlines
|
102
|
-
end
|
103
|
-
end
|
104
|
-
_ret
|
105
|
-
end
|
106
|
-
|
107
|
-
def doc(_context)
|
108
|
-
begin
|
109
|
-
_options = "--line="+_context.row+" --column="+_context.col
|
110
|
-
_cmp_s = "|ruby " + @doc_command +" --use-method-analyzer "+_options +" " +_context.file
|
111
|
-
_ret = nil
|
112
|
-
_doc = nil
|
113
|
-
open(_cmp_s,"r") do
|
114
|
-
|f|
|
115
|
-
_doc = f.readlines.collect!{| line | line.chomp}.to_s.strip
|
116
|
-
end
|
117
|
-
if _doc.length > 0
|
118
|
-
_context.results[0].title = _doc.to_s if _context.results[0]
|
119
|
-
_ret = doc_entry(_context.results[0].title)
|
120
|
-
end
|
121
|
-
_ret
|
122
|
-
|
123
|
-
rescue Exception => e
|
124
|
-
_msg = e.to_s + "\n"
|
125
|
-
e.backtrace.each{|line| _msg = _msg + line + "\n"}
|
126
|
-
Arcadia.console(self, 'msg'=>_msg, 'level'=>'error')
|
127
|
-
#Arcadia.new_error_msg(self, _msg)
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
|
-
|
132
|
-
# def do_editor_event(_event)
|
133
|
-
# case _event.signature
|
134
|
-
# when EditorContract::DOC_CODE
|
135
|
-
# if _event.context.file && @doc_command != nil
|
136
|
-
# _event.context.doc = doc(_event.context)
|
137
|
-
# if _event.context.doc != nil && _event.context.doc.length >0
|
138
|
-
# raise_doc_code(_event.context)
|
139
|
-
# end
|
140
|
-
# elsif _event.context.doc_entry
|
141
|
-
# _event.context.doc = doc_entry(_event.context.doc_entry)
|
142
|
-
# _event.context.text = _event.context.doc_entry
|
143
|
-
# if _event.context.doc != nil && _event.context.doc.length >0
|
144
|
-
# raise_doc_code(_event.context)
|
145
|
-
# end
|
146
|
-
# end
|
147
|
-
# _event.handled(self)
|
148
|
-
# when EditorContract::BUILD_DOC_TREE
|
149
|
-
# build_doc_tree
|
150
|
-
# end
|
151
|
-
# end
|
152
|
-
|
153
|
-
def build_doc_tree
|
154
|
-
if !@doc_tree
|
155
|
-
@image_class = TkPhotoImage.new('dat' => ARROW_RIGHT_GIF)
|
156
|
-
@image_def = TkPhotoImage.new('dat' => TREE_NODE_DEF_GIF)
|
157
|
-
@image_def_class = TkPhotoImage.new('dat' => TREE_NODE_DEFCLASS_GIF)
|
158
|
-
do_select_item = proc{|_self|
|
159
|
-
if _self.selection_get[0].length >0
|
160
|
-
_selected = rif_2_node(_self.selection_get[0])
|
161
|
-
end
|
162
|
-
if _selected
|
163
|
-
EditorContract.instance.doc_code(self, 'doc_entry'=>_selected)
|
164
|
-
end
|
165
|
-
}
|
166
|
-
_background = conf('color.background')
|
167
|
-
_foreground = conf('color.foreground')
|
168
|
-
@doc_tree = Tk::BWidget::Tree.new(self.frame){
|
169
|
-
relief 'flat'
|
170
|
-
showlines false
|
171
|
-
deltay 18
|
172
|
-
background _background
|
173
|
-
crossfill _foreground
|
174
|
-
selectcommand proc{ do_select_item.call(self) }
|
175
|
-
place('relwidth' => 1,'relx' => 0,'x' => '0','y' => '0','relheight' => '1')
|
176
|
-
}
|
177
|
-
|
178
|
-
_scrollcommand = proc{|*args| @doc_tree.yview(*args)}
|
179
|
-
_scrollbar = TkScrollbar.new(self.frame, Arcadia.style('scrollbar')){|s|
|
180
|
-
width 8
|
181
|
-
command _scrollcommand
|
182
|
-
}.pack('side'=>'right', 'fill'=>'y')
|
183
|
-
@doc_tree.yscrollcommand proc{|first,last| _scrollbar.set(first,last)}
|
184
|
-
|
185
|
-
names = doc_entry('--list-names')
|
186
|
-
|
187
|
-
@progress_bar = TkProgressframe.new(@arcadia.layout.root, names.length)
|
188
|
-
@progress_bar.title('Building doc')
|
189
|
-
@cancell=false
|
190
|
-
@progress_bar.on_cancel=proc{cancel}
|
191
|
-
#@hash_rif = Hash.new
|
192
|
-
@level = 0
|
193
|
-
@last_nodes = Array.new
|
194
|
-
Thread.new do
|
195
|
-
_last_value = ''
|
196
|
-
#p 'n�='+ names.length.to_s
|
197
|
-
names.sort.each do |value|
|
198
|
-
_value = value.chomp.strip
|
199
|
-
if _value != _last_value
|
200
|
-
node(_value)
|
201
|
-
@progress_bar.title(_value)
|
202
|
-
_last_value = _value
|
203
|
-
end
|
204
|
-
@progress_bar.progress
|
205
|
-
if @cancell
|
206
|
-
@progress_bar.destroy
|
207
|
-
@progress_bar = nil
|
208
|
-
break
|
209
|
-
end
|
210
|
-
end
|
211
|
-
progress_bar.destroy if @progress_bar != nil
|
212
|
-
end
|
213
|
-
end
|
214
|
-
end
|
215
|
-
|
216
|
-
def cancel
|
217
|
-
@cancell=true
|
218
|
-
end
|
219
|
-
|
220
|
-
def node_2_rif(_path)
|
221
|
-
return _path.gsub('#','@M@').gsub('::','@C@').gsub('|','@P@').gsub('^','@U@')
|
222
|
-
end
|
223
|
-
|
224
|
-
def rif_2_node(_rif)
|
225
|
-
return _rif.gsub('@M@','#').gsub('@C@', '::').gsub('@P@', '|').gsub('@U@', '^')
|
226
|
-
end
|
227
|
-
|
228
|
-
def node(_path)
|
229
|
-
# _rif = @hash_rif.length
|
230
|
-
_rif = node_2_rif(_path)
|
231
|
-
_parent_found = false
|
232
|
-
while !_parent_found && @level > 0 do
|
233
|
-
@level = @level - 1
|
234
|
-
if (@last_nodes[@level] != nil) && _path.include?(@last_nodes[@level])
|
235
|
-
_full_value = _path.sub(@last_nodes[@level],'')
|
236
|
-
if _full_value[0..1].include?('#')
|
237
|
-
_sep = '#'
|
238
|
-
_value = _full_value[1.._full_value.length-1]
|
239
|
-
_parent_found = true
|
240
|
-
elsif _full_value[0..2].include?('::')
|
241
|
-
_sep = '::'
|
242
|
-
_value = _full_value[2.._full_value.length-1]
|
243
|
-
_parent_found = true
|
244
|
-
else
|
245
|
-
_parent_found = false
|
246
|
-
end
|
247
|
-
end
|
248
|
-
end
|
249
|
-
if _parent_found
|
250
|
-
_parent_path = @last_nodes[@level]
|
251
|
-
#_parent_rif = @hash_rif[_parent_path]
|
252
|
-
_parent_rif = node_2_rif(_parent_path)
|
253
|
-
@level = @level + 1
|
254
|
-
else
|
255
|
-
_parent_rif = 'root'
|
256
|
-
_sep = ''
|
257
|
-
_value = _path
|
258
|
-
end
|
259
|
-
|
260
|
-
#@hash_rif[_path]= _rif
|
261
|
-
@last_nodes[@level] = _path
|
262
|
-
_background = conf('color.background')
|
263
|
-
|
264
|
-
if _sep.length == 0
|
265
|
-
_image = @image_class
|
266
|
-
elsif _sep.include?('#')
|
267
|
-
_image = @image_def
|
268
|
-
elsif _sep.include?('::')
|
269
|
-
_image = @image_def_class
|
270
|
-
end
|
271
|
-
|
272
|
-
@doc_tree.insert('end', _parent_rif ,_rif, {
|
273
|
-
'text' => _value ,
|
274
|
-
'helptext' => _path,
|
275
|
-
'deltax'=>-1,
|
276
|
-
'image'=>_image
|
277
|
-
}
|
278
|
-
)
|
279
|
-
@level = @level + 1
|
280
|
-
end
|
281
|
-
end
|
282
|
-
|
283
|
-
class TkDocframe
|
284
|
-
attr_reader :tkText
|
285
|
-
attr_reader :tframe
|
286
|
-
def initialize(_tframe)
|
287
|
-
@tframe = _tframe
|
288
|
-
@tkText = TkText.new(_tframe.hinner_frame,
|
289
|
-
'wrap'=>'none',
|
290
|
-
'relief'=>'groove'
|
291
|
-
){|j|
|
292
|
-
TkScrollbar.new(j, Arcadia.style('scrollbar')){|s|
|
293
|
-
width 8
|
294
|
-
command proc{|*args| j.yview(*args)}
|
295
|
-
j.yscrollcommand proc{|first,last| s.set first,last}
|
296
|
-
}.pack('side'=>'right', 'fill'=>'y')
|
297
|
-
}.place('x'=>0, 'y'=>0, 'relheight'=> 1, 'relwidth'=> 1)
|
298
|
-
|
299
|
-
end
|
300
|
-
end
|