redcar 0.3.1dev → 0.3.2dev
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +34 -1
- data/README.md +2 -1
- data/ROADMAP.md +13 -45
- data/Rakefile +15 -14
- data/bin/redcar +4 -1
- data/lib/plugin_manager/README.md +61 -0
- data/lib/plugin_manager/Rakefile +55 -0
- data/lib/plugin_manager/bin/plugin_manager +4 -0
- data/lib/plugin_manager/lib/plugin_manager.rb +107 -0
- data/lib/plugin_manager/lib/plugin_manager/definition_builder.rb +37 -0
- data/lib/plugin_manager/lib/plugin_manager/plugin.rb +9 -0
- data/lib/plugin_manager/lib/plugin_manager/plugin_definition.rb +50 -0
- data/lib/plugin_manager/plugin_manager.gemspec +33 -0
- data/lib/plugin_manager/spec/fixtures/error_in_definition/core/plugin.rb +2 -0
- data/lib/plugin_manager/spec/fixtures/error_in_plugin/core/core.rb +4 -0
- data/lib/plugin_manager/spec/fixtures/error_in_plugin/core/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/example/core/core.rb +20 -0
- data/lib/plugin_manager/spec/fixtures/example/core/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/example/debug/debug.rb +6 -0
- data/lib/plugin_manager/spec/fixtures/example/debug/plugin.rb +8 -0
- data/lib/plugin_manager/spec/fixtures/example/extras/extras.rb +6 -0
- data/lib/plugin_manager/spec/fixtures/example/extras/plugin.rb +8 -0
- data/lib/plugin_manager/spec/fixtures/two_versions1/core/core.rb +20 -0
- data/lib/plugin_manager/spec/fixtures/two_versions1/core/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/two_versions1/core2/core.rb +20 -0
- data/lib/plugin_manager/spec/fixtures/two_versions1/core2/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/two_versions2/core/core.rb +20 -0
- data/lib/plugin_manager/spec/fixtures/two_versions2/core/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/two_versions2/core2/core.rb +20 -0
- data/lib/plugin_manager/spec/fixtures/two_versions2/core2/plugin.rb +8 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies1/core/core.rb +10 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies1/core/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies1/debug/debug.rb +6 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies1/debug/plugin.rb +8 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies2/core/core.rb +10 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies2/core/plugin.rb +7 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies2/debug/debug.rb +6 -0
- data/lib/plugin_manager/spec/fixtures/unmet_dependencies2/debug/plugin.rb +8 -0
- data/lib/plugin_manager/spec/plugin_manager_spec.rb +208 -0
- data/lib/plugin_manager/spec/spec_helper.rb +3 -0
- data/lib/redcar.rb +8 -3
- data/lib/redcar/boot.rb +59 -56
- data/lib/redcar/installer.rb +1 -1
- data/lib/redcar/instance_exec.rb +25 -0
- data/lib/redcar/runner.rb +5 -1
- data/lib/redcar/usage.rb +5 -1
- data/plugins/application/icons/close.png +0 -0
- data/plugins/application/lib/application.rb +61 -28
- data/plugins/application/lib/application/clipboard.rb +71 -0
- data/plugins/application/lib/application/dialog.rb +63 -0
- data/plugins/application/lib/application/menu.rb +32 -1
- data/plugins/application/lib/application/menu/builder.rb +10 -4
- data/plugins/application/lib/application/menu/item.rb +16 -3
- data/plugins/application/lib/application/notebook.rb +5 -0
- data/plugins/application/lib/application/speedbar.rb +73 -0
- data/plugins/application/lib/application/window.rb +25 -0
- data/plugins/application/plugin.rb +8 -0
- data/plugins/application/spec/application/clipboard_spec.rb +36 -0
- data/plugins/application/spec/application/menu_spec.rb +73 -1
- data/plugins/application/spec/application/speedbar_spec.rb +46 -0
- data/plugins/application/spec/spec_helper.rb +1 -1
- data/plugins/application_swt/lib/application_swt.rb +18 -11
- data/plugins/application_swt/lib/application_swt/clipboard.rb +42 -0
- data/plugins/application_swt/lib/application_swt/dialog_adapter.rb +68 -0
- data/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb +1 -1
- data/plugins/application_swt/lib/application_swt/html_tab.rb +32 -0
- data/plugins/application_swt/lib/application_swt/menu.rb +57 -21
- data/plugins/application_swt/lib/application_swt/menu/binding_translator.rb +39 -2
- data/plugins/application_swt/lib/application_swt/notebook.rb +5 -0
- data/plugins/application_swt/lib/application_swt/speedbar.rb +187 -0
- data/plugins/application_swt/lib/application_swt/swt_wrapper.rb +24 -1
- data/plugins/application_swt/lib/application_swt/window.rb +33 -3
- data/plugins/application_swt/plugin.rb +8 -0
- data/plugins/application_swt/spec/spec_helper.rb +1 -1
- data/plugins/auto_completer/features/auto_complete.feature +65 -0
- data/plugins/auto_completer/features/step_definitions/auto_complete_steps.rb +4 -0
- data/plugins/auto_completer/features/support/env.rb +4 -0
- data/plugins/auto_completer/lib/auto_completer.rb +99 -0
- data/plugins/auto_completer/lib/auto_completer/document_controller.rb +52 -0
- data/plugins/auto_completer/lib/auto_completer/word_iterator.rb +48 -0
- data/plugins/auto_completer/lib/auto_completer/word_list.rb +40 -0
- data/plugins/auto_completer/plugin.rb +10 -0
- data/plugins/auto_indenter/lib/auto_indenter.rb +1 -1
- data/plugins/auto_indenter/lib/auto_indenter/document_controller.rb +1 -1
- data/plugins/auto_indenter/plugin.rb +8 -0
- data/plugins/core/lib/core.rb +6 -30
- data/plugins/core/lib/core/gui.rb +7 -2
- data/plugins/core/lib/core/logger.rb +7 -4
- data/plugins/core/lib/core/plugin/storage.rb +15 -5
- data/plugins/core/plugin.rb +7 -0
- data/plugins/core/spec/core/storage_spec.rb +0 -9
- data/plugins/edit_view/features/cut_and_paste.feature +45 -0
- data/plugins/edit_view/features/step_definitions/editing_steps.rb +22 -0
- data/plugins/edit_view/features/step_definitions/key_steps.rb +1 -1
- data/plugins/edit_view/features/step_definitions/notebook_steps.rb +1 -1
- data/plugins/edit_view/features/step_definitions/tab_steps.rb +2 -0
- data/plugins/edit_view/features/step_definitions/window_steps.rb +1 -1
- data/plugins/edit_view/features/support/env.rb +2 -2
- data/plugins/edit_view/lib/edit_view.rb +24 -13
- data/plugins/edit_view/lib/edit_view/document.rb +233 -15
- data/plugins/edit_view/lib/edit_view/edit_tab.rb +2 -2
- data/plugins/edit_view/plugin.rb +9 -0
- data/plugins/edit_view/spec/spec_helper.rb +1 -1
- data/plugins/edit_view_swt/lib/edit_view_swt.rb +37 -8
- data/plugins/edit_view_swt/lib/edit_view_swt/document.rb +59 -24
- data/plugins/edit_view_swt/lib/edit_view_swt/word_movement.rb +66 -0
- data/plugins/edit_view_swt/plugin.rb +9 -0
- data/plugins/edit_view_swt/spec/edit_view_swt/word_movement_spec.rb +29 -0
- data/plugins/edit_view_swt/spec/spec_helper.rb +6 -0
- data/plugins/html_view/assets/blueprint/ie.css +35 -0
- data/plugins/html_view/assets/blueprint/print.css +29 -0
- data/plugins/html_view/assets/blueprint/screen.css +257 -0
- data/plugins/html_view/assets/blueprint/src/forms.css +65 -0
- data/plugins/html_view/assets/blueprint/src/grid.css +281 -0
- data/plugins/html_view/assets/blueprint/src/grid.png +0 -0
- data/plugins/html_view/assets/blueprint/src/ie.css +76 -0
- data/plugins/html_view/assets/blueprint/src/print.css +85 -0
- data/plugins/html_view/assets/blueprint/src/reset.css +38 -0
- data/plugins/html_view/assets/blueprint/src/typography.css +106 -0
- data/plugins/html_view/assets/jquery-1.4.min.js +151 -0
- data/plugins/html_view/assets/redcar.css +12 -0
- data/plugins/html_view/lib/html_controller.rb +5 -0
- data/plugins/html_view/lib/html_view.rb +47 -0
- data/plugins/html_view/lib/html_view/html_tab.rb +16 -0
- data/plugins/html_view/plugin.rb +12 -0
- data/plugins/my_plugin/lib/my_plugin.rb +55 -0
- data/plugins/my_plugin/plugin.rb +8 -0
- data/plugins/plugin_manager_ui/lib/plugin_manager_ui.rb +62 -0
- data/plugins/plugin_manager_ui/plugin.rb +12 -0
- data/plugins/plugin_manager_ui/views/index.html.erb +31 -0
- data/plugins/project/lib/project.rb +27 -13
- data/plugins/project/lib/project/find_file_dialog.rb +25 -19
- data/plugins/project/plugin.rb +8 -0
- data/plugins/project/spec/spec_helper.rb +1 -1
- data/plugins/redcar/plugin.rb +13 -0
- data/plugins/redcar/redcar.rb +249 -8
- data/plugins/repl/lib/repl.rb +22 -14
- data/plugins/repl/plugin.rb +8 -0
- data/plugins/repl/spec/spec_helper.rb +1 -1
- data/plugins/tree/plugin.rb +9 -0
- data/plugins/tree/spec/spec_helper.rb +1 -1
- data/plugins/tree_view_swt/plugin.rb +9 -0
- data/textmate/Bundles/Apache.tmbundle/Syntaxes/Apache.plist +544 -0
- data/textmate/Bundles/Apache.tmbundle/Syntaxes/mod_perl.tmLanguage +120 -0
- data/textmate/Bundles/Blogging.tmbundle/Syntaxes/Blog___HTML__.plist +88 -0
- data/textmate/Bundles/Blogging.tmbundle/Syntaxes/Blog___Markdown__.plist +89 -0
- data/textmate/Bundles/Blogging.tmbundle/Syntaxes/Blog___Text__.plist +74 -0
- data/textmate/Bundles/Blogging.tmbundle/Syntaxes/Blog___Textile__.plist +74 -0
- data/textmate/Bundles/Bundle Development.tmbundle/Syntaxes/LanguageGrammar.tmLanguage +1829 -0
- data/textmate/Bundles/C Sharp.tmbundle/Syntaxes/Build.tmLanguage +142 -0
- data/textmate/Bundles/C Sharp.tmbundle/Syntaxes/C__.tmLanguage +524 -0
- data/textmate/Bundles/C++ Qt.tmbundle/Syntaxes/Qt_C____.tmLanguage +62 -0
- data/textmate/Bundles/C++ Qt.tmbundle/Syntaxes/qmake_Project.tmLanguage +308 -0
- data/textmate/Bundles/C.tmbundle/Syntaxes/C.plist +90 -48
- data/textmate/Bundles/Clojure.tmbundle/Syntaxes/Clojure.tmLanguage +427 -0
- data/textmate/Bundles/Cucumber.tmbundle/Syntaxes/Cucumber_Plain_Text_Feature.tmLanguage +106 -13
- data/textmate/Bundles/Cucumber.tmbundle/Syntaxes/Cucumber_Steps.tmLanguage +177 -2
- data/textmate/Bundles/Cucumber.tmbundle/Syntaxes/plaintext_template.erb +109 -17
- data/textmate/Bundles/D.tmbundle/Syntaxes/D.tmLanguage +908 -0
- data/textmate/Bundles/Diff.tmbundle/Syntaxes/Diff.plist +229 -0
- data/textmate/Bundles/DokuWiki.tmbundle/Syntaxes/DokuWiki.tmLanguage +649 -0
- data/textmate/Bundles/F-Script.tmbundle/Syntaxes/F__Script.plist +219 -0
- data/textmate/Bundles/Haskell.tmbundle/Syntaxes/Haskell.plist +646 -0
- data/textmate/Bundles/Haskell.tmbundle/Syntaxes/Literate_Haskell.plist +90 -0
- data/textmate/Bundles/Io.tmbundle/Syntaxes/Io.plist +225 -0
- data/textmate/Bundles/JSON.tmbundle/Syntaxes/JSON.tmLanguage +285 -0
- data/textmate/Bundles/JavaScript Prototype & Script_aculo_us.tmbundle/Syntaxes/JavaScript____Prototype.tmLanguage +193 -0
- data/textmate/Bundles/JavaScript Prototype & Script_aculo_us.tmbundle/Syntaxes/JavaScript____Prototype_Bracketed.tmLanguage +394 -0
- data/textmate/Bundles/JavaScript jQuery.tmbundle/Syntaxes/jQuery___JavaScript__.tmLanguage +440 -0
- data/textmate/Bundles/JavaScript.tmbundle/Syntaxes/JavaScript.plist +712 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/Bibtex.plist +406 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/LaTeX.plist +1601 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/LaTeX_Beamer.plist +106 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/LaTeX_Log.plist +141 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/LaTeX_Memoir.tmLanguage +165 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/TeX.plist +246 -0
- data/textmate/Bundles/Latex.tmbundle/Syntaxes/TeX_Math.plist +132 -0
- data/textmate/Bundles/Lisp.tmbundle/Syntaxes/Lisp.plist +160 -0
- data/textmate/Bundles/Makefile.tmbundle/Syntaxes/Makefile.plist +103 -0
- data/textmate/Bundles/Markdown.tmbundle/Syntaxes/Markdown.plist +1192 -0
- data/textmate/Bundles/Markdown.tmbundle/Syntaxes/MultiMarkdown.tmLanguage +80 -0
- data/textmate/Bundles/PHP.tmbundle/Syntaxes/PHP.plist +3481 -0
- data/textmate/Bundles/Perl HTML-Template.tmbundle/Syntaxes/Perl_HTML__Template.tmLanguage +217 -0
- data/textmate/Bundles/Perl Template Toolkit.tmbundle/Syntaxes/HTML___Template_Toolkit__.tmLanguage +339 -0
- data/textmate/Bundles/Postscript.tmbundle/Syntaxes/Postscript.tmLanguage +321 -0
- data/textmate/Bundles/Processing.tmbundle/Syntaxes/Processing.plist +296 -0
- data/textmate/Bundles/Property List.tmbundle/Syntaxes/Property_List.tmLanguage +1650 -0
- data/textmate/Bundles/Python Django Templates.tmbundle/Syntaxes/HTML___Django__.tmLanguage +104 -0
- data/textmate/Bundles/Python Django.tmbundle/Syntaxes/Python_Django.tmLanguage +57 -0
- data/textmate/Bundles/Python.tmbundle/Syntaxes/Python.tmLanguage +3016 -0
- data/textmate/Bundles/Python.tmbundle/Syntaxes/Regular_Expressions___Python__.tmLanguage +299 -0
- data/textmate/Bundles/Rez.tmbundle/Syntaxes/Rez.plist +219 -0
- data/textmate/Bundles/Ruby Haml.tmbundle/Syntaxes/Ruby_Haml.tmLanguage +403 -0
- data/textmate/Bundles/Ruby RSpec.tmbundle/Syntaxes/RSpec.tmLanguage +142 -0
- data/textmate/Bundles/Ruby.tmbundle/Syntaxes/Ruby.plist +139 -49
- data/textmate/Bundles/SQL.tmbundle/Syntaxes/SQL.plist +705 -0
- data/textmate/Bundles/SSH-Config.tmbundle/Syntaxes/SSH__Config.tmLanguage +88 -0
- data/textmate/Bundles/Scala.tmbundle/Syntaxes/Scala.tmLanguage +609 -0
- data/textmate/Bundles/Scala.tmbundle/Syntaxes/Scala_Properties.tmLanguage +54 -0
- data/textmate/Bundles/ShellScript.tmbundle/Syntaxes/Shell__Unix__Generic.plist +1855 -0
- data/textmate/Bundles/Tabular.tmbundle/Syntaxes/CSV.tmLanguage +178 -0
- data/textmate/Bundles/Tabular.tmbundle/Syntaxes/TSV.tmLanguage +135 -0
- data/textmate/Bundles/TextMate.tmbundle/Syntaxes/Regular_Expressions___Oniguruma__.tmLanguage +295 -0
- data/textmate/Bundles/TextMate.tmbundle/Syntaxes/Release_Notes.tmLanguage +126 -0
- data/textmate/Bundles/Textile.tmbundle/Syntaxes/Textile.plist +490 -0
- data/textmate/Bundles/Thrift.tmbundle/Syntaxes/Thrift.tmLanguage +1024 -0
- data/textmate/Bundles/XML.tmbundle/Syntaxes/XML.plist +576 -0
- data/textmate/Bundles/XML.tmbundle/Syntaxes/XSL.plist +157 -0
- data/textmate/Bundles/YAML.tmbundle/Syntaxes/YAML.plist +466 -0
- data/textmate/Themes/Django.tmTheme +436 -0
- metadata +371 -325
- data/config/default.yaml +0 -15
- data/lib/freebase2/README.txt +0 -47
- data/lib/freebase2/bin/default.yaml +0 -15
- data/lib/freebase2/bin/install.rb +0 -42
- data/lib/freebase2/bin/run.rb +0 -48
- data/lib/freebase2/lib/freebase/configuration.rb +0 -535
- data/lib/freebase2/lib/freebase/core.rb +0 -197
- data/lib/freebase2/lib/freebase/databus.rb +0 -1128
- data/lib/freebase2/lib/freebase/freebase.rb +0 -60
- data/lib/freebase2/lib/freebase/logger.rb +0 -117
- data/lib/freebase2/lib/freebase/plugin.rb +0 -384
- data/lib/freebase2/lib/freebase/properties.rb +0 -130
- data/lib/freebase2/lib/freebase/readers.rb +0 -328
- data/lib/freebase2/notes +0 -61
- data/lib/freebase2/plugins/raa_webrick/httpd.rb +0 -125
- data/lib/freebase2/plugins/raa_webrick/plugin.yaml +0 -7
- data/lib/freebase2/plugins/raa_webrick/web_root/test.html +0 -5
- data/lib/freebase2/plugins/raa_webrick/webserver.yaml +0 -6
- data/lib/freebase2/plugins/raa_xmlrpc4r/plugin.xml +0 -8
- data/lib/freebase2/plugins/raa_xmlrpc4r/rpcd.rb +0 -54
- data/lib/freebase2/regress/README +0 -1
- data/lib/little_plugger/History.txt +0 -20
- data/lib/little_plugger/Rakefile +0 -34
- data/lib/little_plugger/lib/little-plugger.rb +0 -323
- data/lib/little_plugger/spec/little-plugger_spec.rb +0 -26
- data/lib/little_plugger/spec/spec_helper.rb +0 -16
- data/lib/logging/History.txt +0 -240
- data/lib/logging/Rakefile +0 -37
- data/lib/logging/data/bad_logging_1.rb +0 -13
- data/lib/logging/data/bad_logging_2.rb +0 -21
- data/lib/logging/data/logging.rb +0 -42
- data/lib/logging/data/logging.yaml +0 -63
- data/lib/logging/data/simple_logging.rb +0 -13
- data/lib/logging/examples/appenders.rb +0 -47
- data/lib/logging/examples/classes.rb +0 -41
- data/lib/logging/examples/consolidation.rb +0 -83
- data/lib/logging/examples/formatting.rb +0 -51
- data/lib/logging/examples/hierarchies.rb +0 -73
- data/lib/logging/examples/layouts.rb +0 -48
- data/lib/logging/examples/loggers.rb +0 -29
- data/lib/logging/examples/names.rb +0 -43
- data/lib/logging/examples/simple.rb +0 -17
- data/lib/logging/lib/logging.rb +0 -501
- data/lib/logging/lib/logging/appender.rb +0 -251
- data/lib/logging/lib/logging/appenders.rb +0 -131
- data/lib/logging/lib/logging/appenders/buffering.rb +0 -168
- data/lib/logging/lib/logging/appenders/console.rb +0 -60
- data/lib/logging/lib/logging/appenders/email.rb +0 -75
- data/lib/logging/lib/logging/appenders/file.rb +0 -58
- data/lib/logging/lib/logging/appenders/growl.rb +0 -197
- data/lib/logging/lib/logging/appenders/io.rb +0 -69
- data/lib/logging/lib/logging/appenders/rolling_file.rb +0 -293
- data/lib/logging/lib/logging/appenders/string_io.rb +0 -68
- data/lib/logging/lib/logging/appenders/syslog.rb +0 -194
- data/lib/logging/lib/logging/config/configurator.rb +0 -188
- data/lib/logging/lib/logging/config/yaml_configurator.rb +0 -191
- data/lib/logging/lib/logging/layout.rb +0 -117
- data/lib/logging/lib/logging/layouts.rb +0 -47
- data/lib/logging/lib/logging/layouts/basic.rb +0 -32
- data/lib/logging/lib/logging/layouts/parseable.rb +0 -211
- data/lib/logging/lib/logging/layouts/pattern.rb +0 -311
- data/lib/logging/lib/logging/log_event.rb +0 -45
- data/lib/logging/lib/logging/logger.rb +0 -503
- data/lib/logging/lib/logging/repository.rb +0 -232
- data/lib/logging/lib/logging/root_logger.rb +0 -61
- data/lib/logging/lib/logging/stats.rb +0 -278
- data/lib/logging/lib/logging/utils.rb +0 -153
- data/lib/logging/lib/spec/logging_helper.rb +0 -34
- data/lib/logging/test/appenders/test_buffered_io.rb +0 -176
- data/lib/logging/test/appenders/test_console.rb +0 -66
- data/lib/logging/test/appenders/test_email.rb +0 -170
- data/lib/logging/test/appenders/test_file.rb +0 -95
- data/lib/logging/test/appenders/test_growl.rb +0 -127
- data/lib/logging/test/appenders/test_io.rb +0 -129
- data/lib/logging/test/appenders/test_rolling_file.rb +0 -200
- data/lib/logging/test/appenders/test_syslog.rb +0 -194
- data/lib/logging/test/benchmark.rb +0 -86
- data/lib/logging/test/config/test_configurator.rb +0 -70
- data/lib/logging/test/config/test_yaml_configurator.rb +0 -40
- data/lib/logging/test/layouts/test_basic.rb +0 -42
- data/lib/logging/test/layouts/test_json.rb +0 -112
- data/lib/logging/test/layouts/test_pattern.rb +0 -198
- data/lib/logging/test/layouts/test_yaml.rb +0 -121
- data/lib/logging/test/setup.rb +0 -44
- data/lib/logging/test/test_appender.rb +0 -152
- data/lib/logging/test/test_consolidate.rb +0 -46
- data/lib/logging/test/test_layout.rb +0 -110
- data/lib/logging/test/test_log_event.rb +0 -80
- data/lib/logging/test/test_logger.rb +0 -699
- data/lib/logging/test/test_logging.rb +0 -267
- data/lib/logging/test/test_repository.rb +0 -158
- data/lib/logging/test/test_root_logger.rb +0 -81
- data/lib/logging/test/test_stats.rb +0 -274
- data/lib/logging/test/test_utils.rb +0 -116
- data/plugins/application/plugin.yaml +0 -11
- data/plugins/application_swt/plugin.yaml +0 -11
- data/plugins/auto_indenter/plugin.yaml +0 -12
- data/plugins/core/plugin.yaml +0 -7
- data/plugins/edit_view/plugin.yaml +0 -14
- data/plugins/edit_view_swt/plugin.yaml +0 -14
- data/plugins/project/plugin.yaml +0 -12
- data/plugins/redcar/plugin.yaml +0 -18
- data/plugins/repl/plugin.yaml +0 -12
- data/plugins/tree/plugin.yaml +0 -14
- data/plugins/tree_view_swt/plugin.yaml +0 -14
@@ -0,0 +1,46 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "..", "spec_helper")
|
2
|
+
|
3
|
+
describe Redcar::Speedbar do
|
4
|
+
it "should let you add labels" do
|
5
|
+
class LabelSpeedbar < Redcar::Speedbar
|
6
|
+
label "Here is a speedbar"
|
7
|
+
end
|
8
|
+
LabelSpeedbar.items.should == [Redcar::Speedbar::LabelItem.new("Here is a speedbar")]
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should let you add toggles" do
|
12
|
+
class ToggleSpeedbar < Redcar::Speedbar
|
13
|
+
toggle :case_sensitive, "Case Sensitive", "Cmd+L"
|
14
|
+
end
|
15
|
+
ToggleSpeedbar.items.should == [Redcar::Speedbar::ToggleItem.new(:case_sensitive, "Case Sensitive", "Cmd+L", nil, false)]
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should let you add textboxes" do
|
19
|
+
class TextBoxSpeedbar < Redcar::Speedbar
|
20
|
+
textbox :query
|
21
|
+
end
|
22
|
+
TextBoxSpeedbar.items.should == [Redcar::Speedbar::TextBoxItem.new(:query, nil, "")]
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should let you add buttons" do
|
26
|
+
class ButtonSpeedbar < Redcar::Speedbar
|
27
|
+
button :search, "Ctrl+S"
|
28
|
+
end
|
29
|
+
ButtonSpeedbar.items.should == [Redcar::Speedbar::ButtonItem.new(:search, "Ctrl+S")]
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should let you add keys" do
|
33
|
+
class KeySpeedbar < Redcar::Speedbar
|
34
|
+
key "Ctrl+S"
|
35
|
+
end
|
36
|
+
KeySpeedbar.items.should == [Redcar::Speedbar::KeyItem.new("Ctrl+S")]
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should let you get values from instances" do
|
40
|
+
class GetValueSpeedbar < Redcar::Speedbar
|
41
|
+
textbox :query, "start"
|
42
|
+
end
|
43
|
+
sp = GetValueSpeedbar.new(self)
|
44
|
+
sp.query.should == "start"
|
45
|
+
end
|
46
|
+
end
|
@@ -1,17 +1,22 @@
|
|
1
1
|
|
2
|
+
SWT_APP_NAME = "Redcar"
|
3
|
+
|
2
4
|
require "application_swt/swt_wrapper"
|
3
5
|
require "application_swt/swt/listener_helpers"
|
6
|
+
require "application_swt/tab"
|
4
7
|
|
8
|
+
require "application_swt/clipboard"
|
5
9
|
require "application_swt/cucumber_runner"
|
6
10
|
require "application_swt/dialog_adapter"
|
7
11
|
require "application_swt/dialogs/no_buttons_dialog"
|
8
12
|
require "application_swt/dialogs/filter_list_dialog_controller"
|
9
13
|
require "application_swt/event_loop"
|
14
|
+
require "application_swt/html_tab"
|
10
15
|
require "application_swt/menu"
|
11
16
|
require "application_swt/menu/binding_translator"
|
12
17
|
require "application_swt/notebook"
|
13
18
|
require "application_swt/notebook/drag_and_drop_listener"
|
14
|
-
require "application_swt/
|
19
|
+
require "application_swt/speedbar"
|
15
20
|
require "application_swt/treebook"
|
16
21
|
require "application_swt/window"
|
17
22
|
require "application_swt/swt/grid_data"
|
@@ -21,25 +26,22 @@ module Redcar
|
|
21
26
|
include Redcar::Controller
|
22
27
|
|
23
28
|
def self.display
|
24
|
-
@display ||= Swt
|
29
|
+
@display ||= Swt.display
|
25
30
|
end
|
26
|
-
|
27
|
-
def self.
|
31
|
+
|
32
|
+
def self.start
|
28
33
|
Swt::Widgets::Display.app_name = Redcar::Application::NAME
|
29
34
|
@gui = Redcar::Gui.new("swt")
|
30
35
|
@gui.register_event_loop(EventLoop.new)
|
31
36
|
@gui.register_features_runner(CucumberRunner.new)
|
32
37
|
@gui.register_controllers(
|
33
38
|
Redcar::Tab => ApplicationSWT::Tab,
|
39
|
+
Redcar::HtmlTab => ApplicationSWT::HtmlTab,
|
34
40
|
Redcar::FilterListDialog => ApplicationSWT::FilterListDialogController
|
35
41
|
)
|
36
42
|
@gui.register_dialog_adapter(ApplicationSWT::DialogAdapter.new)
|
37
43
|
end
|
38
44
|
|
39
|
-
def self.start
|
40
|
-
# add_debug_key_filters
|
41
|
-
end
|
42
|
-
|
43
45
|
def self.add_debug_key_filters
|
44
46
|
display.add_filter(Swt::SWT::KeyDown) do |a|
|
45
47
|
puts "type: #{a.type}, keyCode: #{a.keyCode}, character: #{a.character}, statemask: #{a.stateMask}"
|
@@ -58,13 +60,18 @@ module Redcar
|
|
58
60
|
Redcar::ApplicationSWT.display.syncExec(runnable)
|
59
61
|
end
|
60
62
|
|
61
|
-
def initialize(
|
62
|
-
@
|
63
|
+
def initialize(model)
|
64
|
+
@model = model
|
63
65
|
add_listeners
|
66
|
+
create_clipboard
|
64
67
|
end
|
65
68
|
|
66
69
|
def add_listeners
|
67
|
-
@
|
70
|
+
@model.add_listener(:new_window, &method(:new_window))
|
71
|
+
end
|
72
|
+
|
73
|
+
def create_clipboard
|
74
|
+
ApplicationSWT::Clipboard.new(@model.clipboard)
|
68
75
|
end
|
69
76
|
|
70
77
|
def new_window(win)
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Redcar
|
2
|
+
class ApplicationSWT
|
3
|
+
|
4
|
+
# The controller for a Clipboard. In SWT a clipboard can only contain
|
5
|
+
# one piece of text, but that's ok because inside Redcar all the Paste
|
6
|
+
# commands are implemented directly from the model. This is only useful
|
7
|
+
# for copying/pasting between other applications and Redcar.
|
8
|
+
class Clipboard
|
9
|
+
attr_accessor :last_set
|
10
|
+
|
11
|
+
def initialize(model)
|
12
|
+
@model = model
|
13
|
+
@model.controller = self
|
14
|
+
@swt_clipboard = Swt::DND::Clipboard.new(Redcar.app.controller.display)
|
15
|
+
attach_model_listeners
|
16
|
+
if contents = get_contents
|
17
|
+
@model.silently_add([contents])
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def plain_text_data_type
|
22
|
+
Swt::DND::TextTransfer.get_instance
|
23
|
+
end
|
24
|
+
|
25
|
+
def attach_model_listeners
|
26
|
+
@model.add_listener(:added_internal) do |text|
|
27
|
+
text = text.join("\n")
|
28
|
+
@last_set = text
|
29
|
+
@swt_clipboard.set_contents([text].to_java(:object), [plain_text_data_type].to_java(Swt::DND::Transfer))
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def changed?
|
34
|
+
@last_set != get_contents
|
35
|
+
end
|
36
|
+
|
37
|
+
def get_contents
|
38
|
+
@swt_clipboard.get_contents(plain_text_data_type)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -13,6 +13,74 @@ module Redcar
|
|
13
13
|
file_dialog(window, Swt::SWT::SAVE, options)
|
14
14
|
end
|
15
15
|
|
16
|
+
MESSAGE_BOX_TYPES = {
|
17
|
+
:info => Swt::SWT::ICON_INFORMATION,
|
18
|
+
:error => Swt::SWT::ICON_ERROR,
|
19
|
+
:question => Swt::SWT::ICON_QUESTION,
|
20
|
+
:warning => Swt::SWT::ICON_WARNING,
|
21
|
+
:working => Swt::SWT::ICON_WORKING
|
22
|
+
}
|
23
|
+
|
24
|
+
BUTTONS = {
|
25
|
+
:yes => Swt::SWT::YES,
|
26
|
+
:no => Swt::SWT::NO,
|
27
|
+
:cancel => Swt::SWT::CANCEL,
|
28
|
+
:retry => Swt::SWT::RETRY,
|
29
|
+
:ok => Swt::SWT::OK,
|
30
|
+
:abort => Swt::SWT::ABORT,
|
31
|
+
:ignore => Swt::SWT::IGNORE
|
32
|
+
}
|
33
|
+
|
34
|
+
MESSAGE_BOX_BUTTON_COMBOS = {
|
35
|
+
:ok => [:ok],
|
36
|
+
:ok_cancel => [:ok, :cancel],
|
37
|
+
:yes_no => [:yes, :no],
|
38
|
+
:yes_no_cancel => [:yes, :no, :cancel],
|
39
|
+
:retry_cancel => [:retry, :cancel],
|
40
|
+
:abort_retry_ignore => [:abort, :retry, :ignore]
|
41
|
+
}
|
42
|
+
|
43
|
+
def message_box(window, text, options)
|
44
|
+
styles = 0
|
45
|
+
styles = styles | MESSAGE_BOX_TYPES[options[:type]] if options[:type]
|
46
|
+
if options[:buttons]
|
47
|
+
buttons = MESSAGE_BOX_BUTTON_COMBOS[options[:buttons]]
|
48
|
+
buttons.each {|b| styles = styles | BUTTONS[b] }
|
49
|
+
end
|
50
|
+
dialog = Swt::Widgets::MessageBox.new(window.controller.shell, styles)
|
51
|
+
dialog.set_message(text)
|
52
|
+
result = dialog.open
|
53
|
+
BUTTONS.invert[result]
|
54
|
+
end
|
55
|
+
|
56
|
+
def buttons
|
57
|
+
BUTTONS.keys
|
58
|
+
end
|
59
|
+
|
60
|
+
def available_message_box_types
|
61
|
+
MESSAGE_BOX_TYPES.keys
|
62
|
+
end
|
63
|
+
|
64
|
+
def available_message_box_button_combos
|
65
|
+
MESSAGE_BOX_BUTTON_COMBOS.keys
|
66
|
+
end
|
67
|
+
|
68
|
+
def input(window, title, message, initial_value, &block)
|
69
|
+
dialog = JFace::Dialogs::InputDialog.new(window.controller.shell,
|
70
|
+
title, message, initial_value) do |text|
|
71
|
+
block ? block[text] : nil
|
72
|
+
end
|
73
|
+
code = dialog.open
|
74
|
+
button = (code == 0 ? :ok : :cancel)
|
75
|
+
{:button => button, :value => dialog.getValue}
|
76
|
+
end
|
77
|
+
|
78
|
+
def tool_tip(window, message)
|
79
|
+
tool_tip = Swt::Widgets::ToolTip.new(window.controller.shell, Swt::SWT::ICON_INFORMATION)
|
80
|
+
tool_tip.set_message(message)
|
81
|
+
tool_tip.set_visible(true)
|
82
|
+
end
|
83
|
+
|
16
84
|
private
|
17
85
|
|
18
86
|
def file_dialog(window, type, options)
|
@@ -72,7 +72,7 @@ module Redcar
|
|
72
72
|
def update_list
|
73
73
|
@last_keypress = Time.now
|
74
74
|
Swt::Widgets::Display.getCurrent.timerExec(300, Swt::RRunnable.new {
|
75
|
-
if @last_keypress and Time.now - @last_keypress > 0.250
|
75
|
+
if @dialog and @last_keypress and Time.now - @last_keypress > 0.250
|
76
76
|
@last_keypress = nil
|
77
77
|
s = Time.now
|
78
78
|
list = @model.update_list(@dialog.text.get_text)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
module Redcar
|
3
|
+
class ApplicationSWT
|
4
|
+
class HtmlTab < Tab
|
5
|
+
attr_reader :browser
|
6
|
+
|
7
|
+
def initialize(model, notebook)
|
8
|
+
super
|
9
|
+
@model.add_listener(:changed_title) { |title| @item.text = title }
|
10
|
+
end
|
11
|
+
|
12
|
+
def create_tab_widget
|
13
|
+
@browser = Swt::Browser.new(notebook.tab_folder, Swt::SWT::NONE)
|
14
|
+
@widget = @browser
|
15
|
+
@item.control = @widget
|
16
|
+
end
|
17
|
+
|
18
|
+
# Focuses the Browser tab within the CTabFolder, and gives the keyboard
|
19
|
+
# focus to the EditViewSWT.
|
20
|
+
def focus
|
21
|
+
super
|
22
|
+
browser.set_focus
|
23
|
+
end
|
24
|
+
|
25
|
+
# Close the HtmlTab, disposing of any resources along the way.
|
26
|
+
def close
|
27
|
+
@browser.dispose
|
28
|
+
super
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -1,19 +1,39 @@
|
|
1
1
|
module Redcar
|
2
2
|
class ApplicationSWT
|
3
3
|
class Menu
|
4
|
+
def self.items
|
5
|
+
@items ||= Hash.new {|h,k| h[k] = []}
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.disable_items(key_string)
|
9
|
+
items[key_string].each {|i| p i.text; i.enabled = false}
|
10
|
+
end
|
11
|
+
|
4
12
|
attr_reader :menu_bar
|
5
13
|
|
6
|
-
def
|
14
|
+
def self.menu_types
|
15
|
+
[Swt::SWT::BAR, Swt::SWT::POP_UP]
|
16
|
+
end
|
17
|
+
|
18
|
+
def initialize(window, menu_model, type)
|
19
|
+
unless Menu.menu_types.include?(type)
|
20
|
+
raise "type should be in #{Menu.menu_types.inspect}"
|
21
|
+
end
|
7
22
|
@window = window
|
8
|
-
@menu_bar = Swt::Widgets::Menu.new(window.shell,
|
23
|
+
@menu_bar = Swt::Widgets::Menu.new(window.shell, type)
|
9
24
|
return unless menu_model
|
10
25
|
@handlers = []
|
11
26
|
add_entries_to_menu(@menu_bar, menu_model)
|
12
27
|
end
|
13
28
|
|
29
|
+
def show
|
30
|
+
@menu_bar.set_visible(true)
|
31
|
+
end
|
32
|
+
|
14
33
|
def close
|
15
34
|
@handlers.each {|obj, h| obj.remove_listener(h)}
|
16
35
|
@menu_bar.dispose
|
36
|
+
@result
|
17
37
|
end
|
18
38
|
|
19
39
|
private
|
@@ -30,32 +50,48 @@ module Redcar
|
|
30
50
|
item = Swt::Widgets::MenuItem.new(menu, Swt::SWT::SEPARATOR)
|
31
51
|
elsif entry.is_a?(Redcar::Menu::Item)
|
32
52
|
item = Swt::Widgets::MenuItem.new(menu, Swt::SWT::PUSH)
|
33
|
-
if entry.command.
|
34
|
-
|
35
|
-
key_string = BindingTranslator.platform_key_string(key_specifier)
|
36
|
-
item.text = entry.text + "\t" + key_string
|
37
|
-
item.set_accelerator(BindingTranslator.key(key_string))
|
53
|
+
if entry.command.is_a?(Proc)
|
54
|
+
connect_proc_to_item(item, entry)
|
38
55
|
else
|
39
|
-
item
|
40
|
-
end
|
41
|
-
item.addSelectionListener do
|
42
|
-
puts "#{entry.command} activated"
|
43
|
-
entry.selected
|
44
|
-
end
|
45
|
-
h = entry.command.add_listener(:active_changed) do |value|
|
46
|
-
unless item.disposed
|
47
|
-
item.enabled = value
|
48
|
-
end
|
49
|
-
end
|
50
|
-
@handlers << [entry.command, h]
|
51
|
-
if not entry.command.active?
|
52
|
-
item.enabled = false
|
56
|
+
connect_command_to_item(item, entry)
|
53
57
|
end
|
54
58
|
else
|
55
59
|
raise "unknown object of type #{entry.class} in menu"
|
56
60
|
end
|
57
61
|
end
|
58
62
|
end
|
63
|
+
|
64
|
+
def connect_proc_to_item(item, entry)
|
65
|
+
item.text = entry.text
|
66
|
+
item.add_selection_listener { entry.command[] }
|
67
|
+
end
|
68
|
+
|
69
|
+
def connect_command_to_item(item, entry)
|
70
|
+
if key_specifier = entry.command.get_key
|
71
|
+
if key_string = BindingTranslator.platform_key_string(key_specifier)
|
72
|
+
item.text = entry.text + "\t" + key_string
|
73
|
+
item.set_accelerator(BindingTranslator.key(key_string))
|
74
|
+
Menu.items[key_string] << item
|
75
|
+
else
|
76
|
+
puts "you didn't specify a keybinding for this platform for #{entry.text}"
|
77
|
+
item.text = entry.text
|
78
|
+
end
|
79
|
+
else
|
80
|
+
item.text = entry.text
|
81
|
+
end
|
82
|
+
item.addSelectionListener do
|
83
|
+
entry.selected
|
84
|
+
end
|
85
|
+
h = entry.command.add_listener(:active_changed) do |value|
|
86
|
+
unless item.disposed
|
87
|
+
item.enabled = value
|
88
|
+
end
|
89
|
+
end
|
90
|
+
@handlers << [entry.command, h]
|
91
|
+
if not entry.command.active?
|
92
|
+
item.enabled = false
|
93
|
+
end
|
94
|
+
end
|
59
95
|
end
|
60
96
|
end
|
61
97
|
end
|
@@ -6,10 +6,12 @@ module Redcar
|
|
6
6
|
|
7
7
|
def self.platform_key_string(key_specifier)
|
8
8
|
if key_specifier.is_a?(Hash)
|
9
|
-
key_string = key_specifier[
|
9
|
+
key_string = key_specifier[Redcar.platform]
|
10
10
|
else
|
11
11
|
key_string = key_specifier
|
12
12
|
end
|
13
|
+
key_string.gsub("Escape", "")
|
14
|
+
key_string.gsub("Space", "")
|
13
15
|
key_string
|
14
16
|
end
|
15
17
|
|
@@ -20,7 +22,42 @@ module Redcar
|
|
20
22
|
value += modifier_values[modifier]
|
21
23
|
end
|
22
24
|
end
|
23
|
-
|
25
|
+
if key_string =~ /Escape$/
|
26
|
+
value += Swt::SWT::ESC
|
27
|
+
elsif key_string =~ /Space$/
|
28
|
+
value += " "[0]
|
29
|
+
else
|
30
|
+
value += key_string[-1]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.key_string(key_event)
|
35
|
+
modifiers = []
|
36
|
+
modifier_values.each do |string, constant|
|
37
|
+
if (key_event.stateMask & constant) != 0
|
38
|
+
modifiers << string
|
39
|
+
end
|
40
|
+
end
|
41
|
+
modifiers = modifiers.sort_by {|m| MODIFIERS.index(m) }
|
42
|
+
if key_event.character == 0
|
43
|
+
modifiers.join("+")
|
44
|
+
else
|
45
|
+
letter = java.lang.Character.new(key_event.character).toString.upcase # key_event.keyCode)
|
46
|
+
if modifiers.any?
|
47
|
+
modifiers.join("+") << "+" << (pretty_letter(letter) || letter)
|
48
|
+
else
|
49
|
+
(pretty_letter(letter) || letter)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.matches?(key_string, key_string2)
|
55
|
+
key_string.split("+").sort ==
|
56
|
+
key_string2.split("+").sort
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.pretty_letter(char_string)
|
60
|
+
{"\r" => "Return"}[char_string]
|
24
61
|
end
|
25
62
|
|
26
63
|
private
|