redcar 0.9.2 → 0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +34 -4
- data/Rakefile +2 -1
- data/lib/redcar.rb +3 -3
- data/lib/redcar/installer.rb +2 -3
- data/plugins/application/features/step_definitions/dialog_steps.rb +7 -0
- data/plugins/application/features/step_definitions/key_steps.rb +18 -0
- data/plugins/application/features/step_definitions/menu_steps.rb +5 -6
- data/plugins/application/features/step_definitions/speedbar_steps.rb +29 -9
- data/plugins/application/features/step_definitions/tree_steps.rb +13 -0
- data/plugins/application/features/support/env.rb +39 -5
- data/plugins/application/features/support/fake_event.rb +12 -0
- data/plugins/application/lib/application.rb +5 -6
- data/plugins/application/lib/application/dialog.rb +53 -10
- data/plugins/application/lib/application/dialogs/modeless_list_dialog.rb +85 -0
- data/plugins/application/lib/application/keymap.rb +10 -8
- data/plugins/application/lib/application/menu.rb +38 -16
- data/plugins/application/lib/application/treebook.rb +30 -0
- data/plugins/application/lib/application/window.rb +20 -2
- data/plugins/application/spec/application/command/executor_spec.rb +1 -0
- data/plugins/application/spec/application/menu_spec.rb +26 -26
- data/plugins/application/spec/application/treebook_spec.rb +6 -6
- data/plugins/application/spec/spec_helper.rb +10 -1
- data/plugins/application_swt/lib/application_swt.rb +25 -3
- data/plugins/application_swt/lib/application_swt/dialog_adapter.rb +48 -27
- data/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb +22 -11
- data/plugins/application_swt/lib/application_swt/dialogs/modeless_dialog.rb +113 -0
- data/plugins/application_swt/lib/application_swt/dialogs/modeless_html_dialog.rb +85 -0
- data/plugins/application_swt/lib/application_swt/dialogs/modeless_list_dialog_controller.rb +143 -0
- data/plugins/application_swt/lib/application_swt/gradient.rb +61 -0
- data/plugins/application_swt/lib/application_swt/menu/binding_translator.rb +4 -4
- data/plugins/application_swt/lib/application_swt/notebook.rb +5 -8
- data/plugins/application_swt/lib/application_swt/speedbar.rb +1 -0
- data/plugins/application_swt/lib/application_swt/treebook.rb +6 -8
- data/plugins/application_swt/lib/application_swt/window.rb +85 -57
- data/plugins/application_swt/lib/swt/graphics_utils.rb +23 -0
- data/plugins/application_swt/lib/swt/vtab_folder.rb +7 -0
- data/plugins/application_swt/lib/swt/vtab_label.rb +1 -1
- data/plugins/application_swt/spec/application_swt/gradient_spec.rb +142 -0
- data/plugins/auto_completer/lib/auto_completer.rb +10 -42
- data/plugins/auto_completer/lib/auto_completer/list_dialog.rb +21 -0
- data/plugins/clojure/lib/clojure.rb +33 -0
- data/plugins/{repl/lib/repl/clojure_mirror.rb → clojure/lib/clojure/repl_mirror.rb} +16 -20
- data/plugins/clojure/plugin.rb +9 -0
- data/plugins/{repl/spec/repl/clojure_mirror_spec.rb → clojure/spec/clojure/repl_mirror_spec.rb} +12 -13
- data/plugins/clojure/spec/spec_helper.rb +5 -0
- data/plugins/{repl → clojure}/vendor/Wrapper.clj +0 -0
- data/plugins/{repl → clojure}/vendor/dummy +0 -0
- data/plugins/{repl → clojure}/vendor/enclojure-wrapper.jar +0 -0
- data/plugins/connection_manager/lib/connection_manager.rb +13 -13
- data/plugins/declarations/lib/declarations.rb +17 -6
- data/plugins/document_search/features/find.feature +389 -0
- data/plugins/document_search/features/find_and_replace.feature +723 -0
- data/plugins/document_search/features/replace.feature +69 -62
- data/plugins/document_search/lib/document_search.rb +81 -64
- data/plugins/document_search/lib/document_search/commands.rb +258 -0
- data/plugins/document_search/lib/document_search/find_and_replace_speedbar.rb +142 -0
- data/plugins/document_search/lib/document_search/find_speedbar.rb +102 -0
- data/plugins/document_search/lib/document_search/query_options.rb +45 -0
- data/plugins/edit_view/features/case_change.feature +9 -5
- data/plugins/edit_view/features/step_definitions/editing_steps.rb +19 -0
- data/plugins/edit_view/lib/edit_view.rb +15 -12
- data/plugins/edit_view/lib/edit_view/actions/arrow_keys.rb +12 -2
- data/plugins/edit_view/lib/edit_view/commands/text_conversion_commands.rb +1 -1
- data/plugins/edit_view/lib/edit_view/document.rb +129 -99
- data/plugins/edit_view_swt/lib/edit_view_swt.rb +33 -15
- data/plugins/encryption/encryption.rb +2 -0
- data/plugins/find-in-project/lib/find_in_project.rb +3 -5
- data/plugins/find-in-project/lib/find_in_project/views/index.html.erb +2 -0
- data/plugins/groovy/features/step_definitions/groovy_steps.rb +2 -2
- data/plugins/groovy/features/syntax_check_groovy.feature +3 -3
- data/plugins/groovy/lib/groovy.rb +38 -0
- data/plugins/groovy/lib/groovy/commands.rb +10 -0
- data/plugins/{repl/lib/repl/groovy_mirror.rb → groovy/lib/groovy/repl_mirror.rb} +33 -13
- data/plugins/groovy/lib/{syntax_check/groovy.rb → groovy/syntax_checker.rb} +13 -8
- data/plugins/groovy/plugin.rb +5 -4
- data/plugins/{repl/spec/repl/groovy_mirror_spec.rb → groovy/spec/groovy/repl_mirror_spec.rb} +14 -13
- data/plugins/groovy/spec/spec_helper.rb +5 -0
- data/plugins/html_view/assets/json2.js +476 -0
- data/plugins/html_view/lib/html_view.rb +1 -0
- data/plugins/java/features/fixtures/test.java +0 -0
- data/plugins/java/features/support/env.rb +27 -0
- data/plugins/java/features/syntax_check_java.feature +86 -0
- data/plugins/java/lib/syntax_check/java.rb +86 -0
- data/plugins/java/plugin.rb +7 -0
- data/plugins/javascript/features/fixtures/test2.js +5 -0
- data/plugins/javascript/features/step_definitions/javascript_steps.rb +16 -0
- data/plugins/javascript/features/support/env.rb +14 -0
- data/plugins/javascript/features/syntax_check_javascript.feature +46 -3
- data/plugins/javascript/lib/syntax_check/javascript.rb +15 -9
- data/plugins/line_tools/features/trim_line.feature +49 -0
- data/plugins/line_tools/lib/line_tools.rb +5 -1
- data/plugins/mirah/README +7 -0
- data/plugins/mirah/features/fixtures/test.mirah +2 -0
- data/plugins/mirah/features/syntax_check_mirah.feature +46 -0
- data/plugins/mirah/lib/mirah.rb +43 -0
- data/plugins/mirah/lib/mirah/my_error_handler.rb +22 -0
- data/plugins/mirah/lib/mirah/repl_mirror.rb +50 -0
- data/plugins/mirah/lib/mirah/syntax_checker.rb +38 -0
- data/plugins/mirah/plugin.rb +8 -0
- data/plugins/mirah/spec/mirah/repl_mirror_spec.rb +188 -0
- data/plugins/mirah/spec/spec_helper.rb +5 -0
- data/plugins/mirah/vendor/mirah-parser.jar +0 -0
- data/plugins/pair_highlighter/lib/pair_highlighter/document_controller.rb +24 -23
- data/plugins/plugin_manager_ui/lib/plugin_manager_ui.rb +10 -1
- data/plugins/plugin_manager_ui/views/index.html.erb +2 -0
- data/plugins/project/features/find_file.feature +40 -16
- data/plugins/project/features/highlight_focussed_tab.feature +16 -10
- data/plugins/project/features/step_definitions/find_file_steps.rb +11 -0
- data/plugins/project/features/step_definitions/project_tree_steps.rb +5 -1
- data/plugins/project/features/support/env.rb +5 -0
- data/plugins/project/lib/project/commands.rb +8 -1
- data/plugins/project/lib/project/dir_controller.rb +4 -1
- data/plugins/project/lib/project/find_file_dialog.rb +16 -12
- data/plugins/project/lib/project/manager.rb +30 -1
- data/plugins/project_search/vendor/lucene/CHANGELOG +147 -0
- data/plugins/project_search/vendor/lucene/CONTRIBUTORS +17 -0
- data/plugins/project_search/vendor/lucene/Gemfile +9 -0
- data/plugins/project_search/vendor/lucene/Gemfile.lock +33 -0
- data/plugins/project_search/vendor/lucene/LICENSE +19 -0
- data/plugins/project_search/vendor/lucene/README.rdoc +283 -0
- data/plugins/project_search/vendor/lucene/Rakefile +35 -0
- data/plugins/project_search/vendor/lucene/examples/active_model/serializers.rb +25 -0
- data/plugins/project_search/vendor/lucene/examples/active_model/validation.rb +26 -0
- data/plugins/project_search/vendor/lucene/examples/admin/Rakefile +4 -0
- data/plugins/project_search/vendor/lucene/examples/admin/admin.rb +29 -0
- data/plugins/project_search/vendor/lucene/examples/admin/public/jquery.js +4376 -0
- data/plugins/project_search/vendor/lucene/examples/admin/public/neo4j.css +153 -0
- data/plugins/project_search/vendor/lucene/examples/admin/public/neo_admin.js +18 -0
- data/plugins/project_search/vendor/lucene/examples/admin/spec/admin_spec.rb +26 -0
- data/plugins/project_search/vendor/lucene/examples/admin/views/index.erb +21 -0
- data/plugins/project_search/vendor/lucene/examples/filetree/README.rdoc +9 -0
- data/plugins/project_search/vendor/lucene/examples/filetree/app.rb +7 -0
- data/plugins/project_search/vendor/lucene/examples/filetree/batch.props +5 -0
- data/plugins/project_search/vendor/lucene/examples/filetree/features/step_definitions/add_steps.rb +121 -0
- data/plugins/project_search/vendor/lucene/examples/filetree/features/support/env.rb +30 -0
- data/plugins/project_search/vendor/lucene/examples/filetree/features/support/rspec_helper.rb +50 -0
- data/plugins/project_search/vendor/lucene/examples/filetree/features/treesizes.feature +19 -0
- data/plugins/project_search/vendor/lucene/examples/imdb/1_create_neo_db.rb +66 -0
- data/plugins/project_search/vendor/lucene/examples/imdb/2_index_db.rb +23 -0
- data/plugins/project_search/vendor/lucene/examples/imdb/README +12 -0
- data/plugins/project_search/vendor/lucene/examples/imdb/find_actors.rb +56 -0
- data/plugins/project_search/vendor/lucene/examples/imdb/install.sh +12 -0
- data/plugins/project_search/vendor/lucene/examples/imdb/model.rb +37 -0
- data/plugins/project_search/vendor/lucene/examples/railway/README +111 -0
- data/plugins/project_search/vendor/lucene/examples/railway/railnet-app.rb +31 -0
- data/plugins/project_search/vendor/lucene/examples/railway/railnet-data.rb +42 -0
- data/plugins/project_search/vendor/lucene/examples/rest/example.rb +41 -0
- data/plugins/project_search/vendor/lucene/examples/you_might_know/YouMightKnow.java +60 -0
- data/plugins/project_search/vendor/lucene/examples/you_might_know/all_simple_paths.rb +34 -0
- data/plugins/project_search/vendor/lucene/examples/you_might_know/nodes.rb +34 -0
- data/plugins/project_search/vendor/lucene/examples/you_might_know/you_might_know.rb +50 -0
- data/plugins/project_search/vendor/lucene/lib/lucene.rb +15 -0
- data/plugins/project_search/vendor/lucene/lib/lucene/config.rb +145 -0
- data/plugins/project_search/vendor/lucene/lib/lucene/document.rb +96 -0
- data/plugins/project_search/vendor/lucene/lib/lucene/field_info.rb +144 -0
- data/plugins/project_search/vendor/lucene/lib/lucene/hits.rb +54 -0
- data/plugins/project_search/vendor/lucene/lib/lucene/index.rb +267 -0
- data/plugins/project_search/vendor/lucene/lib/lucene/index_info.rb +146 -0
- data/plugins/project_search/vendor/lucene/lib/lucene/index_searcher.rb +157 -0
- data/plugins/project_search/vendor/lucene/lib/lucene/jars.rb +5 -0
- data/plugins/project_search/vendor/lucene/lib/lucene/query_dsl.rb +135 -0
- data/plugins/project_search/vendor/lucene/lib/lucene/transaction.rb +117 -0
- data/plugins/project_search/vendor/lucene/lib/lucene/version.rb +3 -0
- data/plugins/project_search/vendor/lucene/lucene.gemspec +23 -0
- data/plugins/project_search/vendor/lucene/spec/lucene/document_spec.rb +32 -0
- data/plugins/project_search/vendor/lucene/spec/lucene/field_info_spec.rb +70 -0
- data/plugins/project_search/vendor/lucene/spec/lucene/index_info_spec.rb +76 -0
- data/plugins/project_search/vendor/lucene/spec/lucene/index_spec.rb +643 -0
- data/plugins/project_search/vendor/lucene/spec/lucene/query_dsl_spec.rb +142 -0
- data/plugins/project_search/vendor/lucene/spec/lucene/sort_spec.rb +101 -0
- data/plugins/project_search/vendor/lucene/spec/lucene/spec_helper.rb +10 -0
- data/plugins/project_search/vendor/lucene/spec/lucene/transaction_spec.rb +118 -0
- data/plugins/redcar/features/alter_font_size.feature +25 -0
- data/plugins/redcar/features/step_definitions/font_steps.rb +34 -0
- data/plugins/redcar/redcar.rb +256 -43
- data/plugins/repl/features/command_editing.feature +55 -0
- data/plugins/repl/features/command_history.feature +75 -0
- data/plugins/repl/features/step_definitions/repl_steps.rb +17 -1
- data/plugins/repl/features/support/env.rb +24 -0
- data/plugins/repl/features/support/fake_repl.rb +16 -0
- data/plugins/repl/lib/repl.rb +17 -74
- data/plugins/repl/lib/repl/repl_command.rb +20 -0
- data/plugins/repl/lib/repl/repl_mirror.rb +168 -22
- data/plugins/repl/lib/repl/repl_tab.rb +131 -6
- data/plugins/repl/plugin.rb +1 -1
- data/plugins/repl/spec/repl/repl_mirror_spec.rb +72 -0
- data/plugins/repl/spec/spec_helper.rb +1 -1
- data/plugins/repl_swt/lib/repl_swt.rb +7 -0
- data/plugins/repl_swt/lib/repl_swt/key_listener.rb +43 -0
- data/plugins/repl_swt/plugin.rb +8 -0
- data/plugins/ruby/lib/ruby.rb +35 -0
- data/plugins/{repl/lib/repl/ruby_mirror.rb → ruby/lib/ruby/repl_mirror.rb} +12 -12
- data/plugins/ruby/lib/{syntax_check/ruby.rb → ruby/syntax_checker.rb} +3 -3
- data/plugins/ruby/plugin.rb +5 -4
- data/plugins/{repl/spec/repl/ruby_mirror_spec.rb → ruby/spec/ruby/repl_mirror_spec.rb} +38 -29
- data/plugins/ruby/spec/spec_helper.rb +5 -0
- data/plugins/runnables/lib/runnables.rb +2 -0
- data/plugins/runnables/lib/runnables/command_output_controller.rb +5 -0
- data/plugins/runnables/lib/runnables/output_processor.rb +14 -3
- data/plugins/runnables/views/command_output.html.erb +3 -2
- data/plugins/scm/lib/scm.rb +4 -2
- data/plugins/scm/lib/scm/diff_mirror.rb +6 -6
- data/plugins/scm_git/lib/scm_git.rb +136 -107
- data/plugins/scm_git/lib/scm_git/change.rb +28 -19
- data/plugins/snippets/lib/snippets/explorer.rb +2 -2
- data/plugins/swt/lib/swt/full_swt.rb +1 -0
- data/plugins/syntax_check/features/step_definitions/syntax_check_steps.rb +4 -0
- data/plugins/syntax_check/features/support/env.rb +3 -0
- data/plugins/syntax_check/lib/syntax_check.rb +71 -5
- data/plugins/syntax_check/lib/syntax_check/annotation.rb +61 -0
- data/plugins/test_runner/lib/test_runner.rb +39 -0
- data/plugins/test_runner/lib/test_runner/rspec_runner.rb +20 -0
- data/plugins/test_runner/lib/test_runner/run_test_command.rb +63 -0
- data/plugins/test_runner/lib/test_runner/runnable_test_runner.rb +26 -0
- data/plugins/test_runner/plugin.rb +8 -0
- data/plugins/test_runner/spec/run_test_command_spec.rb +51 -0
- data/plugins/test_runner/spec/spec_helper.rb +5 -0
- data/plugins/textmate/lib/textmate.rb +12 -2
- data/plugins/textmate/vendor/redcar-bundles/Bundles/HTML.tmbundle/Syntaxes/HTML.plist +0 -2
- data/plugins/textmate/vendor/redcar-bundles/Bundles/Mirah.tmbundle/Syntaxes/Mirah.plist +22 -0
- data/plugins/textmate/vendor/redcar-bundles/Bundles/Mirah.tmbundle/info.plist +12 -0
- data/plugins/textmate/vendor/redcar-bundles/Bundles/Ruby.tmbundle/Syntaxes/Ruby.plist +2 -0
- data/plugins/todo_list/lib/todo_list.rb +7 -0
- data/plugins/todo_list/lib/todo_list/todo_controller.rb +3 -1
- data/plugins/tree/lib/tree.rb +4 -0
- data/plugins/tree_view_swt/lib/tree_view_swt.rb +5 -0
- data/plugins/web_bookmarks/lib/web_bookmarks.rb +10 -0
- metadata +137 -22
- data/plugins/document_search/features/search.feature +0 -163
- data/plugins/document_search/lib/document_search/replace_all_command.rb +0 -27
- data/plugins/document_search/lib/document_search/replace_command.rb +0 -38
- data/plugins/document_search/lib/document_search/replace_next_command.rb +0 -27
- data/plugins/document_search/lib/document_search/search_and_replace.rb +0 -81
- data/plugins/ruby/README +0 -6
data/CHANGES
CHANGED
@@ -1,8 +1,38 @@
|
|
1
|
-
Version 0.
|
2
|
-
|
1
|
+
Version 0.10 (17 January 2011)
|
2
|
+
==============================
|
3
|
+
|
4
|
+
Enhancements:
|
5
|
+
|
6
|
+
* Add "Close others" and "Close all" commands to the File menu (Clinton R Nixon)
|
7
|
+
* Syntax checking for Java (Delisa Mason)
|
8
|
+
* Git integration is now available when the current project is a subdirectory of a repository (Delisa Mason)
|
9
|
+
* Ctrl+A/E (home and end) added for Linux (Tomasz Wegrzanowski)
|
10
|
+
* Trim line deletes newline if rest of line is empty (Tomasz Wegrzanowski)
|
11
|
+
* Fuzzy finders (e.g. find file) ignore spaces. (Tomasz Wegrzanowski)
|
12
|
+
* Highlighting the current file in the project tree is now optional and is in the Project menu (Delisa Mason)
|
13
|
+
* Document Search is now incremental (Delisa Mason)
|
14
|
+
* REPL Enhancements, including commit on Return (Delisa Mason)
|
15
|
+
* Mirah syntax checking (Michal Hantl)
|
16
|
+
* Mirah REPL (Delisa Mason)
|
17
|
+
* More keybindings for adjusting views, such as changing font size, notebook width, and focussed tree (Delisa Mason)
|
18
|
+
* New look! (Max Hawkins)
|
19
|
+
* 3+ notebooks allowed at once (Dotan J. Nahum)
|
20
|
+
* Configurable test runner plugin (Chris Nelson)
|
21
|
+
* Added menu mnemonics for Linux and Windows (Delisa Mason)
|
22
|
+
* Much improved search and replace behaviour (Tom Murray)
|
23
|
+
|
24
|
+
Bugfixes:
|
25
|
+
|
26
|
+
* TitleCase now works when the selected text has capital letters in it (Delisa Mason)
|
27
|
+
* Go to Declaration is only available when a project is open (Delisa Mason)
|
28
|
+
* Saving a file prompts before overwriting (Delisa Mason)
|
29
|
+
* Encrypt/Decrypt does not happen if a user cancels (Utkarsh Kukreti)
|
30
|
+
* Fix the "Index out of bounds" errors in the pair highlighter (Delisa Mason)
|
31
|
+
* Searching will now scroll the window horizontally (#400) (Delisa Mason)
|
32
|
+
|
33
|
+
New APIs:
|
3
34
|
|
4
|
-
*
|
5
|
-
* Groovy syntax checking is now broken. (Dan Lucraft)
|
35
|
+
* Non-modal text, list, and browser dialogs in Application::Dialog (Delisa Mason)
|
6
36
|
|
7
37
|
Version 0.9.1 (2 December 2010)
|
8
38
|
===============================
|
data/Rakefile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
REDCAR_VERSION = "0.
|
1
|
+
REDCAR_VERSION = "0.10" # also change in lib/redcar.rb!
|
2
2
|
require 'rubygems'
|
3
3
|
require 'fileutils'
|
4
4
|
require 'spec/rake/spectask'
|
@@ -228,6 +228,7 @@ task :release => :gem do
|
|
228
228
|
}
|
229
229
|
|
230
230
|
s3_uploads.each do |source, target|
|
231
|
+
p [source, target]
|
231
232
|
AWS::S3::S3Object.store(target, open(source), 'redcar', :access => :public_read)
|
232
233
|
end
|
233
234
|
end
|
data/lib/redcar.rb
CHANGED
@@ -51,10 +51,10 @@ end
|
|
51
51
|
#
|
52
52
|
# and so on.
|
53
53
|
module Redcar
|
54
|
-
VERSION = '0.
|
54
|
+
VERSION = '0.10' # also change in the Rakefile!
|
55
55
|
VERSION_MAJOR = 0
|
56
|
-
VERSION_MINOR =
|
57
|
-
VERSION_RELEASE =
|
56
|
+
VERSION_MINOR = 10
|
57
|
+
VERSION_RELEASE = 0
|
58
58
|
|
59
59
|
ENVIRONMENTS = [:user, :debug, :test]
|
60
60
|
|
data/lib/redcar/installer.rb
CHANGED
@@ -61,10 +61,9 @@ module Redcar
|
|
61
61
|
"http://redcar.s3.amazonaws.com/clojure-1.2beta1.jar" => "/clojure.jar",
|
62
62
|
"http://redcar.s3.amazonaws.com/clojure-contrib-1.2beta1.jar" => "/clojure-contrib.jar",
|
63
63
|
"http://redcar.s3.amazonaws.com/org-enclojure-repl-server.jar" => nil,
|
64
|
-
|
65
|
-
|
64
|
+
"http://mirrors.ibiblio.org/pub/mirrors/maven2/org/codehaus/groovy/groovy-all/1.7.4/groovy-all-1.7.4.jar" => "/groovy-all.jar",
|
65
|
+
"http://mirrors.ibiblio.org/pub/mirrors/maven2/org/tmatesoft/svnkit/svnkit/1.3.4/svnkit-1.3.4.jar" => "/svnkit.jar",
|
66
66
|
# "http://mirrors.ibiblio.org/pub/mirrors/maven2/rhino/js/1.7R2/js-1.7R2.jar" => "/js.jar",
|
67
|
-
"http://redcar.s3.amazonaws.com/deps/svnkit-1.3.4.jar" => "/svnkit.jar",
|
68
67
|
"http://redcar.s3.amazonaws.com/deps/rhino-js-1.7R2.jar" => "/js.jar"
|
69
68
|
},
|
70
69
|
:windows => {
|
@@ -16,3 +16,10 @@ Then /^I should see a message box containing "([^"]*)"$/ do |arg1|
|
|
16
16
|
Redcar.gui.dialog_adapter.should_get_message(arg1)
|
17
17
|
end
|
18
18
|
|
19
|
+
Then /^I should see a popup text box with title "([^"]*)" and containing "([^"]*)"$/ do |title,text|
|
20
|
+
Redcar.gui.dialog_adapter.should_get_popup_message(title,text)
|
21
|
+
end
|
22
|
+
|
23
|
+
Then /^I should see a popup html box containing "([^"]*)"$/ do |text|
|
24
|
+
Redcar.gui.dialog_adapter.should_get_popup_html(text)
|
25
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
key_presses = {
|
2
|
+
"ARROW_UP" => "up arrow",
|
3
|
+
"ARROW_DOWN" => "down arrow",
|
4
|
+
"ARROW_LEFT" => "left arrow",
|
5
|
+
"ARROW_RIGHT" => "right arrow",
|
6
|
+
"CR" => "return",
|
7
|
+
"BS" => "backspace",
|
8
|
+
"HOME" => "home",
|
9
|
+
"DEL" => "delete"
|
10
|
+
}
|
11
|
+
key_presses.each do |const,text|
|
12
|
+
When "I press the #{text} key" do
|
13
|
+
tab = Redcar.app.focussed_window.focussed_notebook_tab
|
14
|
+
widget = tab.edit_view.controller.mate_text.get_control
|
15
|
+
key = Swt::SWT.const_get(const)
|
16
|
+
FakeKeyEvent.new(key,widget)
|
17
|
+
end
|
18
|
+
end
|
@@ -8,12 +8,12 @@ Then /^the main menu should contain "([^\"]*)" entries$/ do |entries|
|
|
8
8
|
items = main_menu.get_items.to_a
|
9
9
|
items.should_not be_empty
|
10
10
|
texts = items.map {|item| item.get_text }
|
11
|
-
entries.all? {|e| texts.include?(e)}.should be_true
|
11
|
+
entries.all? {|e| texts.include?(get_menu_name(e))}.should be_true
|
12
12
|
end
|
13
13
|
|
14
14
|
Then /^the "([^\"]*)" menu should contain a "([^\"]*)" entry$/ do |menu_text, entry_text|
|
15
15
|
items = main_menu.get_items.to_a
|
16
|
-
menu = items.detect {|i| i.text == menu_text}
|
16
|
+
menu = items.detect {|i| i.text == get_menu_name(menu_text)}
|
17
17
|
items = menu.get_menu.get_items.to_a
|
18
18
|
menu_texts = items.map{|i| i.text.split("\t").first}
|
19
19
|
menu_texts.detect {|t| t == entry_text}.should_not be_nil
|
@@ -21,7 +21,7 @@ end
|
|
21
21
|
|
22
22
|
Then /^the menu item "([^\"]*)\|([^\"]*)" should be (active|inactive)$/ do |menu_name, menu_item, active|
|
23
23
|
items = main_menu.get_items.to_a
|
24
|
-
menu = items.detect {|i| i.text == menu_name}
|
24
|
+
menu = items.detect {|i| i.text == get_menu_name(menu_name)}
|
25
25
|
items = menu.get_menu.get_items.to_a
|
26
26
|
item = items.detect {|i| i.text.split("\t").first == menu_item }
|
27
27
|
case active
|
@@ -34,10 +34,9 @@ end
|
|
34
34
|
|
35
35
|
When /^I (?:open the|click) "([^"]*)" from the "([^"]*)" menu$/ do |menu_item, menu_name|
|
36
36
|
menu_items = menu_name.split("/").inject(main_menu.get_items.to_a.dup) do |items, item_name|
|
37
|
-
m = items.detect {|i| i.text == item_name
|
37
|
+
m = items.detect {|i| i.text == get_menu_name(item_name)}
|
38
38
|
items = m.get_menu.get_items.to_a
|
39
39
|
end
|
40
40
|
item = menu_items.detect {|i| i.text.split("\t").first == menu_item }
|
41
41
|
FakeEvent.new(Swt::SWT::Selection, item)
|
42
|
-
end
|
43
|
-
|
42
|
+
end
|
@@ -3,10 +3,10 @@ Then /^the (.*) speedbar should be open$/ do |class_name|
|
|
3
3
|
Redcar.app.focussed_window.speedbar.class.to_s.should == class_name
|
4
4
|
end
|
5
5
|
|
6
|
-
def get_speedbar_text_field(field_name)
|
7
|
-
speedbar
|
8
|
-
item = speedbar.__get_item_by_label(field_name) ||
|
9
|
-
speedbar.__get_item_by_label(field_name + ":") ||
|
6
|
+
def get_speedbar_text_field(field_name, speedbar=nil)
|
7
|
+
speedbar ||= Redcar.app.focussed_window.speedbar
|
8
|
+
item = speedbar.__get_item_by_label(field_name) ||
|
9
|
+
speedbar.__get_item_by_label(field_name + ":") ||
|
10
10
|
speedbar.__get_item(field_name)
|
11
11
|
expected_klass = Redcar::Speedbar::TextBoxItem
|
12
12
|
unless item.is_a?(expected_klass)
|
@@ -15,6 +15,15 @@ def get_speedbar_text_field(field_name)
|
|
15
15
|
item
|
16
16
|
end
|
17
17
|
|
18
|
+
def get_speedbar_field(field_name, expected_klass, speedbar=nil)
|
19
|
+
speedbar ||= Redcar.app.focussed_window.speedbar
|
20
|
+
item = speedbar.__get_item_by_text_or_name(field_name)
|
21
|
+
unless item.is_a?(expected_klass)
|
22
|
+
raise "expected #{item} to be a #{expected_klass}"
|
23
|
+
end
|
24
|
+
item
|
25
|
+
end
|
26
|
+
|
18
27
|
When /^I type "([^"]*)" into the "([^"]*)" field in the speedbar$/ do |text, field_name|
|
19
28
|
get_speedbar_text_field(field_name).edit_view.document.text = text
|
20
29
|
end
|
@@ -38,6 +47,13 @@ When /^I uncheck "([^"]*)" in the speedbar$/ do |checkbox_name|
|
|
38
47
|
speedbar.controller.execute_listener_in_model(item, false)
|
39
48
|
end
|
40
49
|
|
50
|
+
When /^I choose "([^"]*)" in the "([^"]*)" field in the speedbar$/ do |value, combo_name|
|
51
|
+
speedbar = Redcar.app.focussed_window.speedbar
|
52
|
+
item = get_speedbar_field(combo_name, Redcar::Speedbar::ComboItem)
|
53
|
+
item.set_value(value)
|
54
|
+
speedbar.controller.execute_listener_in_model(item, value)
|
55
|
+
end
|
56
|
+
|
41
57
|
When /^I close the speedbar$/ do
|
42
58
|
Redcar.app.focussed_window.close_speedbar
|
43
59
|
end
|
@@ -46,16 +62,20 @@ Then /^the "([^"]*)" field in the speedbar should have text "([^"]*)"$/ do |fiel
|
|
46
62
|
get_speedbar_text_field(field_name).edit_view.document.to_s.should == text
|
47
63
|
end
|
48
64
|
|
49
|
-
Then /^"([^"]*)" should be checked in the speedbar$/ do |checkbox_name|
|
65
|
+
Then /^"([^"]*)" should( not)? be checked in the speedbar$/ do |checkbox_name, negate|
|
50
66
|
speedbar = Redcar.app.focussed_window.speedbar
|
51
67
|
item = speedbar.__get_item_by_text_or_name(checkbox_name)
|
52
|
-
|
68
|
+
if negate
|
69
|
+
item.value.should be_false
|
70
|
+
else
|
71
|
+
item.value.should be_true
|
72
|
+
end
|
53
73
|
end
|
54
74
|
|
55
|
-
Then /^"([^"]*)" should
|
75
|
+
Then /^"([^"]*)" should be chosen in the "([^"]*)" field in the speedbar$/ do |value, combo_name|
|
56
76
|
speedbar = Redcar.app.focussed_window.speedbar
|
57
|
-
item = speedbar
|
58
|
-
item.value.should
|
77
|
+
item = get_speedbar_field(combo_name, Redcar::Speedbar::ComboItem, speedbar)
|
78
|
+
item.value.should == value
|
59
79
|
end
|
60
80
|
|
61
81
|
Then /^there should( not)? be an open speedbar$/ do |negate|
|
@@ -14,6 +14,15 @@ When "I close the tree" do
|
|
14
14
|
Redcar::Top::CloseTreeCommand.new.run
|
15
15
|
end
|
16
16
|
|
17
|
+
When /^I switch (up|down) a tree$/ do |type|
|
18
|
+
case type
|
19
|
+
when "down"
|
20
|
+
Redcar::Top::SwitchTreeDownCommand.new.run
|
21
|
+
when "up"
|
22
|
+
Redcar::Top::SwitchTreeUpCommand.new.run
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
17
26
|
When "I click the close button" do
|
18
27
|
vtabitem = focussed_window.treebook.controller.tab_folder.selection
|
19
28
|
swtlabel = swt_label_for_item(vtabitem)
|
@@ -60,6 +69,10 @@ Then /^there should (not )?be a tree titled "([^\"]*)"$/ do |negate,title|
|
|
60
69
|
end
|
61
70
|
end
|
62
71
|
|
72
|
+
Then /^the focussed tree should be titled "([^\"]*)"$/ do |title|
|
73
|
+
focussed_tree.title.should == title
|
74
|
+
end
|
75
|
+
|
63
76
|
Then /^the tree width should be (the default|\d+ pixels|the minimum size)$/ do |w|
|
64
77
|
width = focussed_treebook_width
|
65
78
|
if w == "the default"
|
@@ -3,6 +3,10 @@ require File.expand_path("../fake_event", __FILE__)
|
|
3
3
|
class TestingError < StandardError
|
4
4
|
end
|
5
5
|
|
6
|
+
def get_menu_name text
|
7
|
+
Redcar::Menu.parse(text)
|
8
|
+
end
|
9
|
+
|
6
10
|
module SwtHelper
|
7
11
|
def main_menu
|
8
12
|
display = Redcar::ApplicationSWT.display
|
@@ -22,7 +26,7 @@ module SwtHelper
|
|
22
26
|
def focussed_window
|
23
27
|
Redcar.app.focussed_window
|
24
28
|
end
|
25
|
-
|
29
|
+
|
26
30
|
def focussed_treebook_width
|
27
31
|
Redcar.app.focussed_window.controller.treebook_width
|
28
32
|
end
|
@@ -30,11 +34,11 @@ module SwtHelper
|
|
30
34
|
def focussed_tree
|
31
35
|
focussed_window.treebook.focussed_tree
|
32
36
|
end
|
33
|
-
|
37
|
+
|
34
38
|
def default_treebook_width
|
35
39
|
Redcar.app.focussed_window.controller.default_treebook_width
|
36
40
|
end
|
37
|
-
|
41
|
+
|
38
42
|
def tree_with_title(title)
|
39
43
|
focussed_window.treebook.trees.detect {|t| t.tree_mirror.title == title }
|
40
44
|
end
|
@@ -100,6 +104,36 @@ class FakeDialogAdapter
|
|
100
104
|
@message = message
|
101
105
|
end
|
102
106
|
|
107
|
+
def should_get_popup_message(title,text)
|
108
|
+
@popup_message = text
|
109
|
+
@popup_title = title
|
110
|
+
end
|
111
|
+
|
112
|
+
def should_get_popup_html(text)
|
113
|
+
@popup_html = text
|
114
|
+
end
|
115
|
+
|
116
|
+
def popup_html(*args)
|
117
|
+
unless @popup_text
|
118
|
+
raise TestingError.new("got a popup html dialog with text #{@popup_html.inspect} where I didn't expect one")
|
119
|
+
end
|
120
|
+
unless @popup_text == args.first.inspect
|
121
|
+
raise TestingError.new("expected text #{@popup_text.inspect}, got #{args.first.inspect}")
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
def popup_text(*args)
|
126
|
+
unless @popup_title and @popup_message
|
127
|
+
raise TestingError.new("got a popup dialog titled #{@popup_title.inspect} with text #{@popup_message.inspect} where I didn't expect one")
|
128
|
+
end
|
129
|
+
unless @popup_title == args.first
|
130
|
+
raise TestingError.new("expected title #{@popup_title.inspect}, got #{args.first.inspect}")
|
131
|
+
end
|
132
|
+
unless @popup_message == args[1]
|
133
|
+
raise TestingError.new("expected text #{@popup_message.inspect}, got #{args[1].inspect}")
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
103
137
|
def open_file(*args)
|
104
138
|
check_for_raise(@responses[:open_file])
|
105
139
|
end
|
@@ -131,7 +165,7 @@ class FakeDialogAdapter
|
|
131
165
|
end
|
132
166
|
val = @inputs[0]
|
133
167
|
@inputs.delete_at(0)
|
134
|
-
{:value => val
|
168
|
+
{:value => val, :button => :ok}
|
135
169
|
end
|
136
170
|
|
137
171
|
def add_input(value)
|
@@ -160,7 +194,7 @@ end
|
|
160
194
|
|
161
195
|
World(SwtHelper)
|
162
196
|
|
163
|
-
def close_everything
|
197
|
+
def close_everything
|
164
198
|
Redcar.app.task_queue.cancel_all
|
165
199
|
Swt.sync_exec do
|
166
200
|
dialogs.each {|d| d.controller.model.close }
|
@@ -12,3 +12,15 @@ class FakeEvent
|
|
12
12
|
widget.notify_listeners(event_type, untyped_event)
|
13
13
|
end
|
14
14
|
end
|
15
|
+
|
16
|
+
class FakeKeyEvent
|
17
|
+
def initialize(key_code, widget)
|
18
|
+
event = Swt::Widgets::Event.new
|
19
|
+
event.display = Swt.display
|
20
|
+
event.widget = widget
|
21
|
+
event.type = Swt::SWT::KeyDown
|
22
|
+
event.keyCode = key_code
|
23
|
+
|
24
|
+
widget.notify_listeners(event.type,event)
|
25
|
+
end
|
26
|
+
end
|
@@ -10,6 +10,7 @@ require 'application/clipboard'
|
|
10
10
|
require 'application/command'
|
11
11
|
require 'application/dialog'
|
12
12
|
require 'application/dialogs/filter_list_dialog'
|
13
|
+
require 'application/dialogs/modeless_list_dialog'
|
13
14
|
require 'application/event_spewer'
|
14
15
|
require 'application/keymap'
|
15
16
|
require 'application/keymap/builder'
|
@@ -265,6 +266,10 @@ module Redcar
|
|
265
266
|
keymap = Keymap.new("main", Redcar.platform)
|
266
267
|
Redcar.plugin_manager.objects_implementing(:keymaps).each do |object|
|
267
268
|
maps = object.keymaps
|
269
|
+
unless maps
|
270
|
+
puts "#{object.inspect} implements :keymaps but :keymaps returns nil"
|
271
|
+
maps = []
|
272
|
+
end
|
268
273
|
keymaps = maps.select do |map|
|
269
274
|
map.name == "main" and map.platforms.include?(Redcar.platform)
|
270
275
|
end
|
@@ -378,9 +383,3 @@ module Redcar
|
|
378
383
|
end
|
379
384
|
end
|
380
385
|
end
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
@@ -5,7 +5,7 @@ module Redcar
|
|
5
5
|
def self.in_dialog?
|
6
6
|
@in_dialog
|
7
7
|
end
|
8
|
-
|
8
|
+
|
9
9
|
# Do not call
|
10
10
|
def self.in_dialog
|
11
11
|
@in_dialog = true
|
@@ -13,12 +13,12 @@ module Redcar
|
|
13
13
|
@in_dialog = false
|
14
14
|
r
|
15
15
|
end
|
16
|
-
|
16
|
+
|
17
17
|
# Prompt the user with an open file dialog. Returns a path.
|
18
18
|
def self.open_file(options)
|
19
19
|
in_dialog { Redcar.gui.dialog_adapter.open_file(options) }
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
# Prompt the user with an open directory dialog. Returns a path.
|
23
23
|
def self.open_directory(options)
|
24
24
|
in_dialog { Redcar.gui.dialog_adapter.open_directory(options) }
|
@@ -28,7 +28,7 @@ module Redcar
|
|
28
28
|
def self.save_file(options)
|
29
29
|
in_dialog { Redcar.gui.dialog_adapter.save_file(options) }
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
# Show a message to the user. Requires a message and
|
33
33
|
# options can be:
|
34
34
|
#
|
@@ -39,7 +39,7 @@ module Redcar
|
|
39
39
|
#
|
40
40
|
# For example:
|
41
41
|
#
|
42
|
-
# >> Application::Dialog.message_box("YO!", :type => :info,
|
42
|
+
# >> Application::Dialog.message_box("YO!", :type => :info,
|
43
43
|
# >> :buttons => :yes_no_cancel)
|
44
44
|
# => :yes
|
45
45
|
def self.message_box(text, options={})
|
@@ -51,19 +51,19 @@ module Redcar
|
|
51
51
|
end
|
52
52
|
in_dialog { Redcar.gui.dialog_adapter.message_box(text, options) }
|
53
53
|
end
|
54
|
-
|
54
|
+
|
55
55
|
# Returns the list of valid button combos that can be passed
|
56
56
|
# as an option to message_box.
|
57
57
|
def self.available_message_box_button_combos
|
58
58
|
in_dialog { Redcar.gui.dialog_adapter.available_message_box_button_combos }
|
59
59
|
end
|
60
|
-
|
60
|
+
|
61
61
|
# Returns the list of valid message box types that can be passed
|
62
62
|
# as an option to message_box
|
63
63
|
def self.available_message_box_types
|
64
64
|
in_dialog { Redcar.gui.dialog_adapter.available_message_box_types }
|
65
65
|
end
|
66
|
-
|
66
|
+
|
67
67
|
# Show a dialog containing a text entry box to the user, and blocks
|
68
68
|
# until they dismiss it.
|
69
69
|
#
|
@@ -94,12 +94,14 @@ module Redcar
|
|
94
94
|
def self.password_input(title, message)
|
95
95
|
in_dialog { Redcar.gui.dialog_adapter.password_input(title, message) }
|
96
96
|
end
|
97
|
-
|
97
|
+
|
98
98
|
# Shows a tool tip to the user, at the cursor location.
|
99
99
|
#
|
100
100
|
# Allowed locations:
|
101
101
|
# * :cursor - the location of the text cursor in the focussed text widget
|
102
|
+
# * :below_cursor - on the line directly below :cursor
|
102
103
|
# * :pointer - the location of the mouse pointer
|
104
|
+
# * character offset - a position in the text
|
103
105
|
#
|
104
106
|
# If :cursor is specified with no open tab, it will default to :pointer.
|
105
107
|
#
|
@@ -108,12 +110,14 @@ module Redcar
|
|
108
110
|
def self.tool_tip(message, location)
|
109
111
|
Redcar.gui.dialog_adapter.tool_tip(message, location)
|
110
112
|
end
|
111
|
-
|
113
|
+
|
112
114
|
# Shows a popup menu to the user.
|
113
115
|
#
|
114
116
|
# Allowed locations:
|
115
117
|
# * :cursor - the location of the text cursor in the focussed text widget
|
118
|
+
# * :below_cursor - on the line directly below :cursor
|
116
119
|
# * :pointer - the location of the mouse pointer
|
120
|
+
# * character offset - a position in the text
|
117
121
|
#
|
118
122
|
# If :cursor is specified with no open tab, it will default to :pointer.
|
119
123
|
#
|
@@ -122,6 +126,45 @@ module Redcar
|
|
122
126
|
def self.popup_menu(menu, location)
|
123
127
|
Redcar.gui.dialog_adapter.popup_menu(menu, location)
|
124
128
|
end
|
129
|
+
|
130
|
+
# Shows a non-modal popup text box to the user which closes
|
131
|
+
# on keyboard input or lost focus
|
132
|
+
#
|
133
|
+
# Allowed locations:
|
134
|
+
# * :cursor - the location of the text cursor in the focussed text widget
|
135
|
+
# * :below_cursor - on the line directly below :cursor
|
136
|
+
# * :pointer - the location of the mouse pointer
|
137
|
+
# * character offset - a position in the text
|
138
|
+
#
|
139
|
+
# If :cursor is specified with no open tab, it will default to :pointer.
|
140
|
+
#
|
141
|
+
# @param [String] title
|
142
|
+
# @param [String] message
|
143
|
+
# @param [Symbol] location
|
144
|
+
# @param [Array<Integer>] dimensions - The width and height of the text box
|
145
|
+
# the width is measured in pixels and the height in rows
|
146
|
+
def self.popup_text(title, message, location,dimensions=nil)
|
147
|
+
Redcar.gui.dialog_adapter.popup_text(title,message,location,dimensions)
|
148
|
+
end
|
149
|
+
|
150
|
+
# Shows a non-modal popup html text box to the user which closes
|
151
|
+
# on keyboard input
|
152
|
+
#
|
153
|
+
# Allowed locations:
|
154
|
+
# * :cursor - the location of the text cursor in the focussed text widget
|
155
|
+
# * :below_cursor - on the line directly below :cursor
|
156
|
+
# * :pointer - the location of the mouse pointer
|
157
|
+
# * character offset - a position in the text
|
158
|
+
#
|
159
|
+
# If :cursor is specified with no open tab, it will default to :pointer.
|
160
|
+
#
|
161
|
+
# @param [String] text
|
162
|
+
# @param [Symbol] location
|
163
|
+
# @param [Array<Integer>] dimensions - The width and height of the text box
|
164
|
+
# in pixels
|
165
|
+
def self.popup_html(text, location, dimensions=nil)
|
166
|
+
Redcar.gui.dialog_adapter.popup_html(text,location,dimensions)
|
167
|
+
end
|
125
168
|
end
|
126
169
|
end
|
127
170
|
end
|