Sha256: 967556382e61728007a1a7a9f4be8d61327ff27cc0af520a0576968b9826dca2
Contents?: true
Size: 1.4 KB
Versions: 24
Compression:
Stored size: 1.4 KB
Contents
class ProjectSearch class RefreshIndex < Redcar::Command sensitize :open_project def execute if project = Redcar::Project::Manager.focussed_project if index = ProjectSearch.indexes[project.path] index.delete project.refresh end end end end class WordSearchCommand < Redcar::Command sensitize :open_project def find_open_instance all_tabs = Redcar.app.focussed_window.notebooks.map { |nb| nb.tabs }.flatten all_tabs.find do |t| t.is_a?(Redcar::HtmlTab) && t.title == ProjectSearch::WordSearchController::TITLE end end def execute if project = Redcar::Project::Manager.focussed_project if tab = find_open_instance tab.html_view.refresh tab.focus else index = ProjectSearch.indexes[project.path] if index and index.has_content? tab = win.new_tab(Redcar::HtmlTab) tab.html_view.controller = ProjectSearch::WordSearchController.new tab.icon = :blue_folder_search_result tab.focus else Redcar::Application::Dialog.message_box("Your project is still being indexed.", :type => :error) end end else Redcar::Application::Dialog.message_box("You need an open project to be able to use Find In Project!", :type => :error) end return end end end
Version data entries
24 entries across 24 versions & 2 rubygems