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
data/lib/redcar.rb
CHANGED
@@ -3,11 +3,13 @@ $:.push File.join(File.dirname(__FILE__))
|
|
3
3
|
|
4
4
|
require 'rbconfig'
|
5
5
|
|
6
|
+
require 'redcar/usage'
|
7
|
+
|
6
8
|
module Redcar
|
7
|
-
VERSION = '0.3.
|
9
|
+
VERSION = '0.3.2dev'
|
8
10
|
VERSION_MAJOR = 0
|
9
11
|
VERSION_MINOR = 3
|
10
|
-
VERSION_RELEASE =
|
12
|
+
VERSION_RELEASE = 2
|
11
13
|
|
12
14
|
def self.ensure_jruby
|
13
15
|
if Config::CONFIG["RUBY_INSTALL_NAME"] == "jruby"
|
@@ -24,4 +26,7 @@ module Redcar
|
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
27
|
-
|
29
|
+
usage = Redcar::Usage.new
|
30
|
+
usage.version_string
|
31
|
+
usage.version_requested
|
32
|
+
usage.help_requested
|
data/lib/redcar/boot.rb
CHANGED
@@ -1,40 +1,19 @@
|
|
1
1
|
|
2
2
|
require 'java'
|
3
3
|
|
4
|
-
$:.push(File.join(File.dirname(__FILE__), %w(.. little_plugger lib)))
|
5
|
-
require 'little-plugger'
|
6
|
-
|
7
|
-
$:.push(File.join(File.dirname(__FILE__), %w(.. logging lib)))
|
8
|
-
require 'thread'
|
9
|
-
require 'logging'
|
10
|
-
|
11
|
-
$:.push(File.join(File.dirname(__FILE__), %w(.. freebase2 lib)))
|
12
|
-
require 'freebase/freebase'
|
13
|
-
|
14
4
|
require 'redcar/ruby_extensions'
|
5
|
+
require 'redcar/instance_exec'
|
15
6
|
require 'redcar/usage'
|
16
7
|
|
8
|
+
require 'plugin_manager/lib/plugin_manager'
|
9
|
+
|
17
10
|
require 'forwardable'
|
18
11
|
require 'yaml'
|
19
12
|
|
20
13
|
# ## Loading and Initialization
|
21
14
|
#
|
22
15
|
# Every feature in Redcar is written as a plugin. This module contains a few
|
23
|
-
# methods to bootstrap the plugins by loading the
|
24
|
-
#
|
25
|
-
# FreeBASE (kindly open sourced by the FreeRIDE project) will load Redcar in
|
26
|
-
# the following manner:
|
27
|
-
#
|
28
|
-
# 1. For each plugin load the file *plugin_name/lib/plugin_name.rb* and then
|
29
|
-
# run the method "load" on the class defined in plugin.yaml as the
|
30
|
-
# "startup_module". The plugins will be loaded in an order respecting the
|
31
|
-
# "load_dependencies" in each plugin.yaml.
|
32
|
-
# 2. Call the start method on each of the "startup_module" classes, respecting
|
33
|
-
# the "start_dependencies" in each plugin.yaml
|
34
|
-
#
|
35
|
-
# All Redcar initialization is done in these methods, "load" and "start" on
|
36
|
-
# every plugin class. Note that plugins are not required to define either of
|
37
|
-
# these methods.
|
16
|
+
# methods to bootstrap the plugins by loading the PluginManager.
|
38
17
|
#
|
39
18
|
# Once loaded, bin/redcar will start the gui pump, which will run
|
40
19
|
# Redcar.gui.start. This starts the GUI library's event loop and hands over
|
@@ -59,47 +38,71 @@ require 'yaml'
|
|
59
38
|
# and so on.
|
60
39
|
module Redcar
|
61
40
|
|
62
|
-
ROOT = File.expand_path(File.join(File.dirname(__FILE__), "..", ".."))
|
63
|
-
|
64
|
-
$FR_CODEBASE = File.expand_path(File.join(File.dirname(__FILE__)) + "/../../")
|
65
|
-
$FR_PROJECT = nil
|
66
|
-
$FREEBASE_APPLICATION = "Redcar"
|
67
|
-
|
68
|
-
class << self
|
69
|
-
attr_reader :freebase_core
|
70
|
-
end
|
71
|
-
|
72
41
|
def self.root
|
73
|
-
|
42
|
+
File.expand_path(File.join(File.dirname(__FILE__), "..", ".."))
|
74
43
|
end
|
75
44
|
|
76
|
-
def self.
|
77
|
-
@
|
78
|
-
|
45
|
+
def self.plugin_manager
|
46
|
+
@plugin_manager ||= begin
|
47
|
+
m = PluginManager.new
|
48
|
+
m.add_plugin_source(File.join(root, "plugins"))
|
49
|
+
m.add_plugin_source(File.join(user_dir, "plugins"))
|
50
|
+
m
|
51
|
+
end
|
79
52
|
end
|
80
53
|
|
81
54
|
def self.load
|
82
|
-
|
83
|
-
|
55
|
+
plugin_manager.load
|
56
|
+
if plugin_manager.unreadable_definitions.any?
|
57
|
+
puts "Couldn't read definition files: "
|
58
|
+
puts plugin_manager.unreadable_definitions.map {|d| " * " + d}
|
59
|
+
end
|
60
|
+
if plugin_manager.plugins_with_errors.any?
|
61
|
+
puts "There was an error loading: "
|
62
|
+
puts plugin_manager.plugins_with_errors.map {|d| " * " + d.name}
|
63
|
+
end
|
64
|
+
if ENV["PLUGIN_DEBUG"]
|
65
|
+
puts "Loaded plugins:"
|
66
|
+
puts plugin_manager.loaded_plugins.map {|d| " * " + d.name}
|
67
|
+
puts
|
68
|
+
puts "Unloaded plugins:"
|
69
|
+
puts plugin_manager.unloaded_plugins.map {|d| " * " + d.name}
|
70
|
+
|
71
|
+
end
|
84
72
|
end
|
85
|
-
|
86
|
-
def self.
|
87
|
-
|
88
|
-
@freebase_core.require_files
|
73
|
+
|
74
|
+
def self.pump
|
75
|
+
Redcar.gui.start
|
89
76
|
end
|
90
77
|
|
91
|
-
|
92
|
-
|
78
|
+
# Platform symbol
|
79
|
+
#
|
80
|
+
# @return [:osx/:windows/:linux]
|
81
|
+
def self.platform
|
82
|
+
case Config::CONFIG["target_os"]
|
83
|
+
when /darwin/
|
84
|
+
:osx
|
85
|
+
when /mswin|mingw/
|
86
|
+
:windows
|
87
|
+
when /linux/
|
88
|
+
:linux
|
89
|
+
end
|
93
90
|
end
|
94
91
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
92
|
+
# Platform specific ~/.redcar
|
93
|
+
#
|
94
|
+
# @return [String] expanded path
|
95
|
+
def self.user_dir
|
96
|
+
if platform == :windows
|
97
|
+
if ENV['USERPROFILE'].nil?
|
98
|
+
userdir = "C:/My Documents/.redcar/"
|
99
|
+
else
|
100
|
+
userdir = File.join(ENV['USERPROFILE'], ".redcar")
|
101
|
+
end
|
102
|
+
else
|
103
|
+
userdir = File.join(ENV['HOME'], ".redcar") unless ENV['HOME'].nil?
|
104
|
+
end
|
105
|
+
File.expand_path(userdir)
|
99
106
|
end
|
100
|
-
end
|
101
107
|
|
102
|
-
|
103
|
-
usage.version_string
|
104
|
-
usage.version_requested
|
105
|
-
usage.help_requested
|
108
|
+
end
|
data/lib/redcar/installer.rb
CHANGED
@@ -72,7 +72,7 @@ module Redcar
|
|
72
72
|
when /linux/i
|
73
73
|
download("/swt/linux.jar", File.join(plugins_dir, %w(application_swt vendor swt linux swt.jar)))
|
74
74
|
download("/swt/linux64.jar", File.join(plugins_dir, %w(application_swt vendor swt linux64 swt.jar)))
|
75
|
-
when /windows|mswin/i
|
75
|
+
when /windows|mswin|mingw/i
|
76
76
|
download("/swt/win32.jar", File.join(plugins_dir, %w(application_swt vendor swt win32 swt.jar)))
|
77
77
|
# download("/swt/win64.jar", File.join(plugins_dir, %w(application_swt vendor swt win64 swt.jar)))
|
78
78
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
class Object
|
3
|
+
|
4
|
+
unless defined? instance_exec # 1.9
|
5
|
+
# http://eigenclass.org/hiki/bounded+space+instance_exec
|
6
|
+
module InstanceExecHelper; end
|
7
|
+
include InstanceExecHelper
|
8
|
+
def instance_exec(*args, &block)
|
9
|
+
begin
|
10
|
+
old_critical, Thread.critical = Thread.critical, true
|
11
|
+
n = 0
|
12
|
+
n += 1 while respond_to?(mname="__instance_exec#{n}")
|
13
|
+
InstanceExecHelper.module_eval{ define_method(mname, &block) }
|
14
|
+
ensure
|
15
|
+
Thread.critical = old_critical
|
16
|
+
end
|
17
|
+
begin
|
18
|
+
ret = send(mname, *args)
|
19
|
+
ensure
|
20
|
+
InstanceExecHelper.module_eval{ remove_method(mname) } rescue nil
|
21
|
+
end
|
22
|
+
ret
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/redcar/runner.rb
CHANGED
@@ -11,7 +11,11 @@ module Redcar
|
|
11
11
|
# our vendored jarred one (useful for gems).
|
12
12
|
def spin_up
|
13
13
|
bin = "#{File.dirname(__FILE__)}/../../bin/redcar"
|
14
|
-
jruby_complete =
|
14
|
+
jruby_complete = File.expand_path(File.join(File.dirname(__FILE__), "..", "jruby-complete-1.4.0.jar"))
|
15
|
+
unless File.exist?(jruby_complete)
|
16
|
+
puts "\nCan't find jruby jar at #{jruby_complete}, did you run 'redcar install' ?"
|
17
|
+
exit 1
|
18
|
+
end
|
15
19
|
args = []
|
16
20
|
if false
|
17
21
|
command = "jruby #{java_args} \"#{bin}\" #{ARGV.join(' ')}"
|
data/lib/redcar/usage.rb
CHANGED
@@ -15,13 +15,17 @@ module Redcar
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def help_requested
|
18
|
-
if ARGV.include?("-h")
|
18
|
+
if ARGV.include?("-h") or ARGV.include?("--help")
|
19
19
|
puts "Redcar #{Redcar::VERSION}"
|
20
20
|
puts
|
21
21
|
puts " --font=FONT Choose font"
|
22
22
|
puts " --font-size=SIZE Choose font point size"
|
23
23
|
puts " --theme=THEME Choose Textmate theme"
|
24
24
|
puts
|
25
|
+
puts "To download jars:"
|
26
|
+
puts
|
27
|
+
puts " $ [sudo] redcar install"
|
28
|
+
puts
|
25
29
|
exit
|
26
30
|
end
|
27
31
|
end
|
Binary file
|
@@ -3,6 +3,8 @@ require 'application/command/executor'
|
|
3
3
|
require 'application/command/history'
|
4
4
|
require 'application/sensitive'
|
5
5
|
require 'application/sensitivity'
|
6
|
+
|
7
|
+
require 'application/clipboard'
|
6
8
|
require 'application/command'
|
7
9
|
require 'application/dialog'
|
8
10
|
require 'application/dialogs/filter_list_dialog'
|
@@ -10,6 +12,7 @@ require 'application/menu'
|
|
10
12
|
require 'application/menu/item'
|
11
13
|
require 'application/menu/builder'
|
12
14
|
require 'application/notebook'
|
15
|
+
require 'application/speedbar'
|
13
16
|
require 'application/tab'
|
14
17
|
require 'application/tab/command'
|
15
18
|
require 'application/treebook'
|
@@ -33,41 +36,48 @@ module Redcar
|
|
33
36
|
include Redcar::Model
|
34
37
|
include Redcar::Observable
|
35
38
|
|
36
|
-
def self.load
|
37
|
-
Redcar.freebase_core.bus["/system/ui/messagepump"].set_proc do
|
38
|
-
Redcar.gui.start
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
39
|
def self.start
|
43
40
|
Redcar.app = Application.new
|
44
41
|
Redcar.history = Command::History.new
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.sensitivities
|
45
|
+
[
|
46
|
+
Sensitivity.new(:open_tab, Redcar.app, false, [:focussed_window, :tab_focussed]) do |tab|
|
47
|
+
if win = Redcar.app.focussed_window
|
48
|
+
win.focussed_notebook.focussed_tab
|
49
|
+
end
|
50
|
+
end,
|
51
|
+
Sensitivity.new(:single_notebook, Redcar.app, true, [:focussed_window, :notebook_change]) do
|
52
|
+
if win = Redcar.app.focussed_window
|
53
|
+
win.notebooks.length == 1
|
54
|
+
end
|
55
|
+
end,
|
56
|
+
Sensitivity.new(:multiple_notebooks, Redcar.app, false, [:focussed_window, :notebook_change]) do
|
57
|
+
if win = Redcar.app.focussed_window
|
58
|
+
win.notebooks.length > 1
|
59
|
+
end
|
60
|
+
end,
|
61
|
+
Sensitivity.new(:other_notebook_has_tab, Redcar.app, false,
|
62
|
+
[:focussed_window, :focussed_notebook, :notebook_change, :tab_closed]) do
|
63
|
+
if win = Redcar.app.focussed_window and notebook = win.nonfocussed_notebook
|
64
|
+
notebook.tabs.any?
|
65
|
+
end
|
64
66
|
end
|
65
|
-
|
67
|
+
]
|
66
68
|
end
|
67
69
|
|
70
|
+
attr_reader :clipboard
|
71
|
+
|
68
72
|
def initialize
|
69
73
|
@windows = []
|
70
74
|
@window_handlers = Hash.new {|h,k| h[k] = []}
|
75
|
+
create_clipboard
|
76
|
+
end
|
77
|
+
|
78
|
+
def create_clipboard
|
79
|
+
@clipboard = Clipboard.new("application")
|
80
|
+
@clipboard.add_listener(:added) { notify_listeners(:clipboard_added) }
|
71
81
|
end
|
72
82
|
|
73
83
|
# Immediately halts the gui event loop.
|
@@ -101,7 +111,7 @@ module Redcar
|
|
101
111
|
end
|
102
112
|
@window_handlers[window].each {|h| window.remove_listener(h) }
|
103
113
|
@window_handlers.delete(window)
|
104
|
-
if windows.length == 0 and [:linux, :windows].include?(
|
114
|
+
if windows.length == 0 and [:linux, :windows].include?(Redcar.platform)
|
105
115
|
quit
|
106
116
|
end
|
107
117
|
end
|
@@ -137,6 +147,24 @@ module Redcar
|
|
137
147
|
self.menu = @menu
|
138
148
|
end
|
139
149
|
|
150
|
+
def load_menus
|
151
|
+
menu = Menu.new
|
152
|
+
Redcar.plugin_manager.loaded_plugins.each do |plugin|
|
153
|
+
if plugin.object.respond_to?(:menus)
|
154
|
+
menu.merge(plugin.object.menus)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
self.menu = menu
|
158
|
+
end
|
159
|
+
|
160
|
+
def load_sensitivities
|
161
|
+
Redcar.plugin_manager.loaded_plugins.each do |plugin|
|
162
|
+
if plugin.object.respond_to?(:sensitivities)
|
163
|
+
plugin.object.sensitivities
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
140
168
|
def attach_window_listeners(window)
|
141
169
|
h1 = window.add_listener(:tab_focussed) do |tab|
|
142
170
|
notify_listeners(:tab_focussed, tab)
|
@@ -164,7 +192,12 @@ module Redcar
|
|
164
192
|
notify_listeners(:focussed_tab_changed, tab)
|
165
193
|
end
|
166
194
|
end
|
167
|
-
|
195
|
+
h9 = window.add_listener(:focussed_tab_selection_changed) do |tab|
|
196
|
+
if window == focussed_window
|
197
|
+
notify_listeners(:focussed_tab_selection_changed, tab)
|
198
|
+
end
|
199
|
+
end
|
200
|
+
@window_handlers[window] << h1 << h2 << h3 << h4 << h5 << h6 << h7 << h8 << h9
|
168
201
|
end
|
169
202
|
end
|
170
203
|
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
module Redcar
|
2
|
+
# A simple array with a maximum length. Models a copy/paste clipboard
|
3
|
+
# that can contain multiple elements.
|
4
|
+
class Clipboard
|
5
|
+
include Redcar::Model
|
6
|
+
include Redcar::Observable
|
7
|
+
include Enumerable
|
8
|
+
|
9
|
+
def self.max_length
|
10
|
+
10
|
11
|
+
end
|
12
|
+
|
13
|
+
attr_reader :name
|
14
|
+
|
15
|
+
def initialize(name)
|
16
|
+
@name = name
|
17
|
+
@contents = []
|
18
|
+
end
|
19
|
+
|
20
|
+
# Add text to the clipboard.
|
21
|
+
#
|
22
|
+
# @param [String, Array<String>]
|
23
|
+
def <<(text)
|
24
|
+
if text.is_a?(String)
|
25
|
+
text = [text]
|
26
|
+
end
|
27
|
+
@contents << text
|
28
|
+
if @contents.length == Clipboard.max_length + 1
|
29
|
+
@contents.delete_at(0)
|
30
|
+
end
|
31
|
+
notify_listeners(:added_internal, text)
|
32
|
+
notify_listeners(:added, text)
|
33
|
+
end
|
34
|
+
|
35
|
+
def last
|
36
|
+
check_for_changes
|
37
|
+
@contents.last
|
38
|
+
end
|
39
|
+
|
40
|
+
def length
|
41
|
+
check_for_changes
|
42
|
+
@contents.length
|
43
|
+
end
|
44
|
+
|
45
|
+
def [](index)
|
46
|
+
check_for_changes
|
47
|
+
@contents[-1*index-1]
|
48
|
+
end
|
49
|
+
|
50
|
+
def each(&block)
|
51
|
+
check_for_changes
|
52
|
+
@contents.each(&block)
|
53
|
+
end
|
54
|
+
|
55
|
+
def silently_add(text)
|
56
|
+
@contents << text
|
57
|
+
end
|
58
|
+
|
59
|
+
private
|
60
|
+
|
61
|
+
def check_for_changes
|
62
|
+
if controller and controller.changed?
|
63
|
+
controller.last_set = @contents.last.join("\n")
|
64
|
+
contents = controller.get_contents
|
65
|
+
self << contents if contents
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
|