Sha256: 995463100e50ae69b331a94a1f328f4cd30687701e42d40917fb1fa3fc0c2abc
Contents?: true
Size: 1.13 KB
Versions: 17
Compression:
Stored size: 1.13 KB
Contents
module Redcar class Declarations class SelectTagDialog < FilterListDialog def initialize(matches) super() @matches = matches end def close super end def update_list(filter) @last_list = @matches filtered_list = @last_list if filter.length >= 1 filtered_list = filter_and_rank_by(filtered_list, filter, filtered_list.length) do |match| match[:file].split(::File::SEPARATOR).last end end align_matches_for_display(filtered_list) end def selected(text, ix, closing=false) if @last_list close Redcar::Declarations.go_to_definition(@last_list[ix]) end end private def align_matches_for_display(filtered_list) filtered_list.collect do |match| file_path = match[:file] file = file_path.split(::File::SEPARATOR).last relative_path = file_path.gsub(Regexp.compile(Project::Manager.focussed_project.path + '/'), '') "%s (%s)" % [file, relative_path] end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems