arcadia 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +39 -38
- data/bin/arc +3 -0
- data/bin/arcadia +0 -1
- data/conf/arcadia.conf +54 -35
- data/conf/arcadia.init.rb +26 -3
- data/conf/arcadia.res.rb +56 -4
- data/ext/ae-breakpoints/ae-breakpoints.rb +1 -1
- data/ext/ae-dir-projects/ae-dir-projects.rb +113 -45
- data/ext/ae-editor/ae-editor.conf +6 -2
- data/ext/ae-editor/ae-editor.rb +1009 -616
- data/ext/ae-editor/langs/coderay.tokens +40 -0
- data/ext/ae-editor/langs/conf.lang +12 -10
- data/ext/ae-editor/langs/erb.lang.bind +1 -0
- data/ext/ae-editor/langs/java.lang +4 -0
- data/ext/ae-editor/langs/rb.lang +25 -55
- data/ext/ae-editor/langs/rhtml.lang +4 -0
- data/ext/ae-editor/langs/tokens.lang.bind +1 -0
- data/ext/ae-editor/langs/xml.lang +4 -0
- data/ext/ae-file-history/ae-file-history.rb +140 -32
- data/ext/ae-output/ae-output.rb +267 -262
- data/ext/ae-rad/ae-rad-inspector.rb +1 -1
- data/ext/ae-rad/ae-rad-libs.rb +15 -7
- data/ext/ae-rad/ae-rad.conf +4 -4
- data/ext/ae-rad/lib/tk/al-tk.rb +4 -3
- data/ext/ae-ruby-debug/ae-ruby-debug.conf +4 -2
- data/ext/ae-ruby-debug/ae-ruby-debug.rb +40 -15
- data/ext/ae-search-in-files/ae-search-in-files.rb +70 -14
- data/ext/ae-search-in-files/ext/ack-in-files/ack-in-files.conf +15 -0
- data/ext/ae-search-in-files/ext/ack-in-files/ack-in-files.rb +80 -0
- data/ext/ae-shell/ae-shell.conf +4 -1
- data/ext/ae-shell/ae-shell.rb +78 -43
- data/ext/test-shutdown-after-startup/test-shutdown-after-startup.conf +4 -0
- data/ext/test-shutdown-after-startup/test-shutdown-after-startup.rb +20 -0
- data/lib/a-commons.rb +118 -22
- data/lib/a-contracts.rb +46 -2
- data/lib/a-core.rb +970 -284
- data/lib/a-tkcommons.rb +16 -8
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/ArrowButton.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/BWidget.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/Button.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/ButtonBox.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/ComboBox.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/Dialog.html +20 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/DragSite.html +6 -4
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/DropSite.html +15 -3
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/DynamicHelp.html +8 -5
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/Entry.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/Label.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/LabelEntry.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/LabelFrame.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/ListBox.html +1 -1
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/MainFrame.html +8 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/MessageDlg.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/NoteBook.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/PagesManager.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/PanedWindow.html +21 -5
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/PanelFrame.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/PasswdDlg.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/ProgressBar.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/ProgressDlg.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/ScrollView.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/ScrollableFrame.html +5 -2
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/ScrolledWindow.html +36 -4
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/SelectColor.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/SelectFont.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/Separator.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/SpinBox.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/StatusBar.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/TitleFrame.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/Tree.html +21 -31
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/Widget.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/contents.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/index.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/navtree.html +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/BWman/options.htm +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/CHANGES.txt +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/ChangeLog +289 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/LICENSE.txt +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/README.txt +2 -2
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/arrow.tcl +1 -1
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/bitmap.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/button.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/buttonbox.tcl +23 -12
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/color.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/combobox.tcl +101 -25
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/demo/basic.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/demo/bwidget.xbm +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/demo/demo.tcl +1 -1
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/demo/dnd.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/demo/manager.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/demo/select.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/demo/tmpldlg.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/demo/tree.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/demo/x1.xbm +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/dialog.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/dragsite.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/dropsite.tcl +2 -1
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/dynhelp.tcl +194 -33
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/entry.tcl +8 -5
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/font.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/bold.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/copy.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/cut.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/dragfile.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/dragicon.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/error.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/file.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/folder.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/hourglass.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/info.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/italic.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/minus.xbm +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/new.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/opcopy.xbm +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/open.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/openfold.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/oplink.xbm +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/opmove.xbm +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/overstrike.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/palette.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/passwd.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/paste.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/plus.xbm +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/print.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/question.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/redo.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/save.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/target.xbm +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/underline.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/undo.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/images/warning.gif +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/init.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/label.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/labelentry.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/labelframe.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/lang/da.rc +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/lang/de.rc +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/lang/en.rc +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/lang/es.rc +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/lang/fr.rc +0 -0
- data/tcl/BWidget-1.9.0/lang/hu.rc +52 -0
- data/tcl/BWidget-1.9.0/lang/nl.rc +52 -0
- data/tcl/BWidget-1.9.0/lang/no.rc +52 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/listbox.tcl +89 -34
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/mainframe.tcl +14 -13
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/messagedlg.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/notebook.tcl +3 -1
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/pagesmgr.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/panedw.tcl +22 -18
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/panelframe.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/passwddlg.tcl +7 -3
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/pkgIndex.tcl +2 -2
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/progressbar.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/progressdlg.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/scrollframe.tcl +60 -24
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/scrollview.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/scrollw.tcl +13 -11
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/separator.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/spinbox.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/statusbar.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/tests/entry.test +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/titleframe.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/tree.tcl +51 -41
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/utils.tcl +26 -11
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/widget.tcl +53 -19
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/wizard.tcl +0 -0
- data/tcl/{BWidget-1.8.0 → BWidget-1.9.0}/xpm2image.tcl +0 -0
- metadata +170 -145
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#coderay.classes=annotation,attribute_name,attribute_name_fat,attribute_value,attribute_value_fat,bin,char,class,class_variable,color,comment,constant,content,definition,delimiter,directive,doc,doctype,doc_string,entity,error,escape,exception,float,function,global_variable,hex,important,include,inline,inline_delimiter,instance_variable,integer,interpreted,keyword,key,label,local_variable,modifier,oct,operator_fat,pre_constant,pre_type,predefined,preprocessor,pseudo_class,regexp,reserved,shell,string,symbol,tag,tag_fat,tag_special,type,variable,value,xml_text,insert,delete,change,head,
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
coderay.classes=reserved,method,class,char,comment,instance_variable,constant,string,content,integer
|
|
5
|
+
coderay.hightlight.reserved.foreground=>>>hightlight.reserved.foreground
|
|
6
|
+
coderay.hightlight.reserved.style=bold
|
|
7
|
+
coderay.hightlight.method.foreground=>>>hightlight.method.foreground
|
|
8
|
+
coderay.hightlight.method.style=bold
|
|
9
|
+
coderay.hightlight.class.foreground=>>>hightlight.class.foreground
|
|
10
|
+
coderay.hightlight.class.style=bold
|
|
11
|
+
coderay.hightlight.module_name.foreground=>>>hightlight.class.foreground
|
|
12
|
+
coderay.hightlight.module_name.style=bold
|
|
13
|
+
coderay.hightlight.instance_variable.foreground=>>>hightlight.instance_variable.foreground
|
|
14
|
+
coderay.hightlight.instance_variable.style=bold
|
|
15
|
+
coderay.hightlight.constant.foreground=>>>hightlight.constant.foreground
|
|
16
|
+
coderay.hightlight.constant.style=bold
|
|
17
|
+
coderay.hightlight.global_variable.foreground=>>>hightlight.global_variable.foreground
|
|
18
|
+
coderay.hightlight.global_variable.style=bold
|
|
19
|
+
coderay.hightlight.comment.foreground=>>>hightlight.comment.foreground
|
|
20
|
+
coderay.hightlight.content.foreground=>>>hightlight.string.foreground
|
|
21
|
+
coderay.hightlight.char.foreground=>>>hightlight.string.foreground
|
|
22
|
+
coderay.hightlight.char.style=bold
|
|
23
|
+
coderay.hightlight.string.foreground=>>>hightlight.string.foreground
|
|
24
|
+
coderay.hightlight.integer.foreground=>>>hightlight.number.foreground
|
|
25
|
+
coderay.hightlight.symbol.foreground=>>>hightlight.symbol.foreground
|
|
26
|
+
|
|
27
|
+
coderay.hightlight.attribute_name.foreground=>>>hightlight.reserved.foreground
|
|
28
|
+
coderay.hightlight.attribute_name.style=bold
|
|
29
|
+
coderay.hightlight.tag.foreground=>>>hightlight.tag.foreground
|
|
30
|
+
coderay.hightlight.tag.style=bold
|
|
31
|
+
coderay.hightlight.preprocessor.foreground=>>>hightlight.class.foreground
|
|
32
|
+
coderay.hightlight.preprocessor.style=bold
|
|
33
|
+
coderay.hightlight.inline_delimiter.foreground=>>>hightlight.string.foreground
|
|
34
|
+
coderay.hightlight.inline_delimiter.style=bold
|
|
35
|
+
coderay.hightlight.keyword.foreground=>>>hightlight.reserved.foreground
|
|
36
|
+
coderay.hightlight.keyword.style=bold
|
|
37
|
+
coderay.hightlight.directive.foreground=>>>hightlight.reserved.foreground
|
|
38
|
+
coderay.hightlight.directive.style=bold
|
|
39
|
+
coderay.hightlight.type.foreground=>>>hightlight.reserved.foreground
|
|
40
|
+
coderay.hightlight.type.style=bold
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
scanner=re
|
|
2
|
+
language=conf
|
|
3
|
+
re.classes=key,value,operator,comment,link
|
|
2
4
|
re.key=(.*)\=
|
|
3
5
|
re.value=\=(.*)
|
|
4
6
|
re.operator=\=
|
|
@@ -15,12 +17,12 @@ re_op.only_first=operator
|
|
|
15
17
|
#hightlight.operator.foreground=red
|
|
16
18
|
#hightlight.operator.style=bold
|
|
17
19
|
|
|
18
|
-
hightlight.comment.foreground=>>>hightlight.11.foreground
|
|
19
|
-
hightlight.key.foreground=>>>hightlight.5.foreground
|
|
20
|
-
hightlight.key.style=bold
|
|
21
|
-
hightlight.value.foreground=>>>hightlight.6.foreground
|
|
22
|
-
hightlight.value.style=bold
|
|
23
|
-
hightlight.operator.foreground=>>>hightlight.14.foreground
|
|
24
|
-
hightlight.operator.style=bold
|
|
25
|
-
hightlight.link.foreground=>>>hightlight.12.foreground
|
|
26
|
-
hightlight.link.style=bold
|
|
20
|
+
re.hightlight.comment.foreground=>>>hightlight.11.foreground
|
|
21
|
+
re.hightlight.key.foreground=>>>hightlight.5.foreground
|
|
22
|
+
re.hightlight.key.style=bold
|
|
23
|
+
re.hightlight.value.foreground=>>>hightlight.6.foreground
|
|
24
|
+
re.hightlight.value.style=bold
|
|
25
|
+
re.hightlight.operator.foreground=>>>hightlight.14.foreground
|
|
26
|
+
re.hightlight.operator.style=bold
|
|
27
|
+
re.hightlight.link.foreground=>>>hightlight.12.foreground
|
|
28
|
+
re.hightlight.link.style=bold
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bind=rhtml
|
data/ext/ae-editor/langs/rb.lang
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
language=ruby
|
|
2
|
+
|
|
3
|
+
scanner=coderay
|
|
4
|
+
#scanner=re
|
|
5
|
+
re.classes=number,method_name,class_name,module_name,keyword,instance_variable,global_variable,symbol,operator,string,comment
|
|
2
6
|
re.keyword=\b(and|or|unless|end|in|begin|defined?|ensure|redo|super|until|BEGIN|break|do|false|next|rescue|then|when|END|case|else|for|nil|retry|true|while|alias|elsif|if|not|return|undef|yield|require|include)([\(\s\n])|\b(self)([.,+\(\s])|__LINE__|__FILE__|[\s]*def[\s]|[\s]*module[\s]|[\s]*class[\s]
|
|
3
7
|
re.method_name=(def[\s][\s]*)[A-Za-z0-9_]*
|
|
4
8
|
re.instance_variable=([\s]*@)[A-Za-z0-9_]*
|
|
@@ -46,58 +50,24 @@ hightlight.spaces.relief=>>>hightlight.4.relief
|
|
|
46
50
|
#+--------------------------------------------------
|
|
47
51
|
|
|
48
52
|
# custom classes
|
|
49
|
-
hightlight.keyword.foreground=>>>hightlight.5.foreground
|
|
50
|
-
hightlight.keyword.style=bold
|
|
51
|
-
hightlight.method_name.foreground=>>>hightlight.6.foreground
|
|
52
|
-
hightlight.method_name.style=bold
|
|
53
|
-
hightlight.class_name.foreground=>>>hightlight.7.foreground
|
|
54
|
-
hightlight.class_name.style=bold
|
|
55
|
-
hightlight.module_name.foreground=>>>hightlight.8.foreground
|
|
56
|
-
hightlight.module_name.style=bold
|
|
57
|
-
hightlight.instance_variable.foreground=>>>hightlight.9.foreground
|
|
58
|
-
hightlight.instance_variable.style=bold
|
|
59
|
-
hightlight.global_variable.foreground=>>>hightlight.10.foreground
|
|
60
|
-
hightlight.global_variable.style=bold
|
|
61
|
-
hightlight.comment.foreground=>>>hightlight.11.foreground
|
|
62
|
-
hightlight.string.foreground=>>>hightlight.12.foreground
|
|
63
|
-
hightlight.number.foreground=>>>hightlight.13.foreground
|
|
64
|
-
hightlight.operator.foreground=>>>hightlight.14.foreground
|
|
65
|
-
hightlight.operator.style=bold
|
|
66
|
-
hightlight.symbol.foreground=>>>hightlight.15.foreground
|
|
67
|
-
hightlight.symbol.style=bold
|
|
68
|
-
|
|
53
|
+
re.hightlight.keyword.foreground=>>>hightlight.5.foreground
|
|
54
|
+
re.hightlight.keyword.style=bold
|
|
55
|
+
re.hightlight.method_name.foreground=>>>hightlight.6.foreground
|
|
56
|
+
re.hightlight.method_name.style=bold
|
|
57
|
+
re.hightlight.class_name.foreground=>>>hightlight.7.foreground
|
|
58
|
+
re.hightlight.class_name.style=bold
|
|
59
|
+
re.hightlight.module_name.foreground=>>>hightlight.8.foreground
|
|
60
|
+
re.hightlight.module_name.style=bold
|
|
61
|
+
re.hightlight.instance_variable.foreground=>>>hightlight.9.foreground
|
|
62
|
+
re.hightlight.instance_variable.style=bold
|
|
63
|
+
re.hightlight.global_variable.foreground=>>>hightlight.10.foreground
|
|
64
|
+
re.hightlight.global_variable.style=bold
|
|
65
|
+
re.hightlight.comment.foreground=>>>hightlight.11.foreground
|
|
66
|
+
re.hightlight.string.foreground=>>>hightlight.12.foreground
|
|
67
|
+
re.hightlight.number.foreground=>>>hightlight.13.foreground
|
|
68
|
+
re.hightlight.operator.foreground=>>>hightlight.14.foreground
|
|
69
|
+
re.hightlight.operator.style=bold
|
|
70
|
+
re.hightlight.symbol.foreground=>>>hightlight.15.foreground
|
|
71
|
+
re.hightlight.symbol.style=bold
|
|
69
72
|
|
|
70
|
-
|
|
71
|
-
#hightlight.keyword.style=bold
|
|
72
|
-
#hightlight.method_name.color.foreground=#007F7F
|
|
73
|
-
#hightlight.method_name.style=bold
|
|
74
|
-
#hightlight.class_name.color.foreground=#0000FF
|
|
75
|
-
#hightlight.class_name.style=bold
|
|
76
|
-
#hightlight.module_name.color.foreground=#0000FF
|
|
77
|
-
#hightlight.module_name.style=bold
|
|
78
|
-
#hightlight.instance_variable.color.foreground=#7F7F7F
|
|
79
|
-
#hightlight.instance_variable.style=bold
|
|
80
|
-
#hightlight.global_variable.style=bold
|
|
81
|
-
#hightlight.global_variable.color.foreground=#db66ca
|
|
82
|
-
#hightlight.comment.color.foreground=#007F00
|
|
83
|
-
#hightlight.string.color.foreground=#7F007F
|
|
84
|
-
#hightlight.number.color.foreground=#007F7F
|
|
85
|
-
#hightlight.capitalize.color.foreground=#0000FF
|
|
86
|
-
#hightlight.operator.color.foreground=#000000
|
|
87
|
-
#hightlight.operator.style=bold
|
|
88
|
-
#hightlight.symbol.color.foreground=#bdc175
|
|
89
|
-
#hightlight.symbol.style=bold
|
|
90
|
-
#hightlight.sel.color.foreground=black
|
|
91
|
-
#hightlight.sel.color.background=#68f914
|
|
92
|
-
#hightlight.sel.borderwidth=1
|
|
93
|
-
#hightlight.sel.relief=raised
|
|
94
|
-
#hightlight.goto.color.foreground=blue
|
|
95
|
-
#hightlight.selected.color.background=yellow
|
|
96
|
-
#hightlight.tabs.color.foreground=black
|
|
97
|
-
#hightlight.tabs.color.background=#b1cfba
|
|
98
|
-
#hightlight.tabs.borderwidth=1
|
|
99
|
-
#hightlight.tabs.relief=raised
|
|
100
|
-
#hightlight.spaces.color.foreground=black
|
|
101
|
-
#hightlight.spaces.color.background=#d9f42b
|
|
102
|
-
#hightlight.spaces.borderwidth=1
|
|
103
|
-
#hightlight.spaces.relief=raised
|
|
73
|
+
@include=coderay.tokens
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bind=conf
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
# ae-file-history.rb - Arcadia Ruby ide
|
|
3
3
|
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
|
4
4
|
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
5
|
+
# &require_dir_ref=../..
|
|
6
|
+
# &require_omissis=conf/arcadia.init
|
|
7
|
+
# &require_omissis=lib/a-commons
|
|
8
|
+
# &require_omissis=lib/a-tkcommons
|
|
9
|
+
# &require_omissis=lib/a-core
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class TreeNode
|
|
@@ -45,7 +45,9 @@ class TreeNode
|
|
|
45
45
|
break if node != nil
|
|
46
46
|
}
|
|
47
47
|
if node == nil
|
|
48
|
-
if _path
|
|
48
|
+
if _path == '/' || _path == '\\'
|
|
49
|
+
# ok -- we have the root
|
|
50
|
+
elsif _path.length > 0 && (_path.include?("/")||_path.include?("\\"))
|
|
49
51
|
_path.include?("/")?_sep="/":_sep="\\"
|
|
50
52
|
_parent_length = _path.length - _path.split(_sep)[-1].length
|
|
51
53
|
_parent_path = _path[0.._parent_length-2]
|
|
@@ -102,9 +104,6 @@ class FilesHistrory < ArcadiaExt
|
|
|
102
104
|
Tk::BWidget::DynamicHelp::add(@cb_sync,
|
|
103
105
|
'text'=>'Link open editors with content in the Navigator')
|
|
104
106
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
107
|
do_check = proc {
|
|
109
108
|
if @cb_sync.cget('onvalue')==@cb_sync.cget('variable').value.to_i
|
|
110
109
|
sync_on
|
|
@@ -116,24 +115,15 @@ class FilesHistrory < ArcadiaExt
|
|
|
116
115
|
@cb_sync.command(do_check)
|
|
117
116
|
|
|
118
117
|
do_select_item = proc{|_self|
|
|
119
|
-
|
|
120
|
-
_selected = ""
|
|
121
|
-
_self.selection_get[0].each{|_block|
|
|
122
|
-
_selected = _selected + _block.to_s + "\s"
|
|
123
|
-
}
|
|
124
|
-
_selected = _selected.strip
|
|
125
|
-
else
|
|
126
|
-
_selected = _self.selection_get[0]
|
|
127
|
-
end
|
|
118
|
+
_selected = self.selected
|
|
128
119
|
_dir, _file = _selected.sub("%%%",":").split('@@@')
|
|
129
120
|
if _file
|
|
130
121
|
_file = File.expand_path( _file , _dir )
|
|
131
|
-
else
|
|
132
|
-
_file = Tk.getOpenFile('initialdir'=>_dir)
|
|
122
|
+
# else
|
|
123
|
+
# _file = Tk.getOpenFile('initialdir'=>_dir)
|
|
133
124
|
end
|
|
134
125
|
if _file && _file.strip.length > 0
|
|
135
|
-
Arcadia.process_event(
|
|
136
|
-
#EditorContract.instance.open_file(self,'file'=>_file)
|
|
126
|
+
Arcadia.process_event(OpenBufferTransientEvent.new(self,'file'=>_file))
|
|
137
127
|
end
|
|
138
128
|
}
|
|
139
129
|
|
|
@@ -147,7 +137,7 @@ class FilesHistrory < ArcadiaExt
|
|
|
147
137
|
@font = Arcadia.conf('treeitem.font')
|
|
148
138
|
@font_b = "#{Arcadia.conf('treeitem.font')} bold"
|
|
149
139
|
|
|
150
|
-
@htree =
|
|
140
|
+
@htree = BWidgetTreePatched.new(self.frame.hinner_frame, Arcadia.style('treepanel')){
|
|
151
141
|
showlines false
|
|
152
142
|
deltay 18
|
|
153
143
|
opencmd proc{|node| do_open_folder.call(node)}
|
|
@@ -164,8 +154,29 @@ class FilesHistrory < ArcadiaExt
|
|
|
164
154
|
# command _scrollcommand
|
|
165
155
|
# }.pack('side'=>'right', 'fill'=>'y')
|
|
166
156
|
# @htree.yscrollcommand proc{|first,last| _scrollbar.set(first,last)}
|
|
157
|
+
|
|
158
|
+
do_double_click = proc{
|
|
159
|
+
_selected = @htree.selection_get[0]
|
|
160
|
+
_dir, _file = _selected.sub("%%%",":").split('@@@')
|
|
161
|
+
if _dir && _file.nil? && File.ftype(node2file(_dir)) == 'directory'
|
|
162
|
+
_file = Tk.getOpenFile('initialdir'=>node2file(_dir))
|
|
163
|
+
if _file && _file.strip.length > 0
|
|
164
|
+
Arcadia.process_event(OpenBufferTransientEvent.new(self,'file'=>_file))
|
|
165
|
+
end
|
|
166
|
+
# if !_selected.nil? && @htree.open?(node2file(_selected))
|
|
167
|
+
# @htree.close_tree(node2file(_selected))
|
|
168
|
+
# elsif !_selected.nil?
|
|
169
|
+
# @htree.open_tree(node2file(_selected),false)
|
|
170
|
+
# do_open_folder.call(_selected)
|
|
171
|
+
# end
|
|
172
|
+
end
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@htree.textbind_append('Double-1',do_double_click)
|
|
167
176
|
|
|
168
|
-
|
|
177
|
+
self.build_tree
|
|
178
|
+
self.pop_up_menu_tree
|
|
179
|
+
|
|
169
180
|
end
|
|
170
181
|
|
|
171
182
|
def on_after_build(_event)
|
|
@@ -196,6 +207,44 @@ class FilesHistrory < ArcadiaExt
|
|
|
196
207
|
# end
|
|
197
208
|
# end
|
|
198
209
|
|
|
210
|
+
def node2file(_node)
|
|
211
|
+
if _node[0..0]=='{' && _node[-1..-1]=='}'
|
|
212
|
+
return _node[1..-2]
|
|
213
|
+
else
|
|
214
|
+
return _node
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
def file2node(_file)
|
|
219
|
+
if _file.include?("\s") && _file[0..0]!='{'
|
|
220
|
+
return "{#{_file}}"
|
|
221
|
+
else
|
|
222
|
+
return _file
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def selected
|
|
228
|
+
if @htree.selection_get[0]
|
|
229
|
+
if @htree.selection_get[0].length >0
|
|
230
|
+
_selected = ""
|
|
231
|
+
if String.method_defined?(:lines)
|
|
232
|
+
selection_lines = @htree.selection_get[0].lines
|
|
233
|
+
else
|
|
234
|
+
selection_lines = @htree.selection_get[0].split("\n")
|
|
235
|
+
end
|
|
236
|
+
selection_lines.each{|_block|
|
|
237
|
+
_selected = _selected + _block.to_s + "\s"
|
|
238
|
+
}
|
|
239
|
+
_selected = _selected.strip
|
|
240
|
+
else
|
|
241
|
+
_selected = @htree.selection_get[0]
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
return _selected
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
|
|
199
248
|
def select_file_without_event(_file)
|
|
200
249
|
_d, _f = File.split(File.expand_path(_file))
|
|
201
250
|
_d = _d.downcase if is_windows?
|
|
@@ -258,7 +307,7 @@ class FilesHistrory < ArcadiaExt
|
|
|
258
307
|
f = File::open(history_file,'r')
|
|
259
308
|
f_open = $arcadia['pers']['editor.files.open'].split("|") if $arcadia['pers']['editor.files.open']
|
|
260
309
|
begin
|
|
261
|
-
_lines = f.readlines.collect!{| line | line.chomp+"\n" }
|
|
310
|
+
_lines = f.readlines.collect!{| line | line.chomp+"\n" }
|
|
262
311
|
_lines.sort.each{|_line|
|
|
263
312
|
_file = _line.split(';')[0]
|
|
264
313
|
if FileTest::exist?(_file)
|
|
@@ -286,12 +335,69 @@ class FilesHistrory < ArcadiaExt
|
|
|
286
335
|
|
|
287
336
|
#@image_kdir = TkPhotoImage.new('dat' => BOOK_GIF)
|
|
288
337
|
@image_kdir = TkPhotoImage.new('dat' => ICON_FOLDER_OPEN_GIF)
|
|
289
|
-
@image_kfile_rb = TkPhotoImage.new('dat' => RUBY_DOCUMENT_GIF)
|
|
290
|
-
@image_kfile = TkPhotoImage.new('dat' => DOCUMENT_GIF)
|
|
338
|
+
# @image_kfile_rb = TkPhotoImage.new('dat' => RUBY_DOCUMENT_GIF)
|
|
339
|
+
# @image_kfile = TkPhotoImage.new('dat' => DOCUMENT_GIF)
|
|
291
340
|
|
|
292
341
|
build_tree_from_node(root)
|
|
293
342
|
end
|
|
294
343
|
|
|
344
|
+
def pop_up_menu_tree
|
|
345
|
+
@pop_up_tree = TkMenu.new(
|
|
346
|
+
:parent=>@htree,
|
|
347
|
+
:tearoff=>0,
|
|
348
|
+
:title => 'Menu tree'
|
|
349
|
+
)
|
|
350
|
+
@pop_up_tree.configure(Arcadia.style('menu'))
|
|
351
|
+
#----- search submenu
|
|
352
|
+
sub_ref_search = TkMenu.new(
|
|
353
|
+
:parent=>@pop_up,
|
|
354
|
+
:tearoff=>0,
|
|
355
|
+
:title => 'Ref'
|
|
356
|
+
)
|
|
357
|
+
sub_ref_search.configure(Arcadia.style('menu'))
|
|
358
|
+
sub_ref_search.insert('end',
|
|
359
|
+
:command,
|
|
360
|
+
:label=>'Find in files...',
|
|
361
|
+
:hidemargin => false,
|
|
362
|
+
:command=> proc{
|
|
363
|
+
_target = self.selected
|
|
364
|
+
_dir, _file = _target.sub("%%%",":").split('@@@')
|
|
365
|
+
if _dir
|
|
366
|
+
Arcadia.process_event(SearchInFilesEvent.new(self,'dir'=>_dir))
|
|
367
|
+
end
|
|
368
|
+
}
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
sub_ref_search.insert('end',
|
|
372
|
+
:command,
|
|
373
|
+
:label=>'Act in files...',
|
|
374
|
+
:hidemargin => false,
|
|
375
|
+
:command=> proc{
|
|
376
|
+
_target = self.selected
|
|
377
|
+
_dir, _file = _target.sub("%%%",":").split('@@@')
|
|
378
|
+
if _dir
|
|
379
|
+
Arcadia.process_event(AckInFilesEvent.new(self,'dir'=>_dir))
|
|
380
|
+
end
|
|
381
|
+
}
|
|
382
|
+
)
|
|
383
|
+
@pop_up_tree.insert('end',
|
|
384
|
+
:cascade,
|
|
385
|
+
:label=>'Search from here',
|
|
386
|
+
:menu=>sub_ref_search,
|
|
387
|
+
:hidemargin => false
|
|
388
|
+
)
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
@htree.areabind_append("Button-3",
|
|
392
|
+
proc{|x,y|
|
|
393
|
+
_x = TkWinfo.pointerx(@htree)
|
|
394
|
+
_y = TkWinfo.pointery(@htree)
|
|
395
|
+
@pop_up_tree.popup(_x,_y)
|
|
396
|
+
},
|
|
397
|
+
"%x %y")
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
|
|
295
401
|
def add_to_tree(_file)
|
|
296
402
|
_d, _f = File.split(File.expand_path(_file))
|
|
297
403
|
return if _f.nil?
|
|
@@ -352,10 +458,12 @@ class FilesHistrory < ArcadiaExt
|
|
|
352
458
|
def image(_kind, _label='.rb')
|
|
353
459
|
if _kind == 'KDir'
|
|
354
460
|
return @image_kdir
|
|
355
|
-
elsif _kind == 'KFile'
|
|
356
|
-
return
|
|
357
|
-
|
|
358
|
-
return @
|
|
461
|
+
elsif _kind == 'KFile'
|
|
462
|
+
return Arcadia.file_icon(_label)
|
|
463
|
+
# elsif _kind == 'KFile' && _label.include?('.rb')
|
|
464
|
+
# return @image_kfile_rb
|
|
465
|
+
# else
|
|
466
|
+
# return @image_kfile
|
|
359
467
|
end
|
|
360
468
|
end
|
|
361
469
|
|
|
@@ -422,4 +530,4 @@ class FilesHistrory < ArcadiaExt
|
|
|
422
530
|
end
|
|
423
531
|
end
|
|
424
532
|
end
|
|
425
|
-
end
|
|
533
|
+
end
|
data/ext/ae-output/ae-output.rb
CHANGED
|
@@ -1,262 +1,267 @@
|
|
|
1
|
-
#
|
|
2
|
-
# ae-output.rb - Arcadia Ruby ide
|
|
3
|
-
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
|
|
9
|
-
require "tk"
|
|
10
|
-
#require "base/a-utils"
|
|
11
|
-
|
|
12
|
-
class OutputView
|
|
13
|
-
attr_reader :text
|
|
14
|
-
def initialize(parent=nil)
|
|
15
|
-
left_frame = TkFrame.new(parent.frame.hinner_frame, Arcadia.style('panel')).place('x' => '0','y' => '0','relheight' => '1','width' => '25')
|
|
16
|
-
right_frame = TkFrame.new(parent.frame.hinner_frame, Arcadia.style('panel')).place('x' => '25','y' => '0','relheight' => '1','relwidth' => '1','width' => '-25')
|
|
17
|
-
|
|
18
|
-
@button_u = Tk::BWidget::Button.new(left_frame, Arcadia.style('toolbarbutton')){
|
|
19
|
-
image TkPhotoImage.new('dat' => CLEAR_GIF)
|
|
20
|
-
helptext 'Clear'
|
|
21
|
-
#foreground 'blue'
|
|
22
|
-
command proc{parent.main_frame.text.delete('1.0','end')}
|
|
23
|
-
#relief 'groove'
|
|
24
|
-
pack('side' =>'top', 'anchor'=>'n',:padx=>0, :pady=>0)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@text = TkScrollText.new(right_frame,
|
|
28
|
-
{'wrap'=> 'none'}.update(Arcadia.style('edit'))
|
|
29
|
-
)
|
|
30
|
-
@text.show
|
|
31
|
-
@text.show_v_scroll
|
|
32
|
-
@text.show_h_scroll
|
|
33
|
-
|
|
34
|
-
@text.tag_configure('simple_msg',
|
|
35
|
-
# 'background' => '#d9d994',
|
|
36
|
-
'borderwidth'=>1,
|
|
37
|
-
'relief'=> 'flat'
|
|
38
|
-
)
|
|
39
|
-
@text.tag_configure('debug_msg',
|
|
40
|
-
# 'background' => '#f6c9f6',
|
|
41
|
-
# 'foreground' => '#000000',
|
|
42
|
-
'borderwidth'=>1,
|
|
43
|
-
'relief'=> 'flat'
|
|
44
|
-
)
|
|
45
|
-
@text.tag_configure('error_msg',
|
|
46
|
-
# 'background' => '#f6c9f6',
|
|
47
|
-
'foreground' => 'red',
|
|
48
|
-
'borderwidth'=>1,
|
|
49
|
-
'relief'=> 'flat'
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
@text.tag_configure('bord_msg',
|
|
53
|
-
#'foreground' => '#b9b8b9'
|
|
54
|
-
'foreground' => '#7c9b10'
|
|
55
|
-
)
|
|
56
|
-
@text.tag_configure('sel',
|
|
57
|
-
'background'=>parent.conf('hightlight.sel.color.background'),
|
|
58
|
-
'foreground'=>parent.conf('hightlight.sel.color.foreground')
|
|
59
|
-
)
|
|
60
|
-
pop_up_menu
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
def pop_up_menu
|
|
64
|
-
@pop_up = TkMenu.new(
|
|
65
|
-
:parent=>@text,
|
|
66
|
-
:tearoff=>0,
|
|
67
|
-
:title => 'Menu'
|
|
68
|
-
)
|
|
69
|
-
@pop_up.configure(Arcadia.style('menu'))
|
|
70
|
-
|
|
71
|
-
@pop_up.insert('end',
|
|
72
|
-
:command,
|
|
73
|
-
:state=>'disabled',
|
|
74
|
-
:label=>'Output',
|
|
75
|
-
:background=>Arcadia.conf('titlelabel.background'),
|
|
76
|
-
:font => "#{Arcadia.conf('menu.font')} bold",
|
|
77
|
-
:hidemargin => true
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
#Arcadia.instance.main_menu.update_style(@pop_up)
|
|
82
|
-
@pop_up.insert('end',
|
|
83
|
-
:command,
|
|
84
|
-
:label=>'Save',
|
|
85
|
-
:hidemargin => false,
|
|
86
|
-
:command=> proc{save_as}
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
@pop_up.insert('end',
|
|
92
|
-
:command,
|
|
93
|
-
:label=>'Set wrap',
|
|
94
|
-
:hidemargin => false,
|
|
95
|
-
:command=> proc{@text.configure('wrap'=>'word');@text.hide_h_scroll}
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
@pop_up.insert('end',
|
|
99
|
-
:command,
|
|
100
|
-
:label=>'Set no wrap',
|
|
101
|
-
:hidemargin => false,
|
|
102
|
-
:command=> proc{@text.configure('wrap'=>'none');@text.show_h_scroll}
|
|
103
|
-
)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
@text.bind("Button-3",
|
|
109
|
-
proc{|x,y|
|
|
110
|
-
_x = TkWinfo.pointerx(@text)
|
|
111
|
-
_y = TkWinfo.pointery(@text)
|
|
112
|
-
@pop_up.popup(_x,_y)
|
|
113
|
-
},
|
|
114
|
-
"%x %y")
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
def save
|
|
118
|
-
if !@file
|
|
119
|
-
save_as
|
|
120
|
-
else
|
|
121
|
-
f = File.new(@file, "w")
|
|
122
|
-
begin
|
|
123
|
-
if f
|
|
124
|
-
f.syswrite(@text.value)
|
|
125
|
-
end
|
|
126
|
-
ensure
|
|
127
|
-
f.close unless f.nil?
|
|
128
|
-
end
|
|
129
|
-
#EditorContract.instance.file_saved(self,'file' =>@file)
|
|
130
|
-
end
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
def save_as
|
|
134
|
-
@file = Tk.getSaveFile("filetypes"=>[["Ruby Files", [".rb", ".rbw"]],["All Files", [".*"]]])
|
|
135
|
-
@file = nil if @file == "" # cancelled
|
|
136
|
-
if @file
|
|
137
|
-
save
|
|
138
|
-
end
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
class Output < ArcadiaExt
|
|
145
|
-
attr_reader :main_frame
|
|
146
|
-
|
|
147
|
-
def on_before_build(_event)
|
|
148
|
-
#ArcadiaContractListener.new(self, MsgContract, :do_msg_event)
|
|
149
|
-
Arcadia.attach_listener(self, MsgEvent)
|
|
150
|
-
#_frame = @arcadia.layout.register_panel('_rome_',@name, 'Output')
|
|
151
|
-
@main_frame = OutputView.new(self)
|
|
152
|
-
@run_threads = Array.new
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
def on_after_build(_event)
|
|
157
|
-
self.frame.show
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
def format_time(_time)
|
|
161
|
-
_time.strftime("at %a %d-%b-%Y %H:%M:%S")
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
def on_msg(_event)
|
|
165
|
-
self.frame.show
|
|
166
|
-
_txt = "\n+--- "+format_time(_event.time)+" ---+\n"+_event.msg.strip+"\n"
|
|
167
|
-
_index_begin = @main_frame.text.index('end')
|
|
168
|
-
@main_frame.text.insert(_index_begin,_txt)
|
|
169
|
-
_index_end = @main_frame.text.index('end')
|
|
170
|
-
case _event.level
|
|
171
|
-
when 'debug'
|
|
172
|
-
@main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
|
|
173
|
-
@main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
|
|
174
|
-
@main_frame.text.tag_add('debug_msg',_index_begin, _index_end+ ' lineend')
|
|
175
|
-
parse_debug(_index_begin.split('.')[0].to_i)
|
|
176
|
-
when 'error'
|
|
177
|
-
@main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
|
|
178
|
-
@main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
|
|
179
|
-
@main_frame.text.tag_add('error_msg',_index_begin, _index_end+ ' lineend')
|
|
180
|
-
parse_debug(_index_begin.split('.')[0].to_i)
|
|
181
|
-
else
|
|
182
|
-
@main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
|
|
183
|
-
@main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
|
|
184
|
-
@main_frame.text.tag_add('simple_msg',_index_begin, _index_end+ ' lineend')
|
|
185
|
-
end
|
|
186
|
-
@main_frame.text.tag_add('bord_msg',_index_begin+' linestart', _index_begin+ ' lineend')
|
|
187
|
-
@main_frame.text.tag_add('bord_msg',_index_end+' -1 lines linestart', _index_end+ ' -1 lines lineend')
|
|
188
|
-
@main_frame.text.see(_index_end)
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
def parse_debug(_from_row=0)
|
|
192
|
-
_row = 0
|
|
193
|
-
@cursor = @main_frame.text.cget('cursor')
|
|
194
|
-
@j=0
|
|
195
|
-
file_tag=Hash.new
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
)
|
|
239
|
-
@main_frame.text.tag_bind(tag_name,"
|
|
240
|
-
proc{
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
1
|
+
#
|
|
2
|
+
# ae-output.rb - Arcadia Ruby ide
|
|
3
|
+
# by Antonio Galeone <antonio-galeone@rubyforge.org>
|
|
4
|
+
#
|
|
5
|
+
# &require_dir_ref=../..
|
|
6
|
+
# &require_omissis=conf/arcadia.init
|
|
7
|
+
# &require_omissis=lib/a-commons
|
|
8
|
+
|
|
9
|
+
require "tk"
|
|
10
|
+
#require "base/a-utils"
|
|
11
|
+
|
|
12
|
+
class OutputView
|
|
13
|
+
attr_reader :text
|
|
14
|
+
def initialize(parent=nil)
|
|
15
|
+
left_frame = TkFrame.new(parent.frame.hinner_frame, Arcadia.style('panel')).place('x' => '0','y' => '0','relheight' => '1','width' => '25')
|
|
16
|
+
right_frame = TkFrame.new(parent.frame.hinner_frame, Arcadia.style('panel')).place('x' => '25','y' => '0','relheight' => '1','relwidth' => '1','width' => '-25')
|
|
17
|
+
|
|
18
|
+
@button_u = Tk::BWidget::Button.new(left_frame, Arcadia.style('toolbarbutton')){
|
|
19
|
+
image TkPhotoImage.new('dat' => CLEAR_GIF)
|
|
20
|
+
helptext 'Clear'
|
|
21
|
+
#foreground 'blue'
|
|
22
|
+
command proc{parent.main_frame.text.delete('1.0','end')}
|
|
23
|
+
#relief 'groove'
|
|
24
|
+
pack('side' =>'top', 'anchor'=>'n',:padx=>0, :pady=>0)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@text = TkScrollText.new(right_frame,
|
|
28
|
+
{'wrap'=> 'none'}.update(Arcadia.style('edit'))
|
|
29
|
+
)
|
|
30
|
+
@text.show
|
|
31
|
+
@text.show_v_scroll
|
|
32
|
+
@text.show_h_scroll
|
|
33
|
+
|
|
34
|
+
@text.tag_configure('simple_msg',
|
|
35
|
+
# 'background' => '#d9d994',
|
|
36
|
+
'borderwidth'=>1,
|
|
37
|
+
'relief'=> 'flat'
|
|
38
|
+
)
|
|
39
|
+
@text.tag_configure('debug_msg',
|
|
40
|
+
# 'background' => '#f6c9f6',
|
|
41
|
+
# 'foreground' => '#000000',
|
|
42
|
+
'borderwidth'=>1,
|
|
43
|
+
'relief'=> 'flat'
|
|
44
|
+
)
|
|
45
|
+
@text.tag_configure('error_msg',
|
|
46
|
+
# 'background' => '#f6c9f6',
|
|
47
|
+
'foreground' => 'red',
|
|
48
|
+
'borderwidth'=>1,
|
|
49
|
+
'relief'=> 'flat'
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
@text.tag_configure('bord_msg',
|
|
53
|
+
#'foreground' => '#b9b8b9'
|
|
54
|
+
'foreground' => '#7c9b10'
|
|
55
|
+
)
|
|
56
|
+
@text.tag_configure('sel',
|
|
57
|
+
'background'=>parent.conf('hightlight.sel.color.background'),
|
|
58
|
+
'foreground'=>parent.conf('hightlight.sel.color.foreground')
|
|
59
|
+
)
|
|
60
|
+
pop_up_menu
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def pop_up_menu
|
|
64
|
+
@pop_up = TkMenu.new(
|
|
65
|
+
:parent=>@text,
|
|
66
|
+
:tearoff=>0,
|
|
67
|
+
:title => 'Menu'
|
|
68
|
+
)
|
|
69
|
+
@pop_up.configure(Arcadia.style('menu'))
|
|
70
|
+
|
|
71
|
+
@pop_up.insert('end',
|
|
72
|
+
:command,
|
|
73
|
+
:state=>'disabled',
|
|
74
|
+
:label=>'Output',
|
|
75
|
+
:background=>Arcadia.conf('titlelabel.background'),
|
|
76
|
+
:font => "#{Arcadia.conf('menu.font')} bold",
|
|
77
|
+
:hidemargin => true
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
#Arcadia.instance.main_menu.update_style(@pop_up)
|
|
82
|
+
@pop_up.insert('end',
|
|
83
|
+
:command,
|
|
84
|
+
:label=>'Save',
|
|
85
|
+
:hidemargin => false,
|
|
86
|
+
:command=> proc{save_as}
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
@pop_up.insert('end',
|
|
92
|
+
:command,
|
|
93
|
+
:label=>'Set wrap',
|
|
94
|
+
:hidemargin => false,
|
|
95
|
+
:command=> proc{@text.configure('wrap'=>'word');@text.hide_h_scroll}
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
@pop_up.insert('end',
|
|
99
|
+
:command,
|
|
100
|
+
:label=>'Set no wrap',
|
|
101
|
+
:hidemargin => false,
|
|
102
|
+
:command=> proc{@text.configure('wrap'=>'none');@text.show_h_scroll}
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
@text.bind("Button-3",
|
|
109
|
+
proc{|x,y|
|
|
110
|
+
_x = TkWinfo.pointerx(@text)
|
|
111
|
+
_y = TkWinfo.pointery(@text)
|
|
112
|
+
@pop_up.popup(_x,_y)
|
|
113
|
+
},
|
|
114
|
+
"%x %y")
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def save
|
|
118
|
+
if !@file
|
|
119
|
+
save_as
|
|
120
|
+
else
|
|
121
|
+
f = File.new(@file, "w")
|
|
122
|
+
begin
|
|
123
|
+
if f
|
|
124
|
+
f.syswrite(@text.value)
|
|
125
|
+
end
|
|
126
|
+
ensure
|
|
127
|
+
f.close unless f.nil?
|
|
128
|
+
end
|
|
129
|
+
#EditorContract.instance.file_saved(self,'file' =>@file)
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def save_as
|
|
134
|
+
@file = Tk.getSaveFile("filetypes"=>[["Ruby Files", [".rb", ".rbw"]],["All Files", [".*"]]])
|
|
135
|
+
@file = nil if @file == "" # cancelled
|
|
136
|
+
if @file
|
|
137
|
+
save
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
class Output < ArcadiaExt
|
|
145
|
+
attr_reader :main_frame
|
|
146
|
+
|
|
147
|
+
def on_before_build(_event)
|
|
148
|
+
#ArcadiaContractListener.new(self, MsgContract, :do_msg_event)
|
|
149
|
+
Arcadia.attach_listener(self, MsgEvent)
|
|
150
|
+
#_frame = @arcadia.layout.register_panel('_rome_',@name, 'Output')
|
|
151
|
+
@main_frame = OutputView.new(self)
|
|
152
|
+
@run_threads = Array.new
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def on_after_build(_event)
|
|
157
|
+
self.frame.show
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
def format_time(_time)
|
|
161
|
+
_time.strftime("at %a %d-%b-%Y %H:%M:%S")
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
def on_msg(_event)
|
|
165
|
+
self.frame.show
|
|
166
|
+
_txt = "\n+--- "+format_time(_event.time)+" ---+\n"+_event.msg.strip+"\n"
|
|
167
|
+
_index_begin = @main_frame.text.index('end')
|
|
168
|
+
@main_frame.text.insert(_index_begin,_txt)
|
|
169
|
+
_index_end = @main_frame.text.index('end')
|
|
170
|
+
case _event.level
|
|
171
|
+
when 'debug'
|
|
172
|
+
@main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
|
|
173
|
+
@main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
|
|
174
|
+
@main_frame.text.tag_add('debug_msg',_index_begin, _index_end+ ' lineend')
|
|
175
|
+
parse_debug(_index_begin.split('.')[0].to_i)
|
|
176
|
+
when 'error'
|
|
177
|
+
@main_frame.text.tag_remove('simple_msg',_index_begin, _index_end+ ' lineend')
|
|
178
|
+
@main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
|
|
179
|
+
@main_frame.text.tag_add('error_msg',_index_begin, _index_end+ ' lineend')
|
|
180
|
+
parse_debug(_index_begin.split('.')[0].to_i)
|
|
181
|
+
else
|
|
182
|
+
@main_frame.text.tag_remove('error_msg',_index_begin, _index_end+ ' lineend')
|
|
183
|
+
@main_frame.text.tag_remove('debug_msg',_index_begin, _index_end+ ' lineend')
|
|
184
|
+
@main_frame.text.tag_add('simple_msg',_index_begin, _index_end+ ' lineend')
|
|
185
|
+
end
|
|
186
|
+
@main_frame.text.tag_add('bord_msg',_index_begin+' linestart', _index_begin+ ' lineend')
|
|
187
|
+
@main_frame.text.tag_add('bord_msg',_index_end+' -1 lines linestart', _index_end+ ' -1 lines lineend')
|
|
188
|
+
@main_frame.text.see(_index_end)
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
def parse_debug(_from_row=0)
|
|
192
|
+
_row = 0
|
|
193
|
+
@cursor = @main_frame.text.cget('cursor')
|
|
194
|
+
@j=0
|
|
195
|
+
file_tag=Hash.new
|
|
196
|
+
if String.method_defined?(:lines)
|
|
197
|
+
lines = @main_frame.text.value.lines
|
|
198
|
+
else
|
|
199
|
+
lines = @main_frame.text.value
|
|
200
|
+
end
|
|
201
|
+
lines.each{|l|
|
|
202
|
+
_row = _row+1
|
|
203
|
+
if _row >= _from_row
|
|
204
|
+
_end = 0
|
|
205
|
+
#m = /([\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*\.rb):(\d*)/.match(l)
|
|
206
|
+
re = Regexp.new('([\w\:]*[\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*):(\d*)')
|
|
207
|
+
m = re.match(l)
|
|
208
|
+
#m = /([\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*):(\d*)/.match(l)
|
|
209
|
+
while m
|
|
210
|
+
_txt = m.post_match
|
|
211
|
+
if m[1] && m[2]
|
|
212
|
+
_file = m[1]
|
|
213
|
+
if File.exist?(_file)
|
|
214
|
+
@j=@j+1
|
|
215
|
+
_line = m[2]
|
|
216
|
+
_ibegin = _row.to_s+'.'+(m.begin(1)+_end).to_s
|
|
217
|
+
_iend = _row.to_s+'.'+(m.end(2)+_end).to_s
|
|
218
|
+
file_binding(_file, _line, _ibegin, _iend)
|
|
219
|
+
end
|
|
220
|
+
_end = m.end(2) + _end
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
end
|
|
224
|
+
m = re.match(_txt)
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
}
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
def file_binding(_file, _line, _ibegin, _iend)
|
|
231
|
+
tag_name = "tag_#{@j}"
|
|
232
|
+
@main_frame.text.tag_configure(tag_name,
|
|
233
|
+
'foreground' => '#800000',
|
|
234
|
+
'borderwidth'=>0,
|
|
235
|
+
'relief'=>'flat',
|
|
236
|
+
'underline'=>true
|
|
237
|
+
)
|
|
238
|
+
@main_frame.text.tag_add(tag_name,_ibegin,_iend)
|
|
239
|
+
@main_frame.text.tag_bind(tag_name,"Double-ButtonPress-1",
|
|
240
|
+
proc{
|
|
241
|
+
Arcadia.process_event(OpenBufferTransientEvent.new(self,'file'=>_file, 'row'=>_line))
|
|
242
|
+
}
|
|
243
|
+
)
|
|
244
|
+
@main_frame.text.tag_bind(tag_name,"Enter",
|
|
245
|
+
proc{@main_frame.text.configure('cursor'=> 'hand2')}
|
|
246
|
+
)
|
|
247
|
+
@main_frame.text.tag_bind(tag_name,"Leave",
|
|
248
|
+
proc{@main_frame.text.configure('cursor'=> @cursor)}
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
def out(_txt=nil, _tag=nil)
|
|
254
|
+
if @main_frame && _txt
|
|
255
|
+
if _tag
|
|
256
|
+
@main_frame.text.insert('end',_txt, _tag)
|
|
257
|
+
else
|
|
258
|
+
@main_frame.text.insert('end',_txt)
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
def outln(_txt=nil, _tag=nil)
|
|
264
|
+
self.out(_txt+"\n",_tag)
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
end
|