Sha256: 6bd58ee7f76487e7dd18075f72fd427b414408d00ac5a7a8393f9cf474c83c4d
Contents?: true
Size: 1.17 KB
Versions: 19
Compression:
Stored size: 1.17 KB
Contents
puts "loading edit_view env.rb" require File.expand_path("../../../../application/features/support/env", __FILE__) module SwtTabHelpers def hide_toolbar Redcar.app.show_toolbar = false Redcar.app.refresh_toolbar! end def get_browser_contents live_document = "document.getElementsByTagName('html')[0].innerHTML" r = focussed_tab.html_view.controller.execute("return #{live_document};").join('') end def get_tab(tab_folder) item1 = tab_folder.getItems.to_a.first tab = Redcar.app.windows.first.notebooks.map{|n| n.tabs}.flatten.detect{|t| t.controller.item == item1} end def focussed_tab # In case the focussed tab on the focussed window's notebook is empty, try another window Redcar.app.focussed_window.focussed_notebook.focussed_tab or Redcar.app.windows.map {|w| w.focussed_notebook.focussed_tab}.first end def get_tabs items = get_tab_folders.map{|f| f.getItems.to_a}.flatten items.map {|i| model_tab_for_item(i)} end def model_tab_for_item(item) model_tabs.detect {|t| t.controller.item == item} end def model_tabs Redcar.app.windows.first.notebooks.map{|n| n.tabs}.flatten end end World(SwtTabHelpers)
Version data entries
19 entries across 19 versions & 2 rubygems