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,187 @@
|
|
1
|
+
module Redcar
|
2
|
+
class ApplicationSWT
|
3
|
+
class Speedbar
|
4
|
+
attr_reader :widget
|
5
|
+
|
6
|
+
def initialize(window, parent, model)
|
7
|
+
@window_model = window
|
8
|
+
@parent = parent
|
9
|
+
@model = model
|
10
|
+
create_widgets
|
11
|
+
attach_key_listeners
|
12
|
+
disable_menu_items
|
13
|
+
if widget = focussable_widgets.first
|
14
|
+
widget.set_focus
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def close
|
19
|
+
@composite.dispose
|
20
|
+
@parent.layout
|
21
|
+
end
|
22
|
+
|
23
|
+
def disable_menu_items
|
24
|
+
key_strings = []
|
25
|
+
@model.__items.each do |i|
|
26
|
+
if i.respond_to?(:key)
|
27
|
+
key_strings << i.key
|
28
|
+
end
|
29
|
+
end
|
30
|
+
key_strings.uniq.each do |key_string|
|
31
|
+
ApplicationSWT::Menu.disable_items(key_string)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def num_columns
|
36
|
+
@model.__items.select {|i| !i.is_a?(Redcar::Speedbar::KeyItem) }.length
|
37
|
+
end
|
38
|
+
|
39
|
+
def key_items
|
40
|
+
@model.__items.select {|i| i.respond_to?(:key) }
|
41
|
+
end
|
42
|
+
|
43
|
+
def keyable_widgets
|
44
|
+
@keyable_widgets ||= []
|
45
|
+
end
|
46
|
+
|
47
|
+
def focussable_widgets
|
48
|
+
@focussable_widgets ||= []
|
49
|
+
end
|
50
|
+
|
51
|
+
def create_widgets
|
52
|
+
@composite = Swt::Widgets::Composite.new(@parent, Swt::SWT::NONE)
|
53
|
+
grid_data = Swt::Layout::GridData.new
|
54
|
+
grid_data.grabExcessHorizontalSpace = true
|
55
|
+
grid_data.horizontalAlignment = Swt::Layout::GridData::FILL
|
56
|
+
@composite.setLayoutData(grid_data)
|
57
|
+
layout = Swt::Layout::GridLayout.new(num_columns + 1, false)
|
58
|
+
layout.verticalSpacing = 0
|
59
|
+
layout.marginHeight = 0
|
60
|
+
@composite.setLayout(layout)
|
61
|
+
image = Swt::Graphics::Image.new(ApplicationSWT.display, Redcar::Speedbar.close_image_path)
|
62
|
+
label = Swt::Widgets::Label.new(@composite, 0)
|
63
|
+
label.set_image(image)
|
64
|
+
|
65
|
+
label.add_mouse_listener(MouseListener.new(self))
|
66
|
+
|
67
|
+
@model.__items.each do |item|
|
68
|
+
case item
|
69
|
+
when Redcar::Speedbar::LabelItem
|
70
|
+
label = Swt::Widgets::Label.new(@composite, 0)
|
71
|
+
label.set_text(item.text)
|
72
|
+
when Redcar::Speedbar::TextBoxItem
|
73
|
+
textbox = Swt::Widgets::Text.new(@composite, Swt::SWT::BORDER)
|
74
|
+
textbox.set_text(item.value)
|
75
|
+
gridData = Swt::Layout::GridData.new
|
76
|
+
gridData.grabExcessHorizontalSpace = true
|
77
|
+
gridData.horizontalAlignment = Swt::Layout::GridData::FILL
|
78
|
+
textbox.set_layout_data(gridData)
|
79
|
+
textbox.add_modify_listener do
|
80
|
+
item.value = textbox.get_text
|
81
|
+
if item.listener
|
82
|
+
begin
|
83
|
+
@model.__context.instance_exec(item.value, &item.listener)
|
84
|
+
rescue => err
|
85
|
+
error_in_listener(err)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
keyable_widgets << textbox
|
90
|
+
focussable_widgets << textbox
|
91
|
+
when Redcar::Speedbar::ButtonItem
|
92
|
+
button = Swt::Widgets::Button.new(@composite, 0)
|
93
|
+
button.set_text(item.text)
|
94
|
+
if item.listener
|
95
|
+
button.add_selection_listener do
|
96
|
+
begin
|
97
|
+
@model.__context.instance_exec(&item.listener)
|
98
|
+
rescue => err
|
99
|
+
error_in_listener(err)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
keyable_widgets << button
|
104
|
+
focussable_widgets << button
|
105
|
+
when Redcar::Speedbar::ToggleItem
|
106
|
+
button = Swt::Widgets::Button.new(@composite, Swt::SWT::CHECK)
|
107
|
+
button.set_text(item.text)
|
108
|
+
button.add_selection_listener do
|
109
|
+
item.value = button.get_selection
|
110
|
+
if item.listener
|
111
|
+
begin
|
112
|
+
@model.__context.instance_exec(item.value, &item.listener)
|
113
|
+
rescue => err
|
114
|
+
error_in_listener(err)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
keyable_widgets << button
|
119
|
+
focussable_widgets << button
|
120
|
+
end
|
121
|
+
end
|
122
|
+
@parent.layout
|
123
|
+
end
|
124
|
+
|
125
|
+
class KeyListener
|
126
|
+
def initialize(speedbar)
|
127
|
+
@speedbar = speedbar
|
128
|
+
end
|
129
|
+
|
130
|
+
def key_pressed(e)
|
131
|
+
end
|
132
|
+
|
133
|
+
def key_released(e)
|
134
|
+
@speedbar.key_press(e)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
class MouseListener
|
139
|
+
def initialize(speedbar)
|
140
|
+
@speedbar = speedbar
|
141
|
+
end
|
142
|
+
|
143
|
+
def mouse_down(*_); end
|
144
|
+
|
145
|
+
def mouse_up(*_)
|
146
|
+
@speedbar.close_pressed
|
147
|
+
end
|
148
|
+
|
149
|
+
def mouse_double_click(*_); end
|
150
|
+
end
|
151
|
+
|
152
|
+
def attach_key_listeners
|
153
|
+
keyable_widgets.each do |widget|
|
154
|
+
widget.add_key_listener(KeyListener.new(self))
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
def close_pressed
|
159
|
+
@window_model.close_speedbar
|
160
|
+
end
|
161
|
+
|
162
|
+
def key_press(e)
|
163
|
+
key_string = Menu::BindingTranslator.key_string(e)
|
164
|
+
if key_string == "\e"
|
165
|
+
@window_model.close_speedbar
|
166
|
+
e.doit = false
|
167
|
+
end
|
168
|
+
key_items.each do |key_item|
|
169
|
+
if Menu::BindingTranslator.matches?(key_string, key_item.key)
|
170
|
+
e.doit = false
|
171
|
+
begin
|
172
|
+
@model.__context.instance_exec(&key_item.listener)
|
173
|
+
rescue Object => err
|
174
|
+
error_in_listener(err)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
def error_in_listener(e)
|
181
|
+
puts "*** Error in speedbar listener: #{e.message}"
|
182
|
+
puts e.backtrace.map {|l| " " + l}
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
require 'rbconfig'
|
3
2
|
|
4
3
|
module Swt
|
@@ -45,17 +44,35 @@ module Swt
|
|
45
44
|
import org.eclipse.swt.widgets.List
|
46
45
|
import org.eclipse.swt.widgets.Menu
|
47
46
|
import org.eclipse.swt.widgets.MenuItem
|
47
|
+
import org.eclipse.swt.widgets.MessageBox
|
48
48
|
import org.eclipse.swt.widgets.Shell
|
49
49
|
import org.eclipse.swt.widgets.TabFolder
|
50
50
|
import org.eclipse.swt.widgets.TabItem
|
51
51
|
import org.eclipse.swt.widgets.Text
|
52
|
+
import org.eclipse.swt.widgets.ToolTip
|
52
53
|
end
|
54
|
+
|
55
|
+
def self.display
|
56
|
+
if defined?(SWT_APP_NAME)
|
57
|
+
Swt::Widgets::Display.app_name = SWT_APP_NAME
|
58
|
+
end
|
59
|
+
@display ||= (Swt::Widgets::Display.getCurrent || Swt::Widgets::Display.new)
|
60
|
+
end
|
61
|
+
|
62
|
+
display # must be created before we import the Clipboard class.
|
53
63
|
|
54
64
|
module Custom
|
55
65
|
import org.eclipse.swt.custom.CTabFolder
|
56
66
|
import org.eclipse.swt.custom.CTabItem
|
57
67
|
import org.eclipse.swt.custom.SashForm
|
58
68
|
import org.eclipse.swt.custom.StackLayout
|
69
|
+
import org.eclipse.swt.custom.ST
|
70
|
+
end
|
71
|
+
|
72
|
+
module DND
|
73
|
+
import org.eclipse.swt.dnd.Clipboard
|
74
|
+
import org.eclipse.swt.dnd.Transfer
|
75
|
+
import org.eclipse.swt.dnd.TextTransfer
|
59
76
|
end
|
60
77
|
|
61
78
|
module Layout
|
@@ -78,6 +95,11 @@ module Swt
|
|
78
95
|
import org.eclipse.swt.events.KeyEvent
|
79
96
|
end
|
80
97
|
|
98
|
+
import org.eclipse.swt.browser.Browser
|
99
|
+
class Browser
|
100
|
+
import org.eclipse.swt.browser.BrowserFunction
|
101
|
+
end
|
102
|
+
|
81
103
|
class RRunnable
|
82
104
|
include java.lang.Runnable
|
83
105
|
|
@@ -110,5 +132,6 @@ module JFace
|
|
110
132
|
|
111
133
|
module Dialogs
|
112
134
|
import org.eclipse.jface.dialogs.Dialog
|
135
|
+
import org.eclipse.jface.dialogs.InputDialog
|
113
136
|
end
|
114
137
|
end
|
@@ -45,6 +45,7 @@ module Redcar
|
|
45
45
|
def add_listeners
|
46
46
|
@window.add_listener(:show, &method(:show))
|
47
47
|
@window.add_listener(:menu_changed, &method(:menu_changed))
|
48
|
+
@window.add_listener(:popup_menu, &method(:popup_menu))
|
48
49
|
@window.add_listener(:title_changed, &method(:title_changed))
|
49
50
|
@window.add_listener(:new_notebook, &method(:new_notebook))
|
50
51
|
@window.add_listener(:notebook_removed, &method(:notebook_removed))
|
@@ -52,6 +53,8 @@ module Redcar
|
|
52
53
|
method = method(:notebook_orientation_changed)
|
53
54
|
@window.add_listener(:notebook_orientation_changed, &method)
|
54
55
|
@window.add_listener(:focussed, &method(:focussed))
|
56
|
+
@window.add_listener(:speedbar_opened, &method(:speedbar_opened))
|
57
|
+
@window.add_listener(:speedbar_closed, &method(:speedbar_closed))
|
55
58
|
|
56
59
|
@window.treebook.add_listener(:tree_added) do
|
57
60
|
if @treebook_unopened
|
@@ -80,10 +83,23 @@ module Redcar
|
|
80
83
|
end
|
81
84
|
|
82
85
|
def menu_changed(menu)
|
83
|
-
@menu_controller = ApplicationSWT::Menu.new(self, menu)
|
86
|
+
@menu_controller = ApplicationSWT::Menu.new(self, menu, Swt::SWT::BAR)
|
84
87
|
shell.menu_bar = @menu_controller.menu_bar
|
85
88
|
end
|
86
89
|
|
90
|
+
def popup_menu(menu)
|
91
|
+
menu.controller = ApplicationSWT::Menu.new(self, menu, Swt::SWT::POP_UP)
|
92
|
+
menu.controller.show
|
93
|
+
end
|
94
|
+
|
95
|
+
def speedbar_opened(speedbar)
|
96
|
+
speedbar.controller = ApplicationSWT::Speedbar.new(@window, right_composite, speedbar)
|
97
|
+
end
|
98
|
+
|
99
|
+
def speedbar_closed(speedbar)
|
100
|
+
speedbar.controller.close
|
101
|
+
end
|
102
|
+
|
87
103
|
def title_changed(new_title)
|
88
104
|
@shell.text = new_title
|
89
105
|
end
|
@@ -155,11 +171,25 @@ module Redcar
|
|
155
171
|
button.setText("Button in pane2")
|
156
172
|
@tree_layout.topControl = button
|
157
173
|
|
158
|
-
|
159
|
-
|
174
|
+
@right_composite = Swt::Widgets::Composite.new(@sash, Swt::SWT::NONE)
|
175
|
+
@grid_layout = Swt::Layout::GridLayout.new(1, false)
|
176
|
+
@grid_layout.verticalSpacing = 0
|
177
|
+
@grid_layout.marginHeight = 0
|
178
|
+
@grid_layout.horizontalSpacing = 0
|
179
|
+
@grid_layout.marginWidth = 0
|
180
|
+
@right_composite.setLayout(@grid_layout)
|
181
|
+
|
182
|
+
@notebook_sash = Swt::Custom::SashForm.new(@right_composite, orientation)
|
183
|
+
grid_data = Swt::Layout::GridData.new
|
184
|
+
grid_data.grabExcessHorizontalSpace = true
|
185
|
+
grid_data.horizontalAlignment = Swt::Layout::GridData::FILL
|
186
|
+
grid_data.grabExcessVerticalSpace = true
|
187
|
+
grid_data.verticalAlignment = Swt::Layout::GridData::FILL
|
160
188
|
@notebook_sash.setLayoutData(grid_data)
|
161
189
|
@notebook_sash.setSashWidth(SASH_WIDTH)
|
162
190
|
end
|
191
|
+
|
192
|
+
attr_reader :right_composite
|
163
193
|
|
164
194
|
def horizontal_vertical(symbol)
|
165
195
|
case symbol
|
@@ -0,0 +1,65 @@
|
|
1
|
+
Feature: Auto Complete
|
2
|
+
|
3
|
+
Scenario: Autocomplete with no completions
|
4
|
+
When I open a new edit tab
|
5
|
+
And I replace the contents with "Tess"
|
6
|
+
And I move the cursor to 4
|
7
|
+
And I auto-complete
|
8
|
+
Then I should see "Tess" in the edit tab
|
9
|
+
|
10
|
+
Scenario: Autocomplete with one completions
|
11
|
+
When I open a new edit tab
|
12
|
+
And I replace the contents with "Daly Da"
|
13
|
+
And I move the cursor to 7
|
14
|
+
And I auto-complete
|
15
|
+
Then I should see "Daly Daly" in the edit tab
|
16
|
+
|
17
|
+
Scenario: Autocomplete with one completions, twice
|
18
|
+
When I open a new edit tab
|
19
|
+
And I replace the contents with "Daly Da"
|
20
|
+
And I move the cursor to 7
|
21
|
+
And I auto-complete
|
22
|
+
And I auto-complete
|
23
|
+
Then I should see "Daly Da" in the edit tab
|
24
|
+
And I should not see "Daly Daly" in the edit tab
|
25
|
+
|
26
|
+
Scenario: Autocomplete with two completions
|
27
|
+
When I open a new edit tab
|
28
|
+
And I replace the contents with "Dan Daly Da"
|
29
|
+
And I move the cursor to 11
|
30
|
+
And I auto-complete
|
31
|
+
Then I should see "Dan Daly Daly" in the edit tab
|
32
|
+
|
33
|
+
Scenario: Autocomplete with two completions, twice
|
34
|
+
When I open a new edit tab
|
35
|
+
And I replace the contents with "Dan Daly Da"
|
36
|
+
And I move the cursor to 11
|
37
|
+
And I auto-complete
|
38
|
+
And I auto-complete
|
39
|
+
Then I should see "Dan Daly Dan" in the edit tab
|
40
|
+
|
41
|
+
Scenario: Autocomplete with two completions, thrice
|
42
|
+
When I open a new edit tab
|
43
|
+
And I replace the contents with "Dan Daly Da"
|
44
|
+
And I move the cursor to 11
|
45
|
+
And I auto-complete
|
46
|
+
And I auto-complete
|
47
|
+
And I auto-complete
|
48
|
+
Then I should see "Dan Daly Da" in the edit tab
|
49
|
+
And I should not see "Dan Daly Daly" in the edit tab
|
50
|
+
And I should not see "Dan Daly Dan" in the edit tab
|
51
|
+
|
52
|
+
Scenario: Autocomplete at the start of a word
|
53
|
+
When I open a new edit tab
|
54
|
+
And I replace the contents with "Da Daly Dan"
|
55
|
+
And I auto-complete
|
56
|
+
Then I should see "Da Daly Dan" in the edit tab
|
57
|
+
|
58
|
+
Scenario: Autocomplete with one completions at the end of a line
|
59
|
+
When I open a new edit tab
|
60
|
+
And I replace the contents with "Daly Da\nfoo"
|
61
|
+
And I move the cursor to 7
|
62
|
+
And I auto-complete
|
63
|
+
Then I should see "Daly Daly\nfoo" in the edit tab
|
64
|
+
|
65
|
+
|
@@ -0,0 +1,99 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
require 'auto_completer/document_controller'
|
4
|
+
require 'auto_completer/word_iterator'
|
5
|
+
require 'auto_completer/word_list'
|
6
|
+
|
7
|
+
module Redcar
|
8
|
+
class AutoCompleter
|
9
|
+
WORD_CHARACTERS = /:|@|\w/ # /(\s|\t|\.|\r|\(|\)|,|;)/
|
10
|
+
|
11
|
+
def self.start
|
12
|
+
Document.register_controller_type(AutoCompleter::DocumentController)
|
13
|
+
end
|
14
|
+
|
15
|
+
class AutoCompleteCommand < Redcar::EditTabCommand
|
16
|
+
key :osx => "Ctrl+Escape", :linux => "Ctrl+Space",
|
17
|
+
:windows => "Ctrl+Space"
|
18
|
+
|
19
|
+
def execute
|
20
|
+
controller = doc.controllers(AutoCompleter::DocumentController).first
|
21
|
+
controller.start_modification
|
22
|
+
|
23
|
+
if controller.in_completion?
|
24
|
+
doc.delete(doc.cursor_offset - controller.length_of_previous, controller.length_of_previous)
|
25
|
+
word = controller.word
|
26
|
+
left = controller.left
|
27
|
+
right = controller.right
|
28
|
+
word_list = controller.word_list
|
29
|
+
else
|
30
|
+
word, left, right = touched_word
|
31
|
+
if word
|
32
|
+
iterator = WordIterator.new(doc, WORD_CHARACTERS)
|
33
|
+
word_list = WordList.new
|
34
|
+
iterator.each_word_with_offset(word) do |matching_word, offset|
|
35
|
+
distance = (offset - doc.cursor_offset).abs
|
36
|
+
word_list.add_word(matching_word, distance)
|
37
|
+
end
|
38
|
+
controller.word_list = word_list
|
39
|
+
controller.word = word
|
40
|
+
controller.left = left
|
41
|
+
controller.right = right
|
42
|
+
end
|
43
|
+
end
|
44
|
+
if word
|
45
|
+
index = (controller.index || 0) + 1
|
46
|
+
if word_list.completions.length == index
|
47
|
+
index = 0
|
48
|
+
end
|
49
|
+
completion = word_list.completions[index]
|
50
|
+
controller.index = index
|
51
|
+
|
52
|
+
start_offset = right
|
53
|
+
doc.insert(right, completion[word.length..-1])
|
54
|
+
word_end_offset = right + completion.length - word.length
|
55
|
+
doc.cursor_offset = word_end_offset
|
56
|
+
|
57
|
+
controller.length_of_previous = completion.length - word.length
|
58
|
+
|
59
|
+
controller.start_completion
|
60
|
+
end
|
61
|
+
controller.end_modification
|
62
|
+
end
|
63
|
+
|
64
|
+
private
|
65
|
+
|
66
|
+
# returns the word that is being touched by the cursor and an array
|
67
|
+
# containing [left, right] document offsets of the word.
|
68
|
+
def touched_word
|
69
|
+
line = doc.get_line(doc.cursor_line)
|
70
|
+
left, right = word_range(line)
|
71
|
+
word = doc.get_range(left, right - left)
|
72
|
+
return nil if word.length == 0
|
73
|
+
return word, left, right
|
74
|
+
end
|
75
|
+
|
76
|
+
private
|
77
|
+
|
78
|
+
# returns the range that holds the current word (depending on WORD_CHARACTERS)
|
79
|
+
def word_range(line)
|
80
|
+
left = doc.cursor_line_offset - 1
|
81
|
+
right = doc.cursor_line_offset
|
82
|
+
left_range = 0
|
83
|
+
right_range = 0
|
84
|
+
offset = doc.cursor_offset
|
85
|
+
|
86
|
+
until left == -1 || WORD_CHARACTERS !~ (line[left].chr)
|
87
|
+
left -= 1
|
88
|
+
left_range -= 1
|
89
|
+
end
|
90
|
+
|
91
|
+
# until right == line.length || WORD_CHARACTERS !~ (line[right].chr)
|
92
|
+
# right += 1
|
93
|
+
# right_range += 1
|
94
|
+
# end
|
95
|
+
return [offset+left_range, offset+right_range]
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|