Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed filter files dialog ignore preferences to be optional; defaul…

…ts to off.
  • Loading branch information...
commit cf7c34acbe11b6cdf89f36a9ae215488459a2c25 1 parent f511b31
@kattrali kattrali authored
View
1  plugins/project/features/step_definitions/find_file_steps.rb
@@ -2,6 +2,7 @@
ignored = filter_storage['ignore_files_that_match_these_regexes']
ignored << /#{pattern}/
+ filter_storage['ignore_file_patterns'] = true
filter_storage['ignore_files_that_match_these_regexes'] = ignored
end
View
5 plugins/project/lib/project/find_file_dialog.rb
@@ -7,6 +7,7 @@ class FindFileDialog < FilterListDialog
def self.storage
@storage ||= begin
storage = Plugin::Storage.new('find_file_dialog')
+ storage.set_default('ignore_file_patterns', false)
storage.set_default('ignore_files_that_match_these_regexes', [])
storage.set_default('ignore_files_that_match_these_regexes_example_for_reference', [/.*\.class/i])
storage
@@ -94,7 +95,9 @@ def ignore_regexes
end
def ignore_file?(filename)
- ignore_regexes.any? {|re| re =~ filename }
+ if self.class.storage['ignore_file_patterns']
+ ignore_regexes.any? {|re| re =~ filename }
+ end
end
def find_files_from_list(text, file_list)
Please sign in to comment.
Something went wrong with that request. Please try again.