redcar 0.3.1dev → 0.3.2dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
# Purpose: FreeBASE properties Manager.
|
|
2
|
-
#
|
|
3
|
-
# $Id: properties.rb,v 1.6 2005/02/27 16:18:29 ljulliar Exp $
|
|
4
|
-
#
|
|
5
|
-
# Authors: Rich Kilmer <rich@infoether.com>
|
|
6
|
-
# Contributors:
|
|
7
|
-
#
|
|
8
|
-
# This file is part of the FreeRIDE project
|
|
9
|
-
#
|
|
10
|
-
# This application is free software; you can redistribute it and/or
|
|
11
|
-
# modify it under the terms of the Ruby license defined in the
|
|
12
|
-
# COPYING file.
|
|
13
|
-
#
|
|
14
|
-
# Copyright (c) 2001 Rich Kilmer. All rights reserved.
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
module FreeBASE
|
|
18
|
-
|
|
19
|
-
##
|
|
20
|
-
# The Properties class sits on top of the databus
|
|
21
|
-
# and persists the tree of values in an xml file
|
|
22
|
-
#
|
|
23
|
-
class Properties
|
|
24
|
-
attr_reader :base_slot
|
|
25
|
-
attr_accessor :auto_save
|
|
26
|
-
|
|
27
|
-
##
|
|
28
|
-
# test if a property file exists either in the user
|
|
29
|
-
# or the FR directory
|
|
30
|
-
#
|
|
31
|
-
def self.exist?(filespec)
|
|
32
|
-
user_filespec = DefaultPropertiesReader.user_filename(filespec)
|
|
33
|
-
if user_filespec.nil?
|
|
34
|
-
filespec = File.join($FR_CODEBASE,filespec) unless File.absolute_path?(filespec)
|
|
35
|
-
else
|
|
36
|
-
filespec = user_filespec
|
|
37
|
-
end
|
|
38
|
-
File.exist?(filespec)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
##
|
|
42
|
-
# Copy a property file from source file to target file
|
|
43
|
-
# Try to copy to user directory first else FR directory
|
|
44
|
-
#
|
|
45
|
-
def self.copy(filespec_src, filespec_tgt)
|
|
46
|
-
require 'ftools'
|
|
47
|
-
user_filespec_tgt = DefaultPropertiesReader.user_filename(filespec_tgt)
|
|
48
|
-
if user_filespec_tgt.nil?
|
|
49
|
-
filespec_tgt = File.join($FR_CODEBASE,filespec_tgt) unless File.absolute_path?(filespec_tgt)
|
|
50
|
-
else
|
|
51
|
-
filespec_tgt = user_filespec_tgt
|
|
52
|
-
end
|
|
53
|
-
filespec_src = File.join($FR_CODEBASE,filespec_src) unless File.absolute_path?(filespec_src)
|
|
54
|
-
File.makedirs(File.dirname(filespec_tgt))
|
|
55
|
-
File.copy(filespec_src, filespec_tgt)
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
##
|
|
59
|
-
# Creates a new Properties
|
|
60
|
-
#
|
|
61
|
-
# name:: [String] The name of this properties file
|
|
62
|
-
# version:: [String] The version of this properties file
|
|
63
|
-
# base_slot:: [FreeBASE::DataBus::Slot] The base slot of the branch to persist
|
|
64
|
-
# filespec:: [String] The file to store the properties in
|
|
65
|
-
#
|
|
66
|
-
def initialize(name, version, base_slot, filespec)
|
|
67
|
-
@base_slot = base_slot
|
|
68
|
-
@filespec = filespec
|
|
69
|
-
@name = name
|
|
70
|
-
@version = version
|
|
71
|
-
@auto_save = true
|
|
72
|
-
@base_slot.propagate_notifications = false
|
|
73
|
-
begin
|
|
74
|
-
DefaultPropertiesReader.load(@base_slot, @filespec)
|
|
75
|
-
rescue
|
|
76
|
-
@base_slot["/log/error"] << "Error loading property file: #{filespec}. Error: #{$!}. Ignoring it!"
|
|
77
|
-
end
|
|
78
|
-
@base_slot.propagate_notifications = true
|
|
79
|
-
@base_slot.manager = self
|
|
80
|
-
@base_slot.subscribe self
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
##
|
|
84
|
-
# Event handler for Slot change notifications
|
|
85
|
-
# see:: FreeRIDE::DataBus::Slot
|
|
86
|
-
#
|
|
87
|
-
def databus_notify(event, slot)
|
|
88
|
-
save if event == :notify_data_set && @auto_save
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
def prune(path)
|
|
92
|
-
@base_slot[path].prune
|
|
93
|
-
save
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
##
|
|
97
|
-
# Gets the property value
|
|
98
|
-
#
|
|
99
|
-
# path:: [String] the property path
|
|
100
|
-
# return:: [String] the property value
|
|
101
|
-
#
|
|
102
|
-
def [](path)
|
|
103
|
-
return @base_slot[path].data
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
##
|
|
107
|
-
# Sets the property value and persists the properties
|
|
108
|
-
#
|
|
109
|
-
# path:: [String] the property path
|
|
110
|
-
# value:: [to_s] the property value
|
|
111
|
-
#
|
|
112
|
-
def []=(path, value)
|
|
113
|
-
@base_slot[path].data = value
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
def each_property(path=".")
|
|
117
|
-
@base_slot[path].each_slot do |slot|
|
|
118
|
-
yield slot.name, slot.data
|
|
119
|
-
end
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
##
|
|
123
|
-
# Persists the properties file using the defined PropertiesReader
|
|
124
|
-
#
|
|
125
|
-
def save
|
|
126
|
-
DefaultPropertiesReader.save(@base_slot, @filespec, @name, @version)
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
end
|
|
130
|
-
end
|
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
# Purpose: Configuration classes for FreeBASE
|
|
2
|
-
#
|
|
3
|
-
# Authors: Rich Kilmer <rich@infoether.com>
|
|
4
|
-
# Contributors:
|
|
5
|
-
#
|
|
6
|
-
# This file is part of the FreeRIDE project
|
|
7
|
-
#
|
|
8
|
-
# This application is free software; you can redistribute it and/or
|
|
9
|
-
# modify it under the terms of the Ruby license defined in the
|
|
10
|
-
# COPYING file.
|
|
11
|
-
#
|
|
12
|
-
# Copyright (c) 2001 Rich Kilmer. All rights reserved.
|
|
13
|
-
#
|
|
14
|
-
begin
|
|
15
|
-
require 'rubygems'
|
|
16
|
-
rescue
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
module FreeBASE
|
|
20
|
-
|
|
21
|
-
##
|
|
22
|
-
# Reads and writes properties (properties.rb) to a persistent file in YAML
|
|
23
|
-
#
|
|
24
|
-
class YAMLPropertiesReader
|
|
25
|
-
|
|
26
|
-
@@userdir = nil
|
|
27
|
-
|
|
28
|
-
def self.load_libraries
|
|
29
|
-
require 'yaml'
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def self.windows?
|
|
33
|
-
(RUBY_PLATFORM =~ /(mswin32|mingw32)/) ||
|
|
34
|
-
( (RUBY_PLATFORM == 'java') &&
|
|
35
|
-
(java.lang.System.getProperty('os.name') =~ /Windows/)
|
|
36
|
-
)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
##
|
|
40
|
-
# Determine where the user directory is (if any)
|
|
41
|
-
#
|
|
42
|
-
def self.setup
|
|
43
|
-
$FREEBASE_APPLICATION = "redcar" unless $FREEBASE_APPLICATION
|
|
44
|
-
if windows?
|
|
45
|
-
if ENV['USERPROFILE'].nil?
|
|
46
|
-
@@userdir = "C:/My Documents/.redcar/"
|
|
47
|
-
Dir.mkdir(@@userdir) unless File.directory?(@@userdir)
|
|
48
|
-
else
|
|
49
|
-
@@userdir = File.join(ENV['USERPROFILE'], $FREEBASE_APPLICATION.downcase)
|
|
50
|
-
end
|
|
51
|
-
else
|
|
52
|
-
@@userdir = File.join(ENV['HOME'],".#{$FREEBASE_APPLICATION.downcase}") unless ENV['HOME'].nil?
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
##
|
|
57
|
-
# Given a relative path to a property file, return the full path
|
|
58
|
-
# in the user directory. Return nil if no user directory defined
|
|
59
|
-
# or absolute path name given.
|
|
60
|
-
#
|
|
61
|
-
def self.user_filename(filespec)
|
|
62
|
-
return nil if @@userdir.nil? || File.absolute_path?(filespec)
|
|
63
|
-
return File.expand_path(File.join(@@userdir,filespec))
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
##
|
|
67
|
-
# Save a property file. Try in the user directory first then in the
|
|
68
|
-
# FR directory
|
|
69
|
-
#
|
|
70
|
-
def self.save(base_slot, filespec, name, version)
|
|
71
|
-
user_filespec = user_filename(filespec)
|
|
72
|
-
if user_filespec.nil?
|
|
73
|
-
filespec = File.join($FR_CODEBASE,filespec) unless File.absolute_path?(filespec)
|
|
74
|
-
else
|
|
75
|
-
filespec = user_filespec
|
|
76
|
-
# if file first saved make sure to create the full path first
|
|
77
|
-
unless File.exist?(filespec)
|
|
78
|
-
require 'ftools'
|
|
79
|
-
File.makedirs(File.dirname(filespec))
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
# puts ">>> Saving Property File: #{filespec}"
|
|
83
|
-
file = File.new(filespec, "w+")
|
|
84
|
-
file.puts "#### Properties: #{name} - Version: #{version}"
|
|
85
|
-
file.puts gather_data(base_slot).to_yaml(:SortKeys=>true)
|
|
86
|
-
file.close
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
def self.gather_data(slot, structure={})
|
|
90
|
-
structure[slot.name]=slot.data
|
|
91
|
-
if slot.has_child?
|
|
92
|
-
structure['|'] = Array.new
|
|
93
|
-
slot.each_slot do |child_slot|
|
|
94
|
-
map = {}
|
|
95
|
-
structure['|'] << map
|
|
96
|
-
gather_data(child_slot, map)
|
|
97
|
-
end
|
|
98
|
-
end
|
|
99
|
-
structure
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
##
|
|
103
|
-
# Load a property file. Try in the user directory first then in the
|
|
104
|
-
# FR directory
|
|
105
|
-
#
|
|
106
|
-
def self.load(base_slot, filespec)
|
|
107
|
-
user_filespec = user_filename(filespec)
|
|
108
|
-
if !user_filespec.nil? && File.exist?(user_filespec)
|
|
109
|
-
filespec = user_filespec
|
|
110
|
-
else
|
|
111
|
-
filespec = File.join($FR_CODEBASE,filespec) unless File.absolute_path?(filespec)
|
|
112
|
-
end
|
|
113
|
-
#puts "Loading Property File: #{filespec}"
|
|
114
|
-
return unless File.exist?(filespec)
|
|
115
|
-
data = nil
|
|
116
|
-
File.open(filespec) {|file| data = file.read}
|
|
117
|
-
map = YAML.load(data)
|
|
118
|
-
if map != nil
|
|
119
|
-
read_slot(base_slot, map)
|
|
120
|
-
end
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
def self.read_slot(slot, map)
|
|
124
|
-
slot.data = map[map.keys.sort[0]]
|
|
125
|
-
return unless map["|"]
|
|
126
|
-
map['|'].each do |subslotmap|
|
|
127
|
-
read_slot(slot[subslotmap.keys.sort[0]], subslotmap)
|
|
128
|
-
end
|
|
129
|
-
end
|
|
130
|
-
end
|
|
131
|
-
|
|
132
|
-
##
|
|
133
|
-
# Reads and writes properties (properties.rb) to a persistent file in XML
|
|
134
|
-
#
|
|
135
|
-
class REXMLPropertiesReader
|
|
136
|
-
|
|
137
|
-
def self.load_libraries
|
|
138
|
-
require 'rexml/document'
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
def self.save(base_slot, filespec, name, version)
|
|
142
|
-
file = File.new(filespec, "w+")
|
|
143
|
-
doc = REXML::Document.new "<properties name='#{name}' version='#{version}'/>"
|
|
144
|
-
base_slot.each_slot { |slot| write_slot(slot, doc.root) }
|
|
145
|
-
doc.write file
|
|
146
|
-
file.close
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
def self.write_slot(slot, root)
|
|
150
|
-
n_element = root.add_element("slot", {"name"=>slot.name})
|
|
151
|
-
n_element.text = slot.data
|
|
152
|
-
slot.each_slot { |child| write_slot(child, n_element) }
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
def self.load(base_slot, filespec)
|
|
156
|
-
return unless File.exist?(filespec)
|
|
157
|
-
file = File.new(filespec)
|
|
158
|
-
doc = REXML::Document.new(file)
|
|
159
|
-
doc.root.each_element("slot") { |element| read_slot(base_slot, element) }
|
|
160
|
-
file.close
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
def self.read_slot(root, element)
|
|
164
|
-
slot = root[element.attributes["name"]]
|
|
165
|
-
slot.data = element.text.strip if element.text
|
|
166
|
-
element.each_element("slot") { |element| read_slot(slot, element) }
|
|
167
|
-
end
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
##
|
|
171
|
-
# Reads the configuration files from the plugin path and registers the plugins
|
|
172
|
-
# with the Configuration (manager).
|
|
173
|
-
#
|
|
174
|
-
class YAMLConfigurationReader
|
|
175
|
-
def initialize(configuration)
|
|
176
|
-
@configuration = configuration
|
|
177
|
-
load_files
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
def load_files
|
|
181
|
-
paths = @configuration.plugin_paths.split(";")
|
|
182
|
-
if defined? Gem
|
|
183
|
-
gems = Gem::SourceIndex.from_installed_gems(File.join(Gem.dir, "specifications"))
|
|
184
|
-
gems.each do |path, gem|
|
|
185
|
-
if gem.summary.include? "(#{$FREEBASE_APPLICATION} plugin)"
|
|
186
|
-
paths << Gem.dir+"/gems/"+path
|
|
187
|
-
end
|
|
188
|
-
end
|
|
189
|
-
end
|
|
190
|
-
load_files_from_paths(paths)
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
private
|
|
194
|
-
|
|
195
|
-
def load_files_from_paths(paths)
|
|
196
|
-
paths.each do |path|
|
|
197
|
-
fullpath = path
|
|
198
|
-
fullpath = File.join($FR_CODEBASE,path) unless File.absolute_path?(fullpath)
|
|
199
|
-
unless File.exists?(fullpath)
|
|
200
|
-
raise "can't find directory #{fullpath}"
|
|
201
|
-
end
|
|
202
|
-
Dir.foreach(fullpath) do |file|
|
|
203
|
-
next if file=='..' || file=='.'
|
|
204
|
-
if File.stat("#{fullpath}/#{file}").directory?
|
|
205
|
-
full_filespec = "#{fullpath}/#{file}/plugin.yaml"
|
|
206
|
-
filespec = "#{path}/#{file}/plugin.yaml"
|
|
207
|
-
next unless File.exist?(full_filespec)
|
|
208
|
-
@configuration.register(YAML.load(File.open(full_filespec).read),
|
|
209
|
-
File.dirname(filespec))
|
|
210
|
-
elsif file[-5..-1]==".yaml" and !File.stat("#{fullpath}/#{file}").directory?
|
|
211
|
-
full_filespec = "#{fullpath}/#{file}"
|
|
212
|
-
filespec = "#{path}/#{file}"
|
|
213
|
-
|
|
214
|
-
# we absolutize the path here for gem plugins
|
|
215
|
-
yaml_spec = YAML.load(File.open(full_filespec).read)
|
|
216
|
-
yaml_spec.require_path = fullpath+"/"+yaml_spec.require_path
|
|
217
|
-
@configuration.register(yaml_spec,
|
|
218
|
-
File.dirname(filespec))
|
|
219
|
-
end
|
|
220
|
-
end
|
|
221
|
-
end
|
|
222
|
-
end
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
# NOTE: NOT YET COMPLETE
|
|
226
|
-
class REXMLConfigurationReader
|
|
227
|
-
|
|
228
|
-
def initialize(configuration)
|
|
229
|
-
raise "The REXMLConfigurationReader is incomplete at this time"
|
|
230
|
-
@configuration = configuration
|
|
231
|
-
load_files
|
|
232
|
-
end
|
|
233
|
-
|
|
234
|
-
##
|
|
235
|
-
# Iterates over the directory(s) defined in the properties["/config/plugin_path"]
|
|
236
|
-
# looking for subdirectories. When found, the plugin.xml file is read and the
|
|
237
|
-
# identified file is "required" and the identified module has startup(bus,localbus)
|
|
238
|
-
# called upon it.
|
|
239
|
-
#
|
|
240
|
-
def process_configuration_files(configuration)
|
|
241
|
-
plugin_element = nil
|
|
242
|
-
configuration.plugin_paths.split(";").each do |path|
|
|
243
|
-
Dir.foreach(path) do |file|
|
|
244
|
-
if file!=".." and file!="." and File.stat("#{path}/#{file}").directory?
|
|
245
|
-
filespec = "#{path}/#{file}/plugin.xml"
|
|
246
|
-
next unless File.exist?(filespec)
|
|
247
|
-
each_plugin_element(filespec) do |plugin_element|
|
|
248
|
-
FreeBASE::Plugin.new(self, filespec, plugin_element)
|
|
249
|
-
end
|
|
250
|
-
elsif file[-4..-1]==".xml" and !File.stat("#{path}/#{file}").directory?
|
|
251
|
-
filespec = "#{path}/#{file}"
|
|
252
|
-
each_plugin_element(filespec) do |plugin_element|
|
|
253
|
-
FreeBASE::Plugin.new(self, filespec, plugin_element)
|
|
254
|
-
end
|
|
255
|
-
end
|
|
256
|
-
end
|
|
257
|
-
end
|
|
258
|
-
end
|
|
259
|
-
##
|
|
260
|
-
# Opens the supplied file and parse <plugin> elements
|
|
261
|
-
# yielding each to the supplied block.
|
|
262
|
-
#
|
|
263
|
-
# filespec:: [String] The file name to parse
|
|
264
|
-
# &block:: [String] The block to be yielded the REXML element
|
|
265
|
-
#
|
|
266
|
-
def each_plugin_element(filespec, &block)
|
|
267
|
-
file = File.new(filespec)
|
|
268
|
-
xml = REXML::Document.new file
|
|
269
|
-
file.close
|
|
270
|
-
plugin_element = xml.root
|
|
271
|
-
if plugin_element.name=="plugin"
|
|
272
|
-
yield plugin_element
|
|
273
|
-
return
|
|
274
|
-
else
|
|
275
|
-
yield plugin_element if plugin_element.attributes["name"] #register subsystem plugin
|
|
276
|
-
plugin_element.each_element("plugin") {|element| yield element}
|
|
277
|
-
end
|
|
278
|
-
end
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
def parse_xml(plugin_element)
|
|
282
|
-
if plugin_element.name=="subsystem"
|
|
283
|
-
@name = plugin_element.attributes["name"]
|
|
284
|
-
@version = "1.0"
|
|
285
|
-
@autoload=true
|
|
286
|
-
@startup_module = "FreeBASE::SubsystemPlugin"
|
|
287
|
-
@dependencies = {}
|
|
288
|
-
dependency = Dependency.new("LOADED", "start")
|
|
289
|
-
plugin_element.each_element("plugin") do |element|
|
|
290
|
-
dependency.add_plugin(element.attributes["name"], "*", "RUNNING")
|
|
291
|
-
end
|
|
292
|
-
@dependencies["LOADED"] = dependency
|
|
293
|
-
else
|
|
294
|
-
@name = plugin_element.attributes["name"]
|
|
295
|
-
@version = plugin_element.attributes["version"]
|
|
296
|
-
@autoload = plugin_element.attributes["autoload"]=="true" ? true : false
|
|
297
|
-
@require_file = plugin_element.elements["require"].text
|
|
298
|
-
@startup_module = plugin_element.elements["module"].text
|
|
299
|
-
if plugin_element.elements["resourcePath"]
|
|
300
|
-
@resource_path = plugin_element.elements["resourcePath"].text
|
|
301
|
-
end
|
|
302
|
-
if plugin_element.elements["properties"]
|
|
303
|
-
@properties_file = plugin_element.elements["properties"].text
|
|
304
|
-
end
|
|
305
|
-
@dependencies = {}
|
|
306
|
-
plugin_element.each_element("dependency") do |element|
|
|
307
|
-
dependency = Dependency.new(element.attributes["state"], element.attributes["action"])
|
|
308
|
-
element.each_element("when") do |pelement|
|
|
309
|
-
attr = pelement.attributes
|
|
310
|
-
dependency.add_plugin(attr["plugin"], attr["version"], attr["state"])
|
|
311
|
-
end
|
|
312
|
-
@dependencies[element.attributes["state"]] = dependency
|
|
313
|
-
end
|
|
314
|
-
end
|
|
315
|
-
end
|
|
316
|
-
|
|
317
|
-
end
|
|
318
|
-
|
|
319
|
-
# This represents the PropertiesReader and ConfigurationReader
|
|
320
|
-
# It is important that these be set either to YAML or REXML.
|
|
321
|
-
DefaultPropertiesReader = YAMLPropertiesReader
|
|
322
|
-
DefaultPropertiesReader.load_libraries
|
|
323
|
-
DefaultPropertiesReader.setup
|
|
324
|
-
DefaultConfigurationReader = YAMLConfigurationReader
|
|
325
|
-
|
|
326
|
-
end
|
|
327
|
-
|
|
328
|
-
|