arcadia 0.13.1 → 1.0.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.
- checksums.yaml +4 -4
- data/{README → README.md} +60 -53
- data/conf/LC/en-UK.LANG +10 -4
- data/conf/arcadia.conf +221 -83
- data/conf/arcadia.res.rb +165 -175
- data/conf/theme-dark.conf +1 -1
- data/conf/theme-dark.res.rb +0 -123
- data/ext/ae-breakpoints/ae-breakpoints.rb +4 -3
- data/ext/ae-dir-projects/ae-dir-projects.conf +27 -1
- data/ext/ae-dir-projects/ae-dir-projects.rb +120 -70
- data/ext/ae-editor/ae-editor.conf +2 -2
- data/ext/ae-editor/ae-editor.rb +610 -303
- data/ext/ae-file-history/ae-file-history.rb +60 -39
- data/ext/ae-output/ae-output.rb +52 -27
- data/ext/ae-ruby-debug/ae-ruby-debug.conf +3 -1
- data/ext/ae-ruby-debug/ae-ruby-debug.rb +18 -11
- data/ext/ae-search-in-files/ae-search-in-files.conf +2 -2
- data/ext/ae-search-in-files/ae-search-in-files.rb +124 -77
- data/ext/ae-shell/ae-shell.conf +1 -1
- data/ext/ae-shell/ae-shell.rb +18 -81
- data/ext/ae-subprocess-inspector/ae-subprocess-inspector.rb +78 -81
- data/ext/ae-term/ae-term.rb +9 -7
- data/lib/a-commons.rb +125 -17
- data/lib/a-contracts.rb +6 -2
- data/lib/a-core.rb +441 -405
- data/lib/a-tkcommons.rb +1237 -45
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ArrowButton.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/BWidget.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Button.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ButtonBox.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ComboBox.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Dialog.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/DragSite.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/DropSite.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/DynamicHelp.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Entry.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Label.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/LabelEntry.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/LabelFrame.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ListBox.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/MainFrame.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/MessageDlg.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/NoteBook.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/PagesManager.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/PanedWindow.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/PanelFrame.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/PasswdDlg.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ProgressBar.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ProgressDlg.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ScrollView.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ScrollableFrame.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/ScrolledWindow.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/SelectColor.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/SelectFont.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Separator.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/SpinBox.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/StatusBar.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/TitleFrame.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Tree.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/Widget.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/contents.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/index.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/navtree.html +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/BWman/options.htm +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/CHANGES.txt +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/ChangeLog +65 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/LICENSE.txt +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/README.txt +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/arrow.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/bitmap.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/button.tcl +0 -2
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/buttonbox.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/color.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/combobox.tcl +40 -16
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/basic.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/bwidget.xbm +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/demo.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/dnd.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/manager.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/select.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/tmpldlg.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/tree.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/demo/x1.xbm +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/dialog.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/dragsite.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/dropsite.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/dynhelp.tcl +3 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/entry.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/font.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/bold.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/copy.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/cut.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/dragfile.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/dragicon.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/error.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/file.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/folder.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/hourglass.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/info.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/italic.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/minus.xbm +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/new.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/opcopy.xbm +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/open.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/openfold.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/oplink.xbm +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/opmove.xbm +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/overstrike.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/palette.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/passwd.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/paste.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/plus.xbm +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/print.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/question.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/redo.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/save.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/target.xbm +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/underline.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/undo.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/images/warning.gif +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/init.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/label.tcl +0 -2
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/labelentry.tcl +0 -3
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/labelframe.tcl +0 -2
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/da.rc +1 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/de.rc +1 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/en.rc +1 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/es.rc +1 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/fr.rc +1 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/hu.rc +1 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/nl.rc +1 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/no.rc +59 -58
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/lang/pl.rc +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/listbox.tcl +17 -4
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/mainframe.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/messagedlg.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/notebook.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/pagesmgr.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/panedw.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/panelframe.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/passwddlg.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/pkgIndex.tcl +2 -2
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/progressbar.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/progressdlg.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/scrollframe.tcl +6 -6
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/scrollview.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/scrollw.tcl +1 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/separator.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/spinbox.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/statusbar.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/tests/entry.test +2 -2
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/titleframe.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/tree.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/utils.tcl +0 -0
- data/tcl/bwidget-1.9.8/widget-old.tcl +1651 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/widget.tcl +64 -36
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/wizard.tcl +0 -0
- data/tcl/{bwidget-1.9.7 → bwidget-1.9.8}/xpm2image.tcl +0 -0
- metadata +196 -195
@@ -75,7 +75,6 @@ end
|
|
75
75
|
|
76
76
|
class FilesHistrory < ArcadiaExt
|
77
77
|
attr_reader :htree
|
78
|
-
|
79
78
|
def sync_on
|
80
79
|
@sync = true
|
81
80
|
select_file_without_event(@last_file) if @last_file
|
@@ -97,17 +96,27 @@ class FilesHistrory < ArcadiaExt
|
|
97
96
|
@bookmarks_frame = TkFrame.new(self.frame.hinner_frame)
|
98
97
|
@history_frame = TkFrame.new(self.frame.hinner_frame).pack('fill'=>'both', :padx=>0, :pady=>0, :expand => 'yes')
|
99
98
|
@panel = self.frame.root.add_panel(self.frame.name, "sync");
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
99
|
+
|
100
|
+
# @cb_sync = TkCheckButton.new(@panel, Arcadia.style('checkbox').update('background'=>@panel.background)){
|
101
|
+
# text 'Sync'
|
102
|
+
# justify 'left'
|
103
|
+
# indicatoron 0
|
104
|
+
# offrelief 'flat'
|
105
|
+
# image Arcadia.image_res(SYNC_GIF)
|
106
|
+
# pack
|
107
|
+
# }
|
108
|
+
#
|
109
|
+
# Tk::BWidget::DynamicHelp::add(@cb_sync,
|
110
|
+
# 'text'=>Arcadia.text('ext.file_history.button.link.hint'))
|
111
|
+
|
112
|
+
@cb_sync = Arcadia.wf.titlecontextcheckbutton(@panel){
|
113
|
+
variable TkVariable.new
|
105
114
|
image Arcadia.image_res(SYNC_GIF)
|
106
115
|
pack
|
107
116
|
}
|
117
|
+
|
118
|
+
@cb_sync.hint=Arcadia.text('ext.file_history.button.link.hint')
|
108
119
|
|
109
|
-
Tk::BWidget::DynamicHelp::add(@cb_sync,
|
110
|
-
'text'=>Arcadia.text('ext.file_history.button.link.hint'))
|
111
120
|
|
112
121
|
do_check = proc {
|
113
122
|
if @cb_sync.cget('onvalue')==@cb_sync.cget('variable').value.to_i
|
@@ -172,7 +181,8 @@ class FilesHistrory < ArcadiaExt
|
|
172
181
|
_selected = @htree.selected
|
173
182
|
_dir, _file = _selected.sub("%%%",":").split('@@@')
|
174
183
|
if _dir && _file.nil? && File.ftype(node2file(_dir)) == 'directory'
|
175
|
-
_file =
|
184
|
+
_file = Arcadia.open_file_dialog(node2file(_dir))
|
185
|
+
#Tk.getOpenFile('initialdir'=>node2file(_dir))
|
176
186
|
if _file && _file.strip.length > 0
|
177
187
|
Arcadia.process_event(OpenBufferTransientEvent.new(self,'file'=>_file))
|
178
188
|
end
|
@@ -257,20 +267,23 @@ class FilesHistrory < ArcadiaExt
|
|
257
267
|
bookmark = {:file=>"__TMP__#{_event.id}"}
|
258
268
|
caption = _event.id
|
259
269
|
end
|
260
|
-
caption = "#{caption} [#{_event.from_row}, #{_event.to_row}]"
|
270
|
+
caption = (_event.from_row == _event.to_row) ? "#{caption} [#{_event.from_row}] #{_event.content.strip if _event.content}":"#{caption} [#{_event.from_row}, #{_event.to_row}] #{str=_event.content.split("\n")[0] if _event.content;str.strip if str}"
|
261
271
|
bookmark[:from_line] = _event.from_row
|
262
272
|
bookmark[:to_line] = _event.to_row
|
263
273
|
bookmark[:persistent] = _event.persistent
|
264
|
-
bookmark[:widget] = Tk::BWidget::Button.new(@bookmarks_frame, Arcadia.style('toolbarbutton')){
|
274
|
+
#bookmark[:widget] = Tk::BWidget::Button.new(@bookmarks_frame, Arcadia.style('toolbarbutton')){
|
275
|
+
bookmark[:widget] = Arcadia.wf.toolbutton(@bookmarks_frame){
|
265
276
|
image Arcadia.image_res(BOOKMARK_GIF)
|
266
277
|
compound 'left'
|
267
|
-
anchor "w"
|
278
|
+
#anchor "w"
|
268
279
|
command proc{OpenBufferTransientEvent.new(self,'file'=>_event.file, 'row'=> _event.from_row).go!}
|
269
280
|
#width 20
|
270
281
|
#height 20
|
271
|
-
helptext _event.content
|
282
|
+
#helptext _event.content
|
272
283
|
text caption
|
273
|
-
|
284
|
+
pack('side' =>'top','anchor'=>'nw', 'fill'=>'x', :padx=>0, :pady=>0)
|
285
|
+
}
|
286
|
+
bookmark[:widget].hint=_event.content
|
274
287
|
|
275
288
|
Tk::BWidget::Button.new(bookmark[:widget], Arcadia.style('toolbarbutton')){
|
276
289
|
image TkPhotoImage.new('dat' => CLOSE_GIF)
|
@@ -560,21 +573,23 @@ class FilesHistrory < ArcadiaExt
|
|
560
573
|
end
|
561
574
|
|
562
575
|
def pop_up_menu_tree
|
563
|
-
|
576
|
+
#@pop_up_tree = TkMenu.new(
|
577
|
+
@pop_up_tree = Arcadia.wf.menu(
|
564
578
|
:parent=>@htree,
|
565
579
|
:tearoff=>0,
|
566
580
|
:title => 'Menu tree'
|
567
581
|
)
|
568
|
-
|
569
|
-
|
582
|
+
#@pop_up_tree.extend(TkAutoPostMenu)
|
583
|
+
#@pop_up_tree.configure(Arcadia.style('menu'))
|
570
584
|
#----- search submenu
|
571
|
-
sub_ref_search = TkMenu.new(
|
585
|
+
#sub_ref_search = TkMenu.new(
|
586
|
+
sub_ref_search = Arcadia.wf.menu(
|
572
587
|
:parent=>@pop_up_tree,
|
573
588
|
:tearoff=>0,
|
574
589
|
:title => 'Ref'
|
575
590
|
)
|
576
|
-
sub_ref_search.extend(TkAutoPostMenu)
|
577
|
-
sub_ref_search.configure(Arcadia.style('menu'))
|
591
|
+
#sub_ref_search.extend(TkAutoPostMenu)
|
592
|
+
#sub_ref_search.configure(Arcadia.style('menu'))
|
578
593
|
sub_ref_search.insert('end',
|
579
594
|
:command,
|
580
595
|
:label=>Arcadia.text('ext.file_history.menu.find_in_files'),
|
@@ -720,6 +735,7 @@ class FilesHistrory < ArcadiaExt
|
|
720
735
|
conf('view','list')
|
721
736
|
end
|
722
737
|
return if !@h_stack_changed
|
738
|
+
|
723
739
|
if File.exist?(history_file)
|
724
740
|
f = File::open(history_file,'r')
|
725
741
|
begin
|
@@ -729,16 +745,17 @@ class FilesHistrory < ArcadiaExt
|
|
729
745
|
end
|
730
746
|
f = File.new(history_file, "w")
|
731
747
|
begin
|
732
|
-
if f
|
733
|
-
_lines
|
748
|
+
if f && _lines
|
749
|
+
_lines.each{|_line|
|
734
750
|
_lfile = _line.split(';')
|
735
|
-
if _lfile
|
751
|
+
if _lfile && File.exists?(_lfile[0])
|
752
|
+
rif = nil
|
736
753
|
if @h_stack[_lfile[0]]
|
737
754
|
rif = "#{_lfile[0]};#{@h_stack[_lfile[0]]}"
|
738
755
|
else
|
739
756
|
rif = _line
|
740
757
|
end
|
741
|
-
f.syswrite(rif+"\n")
|
758
|
+
f.syswrite(rif+"\n") if !rif.nil?
|
742
759
|
end
|
743
760
|
}
|
744
761
|
end
|
@@ -786,26 +803,30 @@ class FilesHistrory < ArcadiaExt
|
|
786
803
|
_filename = File.expand_path(_filename)
|
787
804
|
_filename_index = _filename+";"+_text_index
|
788
805
|
if File.exist?(history_file)
|
806
|
+
to_add = []
|
807
|
+
max= conf('length').to_i
|
808
|
+
i = 1
|
809
|
+
to_add << _filename_index
|
810
|
+
@history_lines.each{|_line|
|
811
|
+
_lfile = _line.split(';')
|
812
|
+
if _lfile
|
813
|
+
if (_lfile[0] != _filename) && (_line.length > 0) && File.exists?(_lfile[0])
|
814
|
+
to_add << _line
|
815
|
+
i+=1
|
816
|
+
end
|
817
|
+
end
|
818
|
+
break if i >= max
|
819
|
+
}
|
820
|
+
|
789
821
|
f = File.new(history_file, "w")
|
790
822
|
begin
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
f.syswrite(_filename_index+"\n")
|
795
|
-
@history_lines.each{|_line|
|
796
|
-
_lfile = _line.split(';')
|
797
|
-
if _lfile
|
798
|
-
if (_lfile[0] != _filename) && (_line.length > 0)
|
799
|
-
f.syswrite(_line+"\n")
|
800
|
-
i+=1
|
801
|
-
end
|
802
|
-
end
|
803
|
-
break if i >= max
|
804
|
-
}
|
805
|
-
end
|
823
|
+
to_add.each{|x|
|
824
|
+
f.syswrite(x+"\n")
|
825
|
+
}
|
806
826
|
ensure
|
807
827
|
f.close unless f.nil?
|
808
828
|
end
|
829
|
+
|
809
830
|
else
|
810
831
|
create_history_file(_filename+"\n")
|
811
832
|
end
|
data/ext/ae-output/ae-output.rb
CHANGED
@@ -15,21 +15,21 @@ class OutputView
|
|
15
15
|
def initialize(parent=nil)
|
16
16
|
#left_frame = TkFrame.new(parent.frame.hinner_frame, Arcadia.style('panel')).place('x' => '0','y' => '0','relheight' => '1','width' => '25')
|
17
17
|
#right_frame = TkFrame.new(parent.frame.hinner_frame, Arcadia.style('panel')).place('x' => '25','y' => '0','relheight' => '1','relwidth' => '1','width' => '-25')
|
18
|
+
@auto_open_file = false
|
19
|
+
@parent = parent
|
18
20
|
parent.frame.root.add_button(
|
19
21
|
parent.name,
|
20
22
|
Arcadia.text('ext.output.button.clear.hint'),
|
21
23
|
proc{parent.main_frame.text.delete('1.0','end')},
|
22
24
|
CLEAR_GIF)
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
# }
|
32
|
-
|
26
|
+
#----
|
27
|
+
@ck = parent.frame.root.add_check_button(
|
28
|
+
parent.name,
|
29
|
+
Arcadia.text('ext.output.checkbutton.auto_open_file.hint'),
|
30
|
+
proc{ @auto_open_file = @ck.cget('onvalue')==@ck.cget('variable').value.to_i},
|
31
|
+
GO_UP_GIF)
|
32
|
+
#---
|
33
33
|
@text = TkArcadiaText.new(parent.frame.hinner_frame,
|
34
34
|
{'wrap'=> 'none'}.update(Arcadia.style('edit'))
|
35
35
|
)
|
@@ -52,9 +52,17 @@ class OutputView
|
|
52
52
|
'borderwidth'=>1,
|
53
53
|
'relief'=> 'flat'
|
54
54
|
)
|
55
|
-
@text.tag_configure('
|
56
|
-
|
57
|
-
'foreground' => Arcadia.conf('hightlight.
|
55
|
+
@text.tag_configure('system_error_msg',
|
56
|
+
'background' => Arcadia.conf('hightlight.system_error.background'),
|
57
|
+
'foreground' => Arcadia.conf('hightlight.system_error.foreground'),
|
58
|
+
'borderwidth'=>1,
|
59
|
+
'relief'=> 'groove'
|
60
|
+
)
|
61
|
+
@text.tag_configure('info_msg',
|
62
|
+
'foreground' => Arcadia.conf('hightlight.edge.foreground')
|
63
|
+
)
|
64
|
+
@text.tag_configure('prompt',
|
65
|
+
'foreground' => Arcadia.conf('hightlight.prompt.foreground')
|
58
66
|
)
|
59
67
|
@text.tag_configure('sel',
|
60
68
|
'background'=>Arcadia.conf('hightlight.sel.background'),
|
@@ -64,23 +72,28 @@ class OutputView
|
|
64
72
|
@input_buffer = nil
|
65
73
|
pop_up_menu
|
66
74
|
end
|
75
|
+
|
76
|
+
def auto_open_file?
|
77
|
+
@auto_open_file
|
78
|
+
end
|
67
79
|
|
68
80
|
def input(_char)
|
69
81
|
case _char
|
70
82
|
when 'Return'
|
71
|
-
@input_buffer = @text.get("insert linestart","insert").sub(
|
83
|
+
@input_buffer = @text.get("insert linestart","insert").sub(@parent.prompt,'').strip
|
72
84
|
end
|
73
85
|
end
|
74
86
|
|
75
87
|
|
76
88
|
def pop_up_menu
|
77
|
-
|
89
|
+
#@pop_up = TkMenu.new(
|
90
|
+
@pop_up = Arcadia.wf.menu(
|
78
91
|
:parent=>@text,
|
79
92
|
:tearoff=>0,
|
80
93
|
:title => 'Menu'
|
81
94
|
)
|
82
|
-
|
83
|
-
|
95
|
+
#@pop_up.extend(TkAutoPostMenu)
|
96
|
+
#@pop_up.configure(Arcadia.style('menu'))
|
84
97
|
|
85
98
|
@pop_up.insert('end',
|
86
99
|
:command,
|
@@ -144,7 +157,8 @@ class OutputView
|
|
144
157
|
end
|
145
158
|
|
146
159
|
def save_as
|
147
|
-
@file =
|
160
|
+
@file = Arcadia.save_file_dialog
|
161
|
+
#Tk.getSaveFile("filetypes"=>[["Ruby Files", [".rb", ".rbw"]],["All Files", [".*"]]])
|
148
162
|
@file = nil if @file == "" # cancelled
|
149
163
|
if @file
|
150
164
|
save
|
@@ -156,13 +170,15 @@ end
|
|
156
170
|
|
157
171
|
class Output < ArcadiaExt
|
158
172
|
attr_reader :main_frame
|
173
|
+
attr_reader :prompt
|
159
174
|
MARKSUF='mark-'
|
160
|
-
|
175
|
+
PROMPT_SIMBOL='$'
|
161
176
|
def on_before_build(_event)
|
162
177
|
#ArcadiaContractListener.new(self, MsgContract, :do_msg_event)
|
163
178
|
@tag_seq = 0
|
164
179
|
@writing=false
|
165
180
|
@prompt_active = false
|
181
|
+
@prompt = PROMPT_SIMBOL
|
166
182
|
Arcadia.attach_listener(self, MsgEvent)
|
167
183
|
Arcadia.attach_listener(self, InputKeyboardQueryEvent)
|
168
184
|
#_frame = @arcadia.layout.register_panel('_rome_',@name, 'Output')
|
@@ -196,9 +212,9 @@ class Output < ArcadiaExt
|
|
196
212
|
else
|
197
213
|
@main_frame.text.insert("end","\n")
|
198
214
|
_index_begin = @main_frame.text.index('end')
|
199
|
-
TkTextImage.new(@main_frame.text, _index_begin, 'padx'=>0, 'pady'=>0, 'image'=> Arcadia.image_res(ITEM_START_LOG_GIF))
|
200
|
-
|
201
|
-
sync_insert("end","
|
215
|
+
# TkTextImage.new(@main_frame.text, _index_begin, 'padx'=>0, 'pady'=>0, 'image'=> Arcadia.image_res(ITEM_START_LOG_GIF))
|
216
|
+
# sync_insert("end"," +--- #{format_time(_event.time)} ---+\n", 'info_msg')
|
217
|
+
sync_insert("end","===== #{format_time(_event.time)} ======\n", 'info_msg')
|
202
218
|
end
|
203
219
|
if _event.append
|
204
220
|
_index_begin = "#{@main_frame.text.index(_index_begin)} - 2 lines lineend"
|
@@ -231,7 +247,6 @@ class Output < ArcadiaExt
|
|
231
247
|
# TkTextWindow.new(@main_frame.text, 'end', 'window'=> _b)
|
232
248
|
# end
|
233
249
|
|
234
|
-
|
235
250
|
end
|
236
251
|
|
237
252
|
def sync_insert(_index, _txt, _tag=nil)
|
@@ -242,7 +257,7 @@ class Output < ArcadiaExt
|
|
242
257
|
@writing = true
|
243
258
|
if @prompt_active
|
244
259
|
start = @main_frame.text.get("#{_index} -1 lines linestart", _index).strip
|
245
|
-
if start ==
|
260
|
+
if start == @prompt.strip
|
246
261
|
_index = "#{_index} -1 lines linestart"
|
247
262
|
end
|
248
263
|
end
|
@@ -257,19 +272,23 @@ class Output < ArcadiaExt
|
|
257
272
|
end
|
258
273
|
|
259
274
|
def on_input_keyboard_query(_event)
|
275
|
+
if _event.pid
|
276
|
+
@prompt = "~#{_event.pid} #{PROMPT_SIMBOL} "
|
277
|
+
end
|
260
278
|
@prompt_active = true
|
261
|
-
sync_insert("end",
|
279
|
+
sync_insert("end", @prompt, 'prompt')
|
262
280
|
@main_frame.text.focus
|
263
281
|
@main_frame.text.see("end")
|
264
|
-
|
282
|
+
prompt_index = @main_frame.text.index("insert")
|
265
283
|
@main_frame.input_buffer = nil
|
266
284
|
while @main_frame.input_buffer.nil? && !_event.is_breaked?
|
267
285
|
sleep(0.1)
|
268
286
|
end
|
269
287
|
if !_event.is_breaked?
|
270
288
|
_event.add_result(self, 'input'=>@main_frame.input_buffer)
|
289
|
+
@main_frame.text.tag_add("prompt","#{prompt_index} linestart","#{prompt_index} lineend")
|
271
290
|
else
|
272
|
-
if @main_frame.text.get("end -1 lines linestart", "end -1 lines lineend").strip ==
|
291
|
+
if @main_frame.text.get("end -1 lines linestart", "end -1 lines lineend").strip == @prompt.strip
|
273
292
|
@main_frame.text.delete("end -1 lines linestart", "end -1 lines lineend")
|
274
293
|
end
|
275
294
|
end
|
@@ -295,7 +314,7 @@ class Output < ArcadiaExt
|
|
295
314
|
#if _row >= _from_row
|
296
315
|
_end = 0
|
297
316
|
#m = /([\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*\.rb):(\d*)/.match(l)
|
298
|
-
re = Regexp.new('([\w\:]*[\.\/]*[\/A-Za-
|
317
|
+
re = Regexp.new('([\w\:]*[\.\/]*[\/A-Za-z0-9_\-\.]*[\.\/\w\d]*[(<<current buffer>>)]*):(\d*)')
|
299
318
|
m = re.match(l)
|
300
319
|
#m = /([\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*):(\d*)/.match(l)
|
301
320
|
while m
|
@@ -349,6 +368,12 @@ class Output < ArcadiaExt
|
|
349
368
|
proc{@main_frame.text.configure('cursor'=> @cursor)}
|
350
369
|
)
|
351
370
|
|
371
|
+
if @main_frame.auto_open_file?
|
372
|
+
Arcadia.process_event(OpenBufferTransientEvent.new(self,'file'=>_file, 'row'=>_line))
|
373
|
+
self.frame.show
|
374
|
+
@main_frame.text.set_focus
|
375
|
+
@main_frame.text.see("end")
|
376
|
+
end
|
352
377
|
end
|
353
378
|
|
354
379
|
def out(_txt=nil, _tag=nil)
|
@@ -45,4 +45,6 @@ user_toolbar.debug.debuglast.event_args=!{'file'=>"*LAST"}
|
|
45
45
|
user_toolbar.debug.debugquit.name=debugquit
|
46
46
|
user_toolbar.debug.debugquit.hint=Quit debug
|
47
47
|
user_toolbar.debug.debugquit.image_data=!DEBUG_QUIT_GIF
|
48
|
-
user_toolbar.debug.debugquit.event_class=!StopDebugEvent
|
48
|
+
user_toolbar.debug.debugquit.event_class=!StopDebugEvent
|
49
|
+
|
50
|
+
runners.ruby.debug.curr.console = {:cmd=>"rdebug <<FILE>>",:file=>"*CURR",:title=>Arcadia.text('main.runner.rdebug_selected.title',['ruby']),:file_exts=>".rb,.rbw",:image=>DEBUG_CURRENT_GIF}
|
@@ -137,7 +137,7 @@ class RubyDebugView
|
|
137
137
|
if @tree_process.parent(_selected)=='client'
|
138
138
|
_text = @tree_process.itemcget(_selected, 'text')
|
139
139
|
pos = match_position_from_stack(_text)
|
140
|
-
if pos && pos.length >0
|
140
|
+
if pos && pos.length >0 && File.exists?(pos[0])
|
141
141
|
Arcadia.process_event(OpenBufferEvent.new(self,'file'=>pos[0], 'row'=>pos[1]))
|
142
142
|
#EditorContract.instance.open_file(self, 'file'=>pos[0], 'line'=>pos[1])
|
143
143
|
end
|
@@ -522,13 +522,17 @@ class RubyDebugView
|
|
522
522
|
#matchline = _line.match(/#*([0-9]*)[\s\w\W]*\s([\w\:]*[\.\/]*[\/A-Za-z_\-\.]*[\.\/\w\d]*):(\d*)/)
|
523
523
|
matchline = _line.match(/#*([0-9]*)[\s\w\W]*line\s(.*):([0-9]*)(.*)/)
|
524
524
|
if !matchline.nil? && matchline.length==5
|
525
|
-
#Arcadia.new_error_msg(self, "matchline[2]=#{matchline[2]}")
|
526
|
-
#Arcadia.new_error_msg(self, "matchline[3]=#{matchline[3]}")
|
527
525
|
filename = matchline[2].to_s.strip
|
528
526
|
line_no = matchline[3].to_i
|
529
|
-
|
530
|
-
|
527
|
+
else
|
528
|
+
matchline = _line.match(/[lL]ine\s(.*)[:]*([0-9]*)\sof\s\"(.*)\"/)
|
529
|
+
if !matchline.nil? && matchline.length==4
|
530
|
+
filename = matchline[3].to_s.strip
|
531
|
+
line_no = matchline[1].to_i
|
531
532
|
end
|
533
|
+
end
|
534
|
+
if filename && line_no
|
535
|
+
ret << filename << line_no
|
532
536
|
end
|
533
537
|
ret
|
534
538
|
end
|
@@ -1141,7 +1145,8 @@ class RubyDebugClient
|
|
1141
1145
|
end
|
1142
1146
|
|
1143
1147
|
def where
|
1144
|
-
notify("where", read("where"))
|
1148
|
+
# notify("where", read("where"))
|
1149
|
+
notify("where", read("info line"))
|
1145
1150
|
end
|
1146
1151
|
|
1147
1152
|
def quit
|
@@ -1392,10 +1397,12 @@ class RubyDebug < ArcadiaExt
|
|
1392
1397
|
#p "on_debug --> @rdc.is_alive?=#{@rdc.is_alive?}"
|
1393
1398
|
#p "on_debug --> @rds.is_alive?=#{@rds.is_alive?}"
|
1394
1399
|
when SetBreakpointEvent
|
1395
|
-
if _event.
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1400
|
+
if _event.active > 0
|
1401
|
+
if _event.file
|
1402
|
+
self.breakpoint_add(File.expand_path(_event.file), _event.row)
|
1403
|
+
elsif _event.id
|
1404
|
+
self.breakpoint_add(_event.id, _event.row)
|
1405
|
+
end
|
1399
1406
|
end
|
1400
1407
|
when UnsetBreakpointEvent
|
1401
1408
|
return if _event.file.nil?
|
@@ -1548,7 +1555,7 @@ class RubyDebug < ArcadiaExt
|
|
1548
1555
|
end
|
1549
1556
|
end
|
1550
1557
|
rescue Exception => e
|
1551
|
-
Arcadia.console(self, Arcadia.text('ext.ruby_debug.e.do_debug', [e.to_s, e.backtrace[0]]), 'level'=>'debug')
|
1558
|
+
Arcadia.console(self, 'msg'=> Arcadia.text('ext.ruby_debug.e.do_debug', [e.to_s, e.backtrace[0]]), 'level'=>'debug')
|
1552
1559
|
end
|
1553
1560
|
end
|
1554
1561
|
end
|
@@ -10,5 +10,5 @@ font=courier 10
|
|
10
10
|
font.bold=courier 10 bold
|
11
11
|
freebsd::font=courier 12 italic
|
12
12
|
freebsd::font.bold=courier 12 bold
|
13
|
-
|
14
|
-
|
13
|
+
WINDOWS::font={Courier New} 9
|
14
|
+
WINDOWS::font.bold={Courier New} 9 bold
|