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.
Files changed (316) hide show
  1. data/CHANGES +34 -1
  2. data/README.md +2 -1
  3. data/ROADMAP.md +13 -45
  4. data/Rakefile +15 -14
  5. data/bin/redcar +4 -1
  6. data/lib/plugin_manager/README.md +61 -0
  7. data/lib/plugin_manager/Rakefile +55 -0
  8. data/lib/plugin_manager/bin/plugin_manager +4 -0
  9. data/lib/plugin_manager/lib/plugin_manager.rb +107 -0
  10. data/lib/plugin_manager/lib/plugin_manager/definition_builder.rb +37 -0
  11. data/lib/plugin_manager/lib/plugin_manager/plugin.rb +9 -0
  12. data/lib/plugin_manager/lib/plugin_manager/plugin_definition.rb +50 -0
  13. data/lib/plugin_manager/plugin_manager.gemspec +33 -0
  14. data/lib/plugin_manager/spec/fixtures/error_in_definition/core/plugin.rb +2 -0
  15. data/lib/plugin_manager/spec/fixtures/error_in_plugin/core/core.rb +4 -0
  16. data/lib/plugin_manager/spec/fixtures/error_in_plugin/core/plugin.rb +7 -0
  17. data/lib/plugin_manager/spec/fixtures/example/core/core.rb +20 -0
  18. data/lib/plugin_manager/spec/fixtures/example/core/plugin.rb +7 -0
  19. data/lib/plugin_manager/spec/fixtures/example/debug/debug.rb +6 -0
  20. data/lib/plugin_manager/spec/fixtures/example/debug/plugin.rb +8 -0
  21. data/lib/plugin_manager/spec/fixtures/example/extras/extras.rb +6 -0
  22. data/lib/plugin_manager/spec/fixtures/example/extras/plugin.rb +8 -0
  23. data/lib/plugin_manager/spec/fixtures/two_versions1/core/core.rb +20 -0
  24. data/lib/plugin_manager/spec/fixtures/two_versions1/core/plugin.rb +7 -0
  25. data/lib/plugin_manager/spec/fixtures/two_versions1/core2/core.rb +20 -0
  26. data/lib/plugin_manager/spec/fixtures/two_versions1/core2/plugin.rb +7 -0
  27. data/lib/plugin_manager/spec/fixtures/two_versions2/core/core.rb +20 -0
  28. data/lib/plugin_manager/spec/fixtures/two_versions2/core/plugin.rb +7 -0
  29. data/lib/plugin_manager/spec/fixtures/two_versions2/core2/core.rb +20 -0
  30. data/lib/plugin_manager/spec/fixtures/two_versions2/core2/plugin.rb +8 -0
  31. data/lib/plugin_manager/spec/fixtures/unmet_dependencies1/core/core.rb +10 -0
  32. data/lib/plugin_manager/spec/fixtures/unmet_dependencies1/core/plugin.rb +7 -0
  33. data/lib/plugin_manager/spec/fixtures/unmet_dependencies1/debug/debug.rb +6 -0
  34. data/lib/plugin_manager/spec/fixtures/unmet_dependencies1/debug/plugin.rb +8 -0
  35. data/lib/plugin_manager/spec/fixtures/unmet_dependencies2/core/core.rb +10 -0
  36. data/lib/plugin_manager/spec/fixtures/unmet_dependencies2/core/plugin.rb +7 -0
  37. data/lib/plugin_manager/spec/fixtures/unmet_dependencies2/debug/debug.rb +6 -0
  38. data/lib/plugin_manager/spec/fixtures/unmet_dependencies2/debug/plugin.rb +8 -0
  39. data/lib/plugin_manager/spec/plugin_manager_spec.rb +208 -0
  40. data/lib/plugin_manager/spec/spec_helper.rb +3 -0
  41. data/lib/redcar.rb +8 -3
  42. data/lib/redcar/boot.rb +59 -56
  43. data/lib/redcar/installer.rb +1 -1
  44. data/lib/redcar/instance_exec.rb +25 -0
  45. data/lib/redcar/runner.rb +5 -1
  46. data/lib/redcar/usage.rb +5 -1
  47. data/plugins/application/icons/close.png +0 -0
  48. data/plugins/application/lib/application.rb +61 -28
  49. data/plugins/application/lib/application/clipboard.rb +71 -0
  50. data/plugins/application/lib/application/dialog.rb +63 -0
  51. data/plugins/application/lib/application/menu.rb +32 -1
  52. data/plugins/application/lib/application/menu/builder.rb +10 -4
  53. data/plugins/application/lib/application/menu/item.rb +16 -3
  54. data/plugins/application/lib/application/notebook.rb +5 -0
  55. data/plugins/application/lib/application/speedbar.rb +73 -0
  56. data/plugins/application/lib/application/window.rb +25 -0
  57. data/plugins/application/plugin.rb +8 -0
  58. data/plugins/application/spec/application/clipboard_spec.rb +36 -0
  59. data/plugins/application/spec/application/menu_spec.rb +73 -1
  60. data/plugins/application/spec/application/speedbar_spec.rb +46 -0
  61. data/plugins/application/spec/spec_helper.rb +1 -1
  62. data/plugins/application_swt/lib/application_swt.rb +18 -11
  63. data/plugins/application_swt/lib/application_swt/clipboard.rb +42 -0
  64. data/plugins/application_swt/lib/application_swt/dialog_adapter.rb +68 -0
  65. data/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb +1 -1
  66. data/plugins/application_swt/lib/application_swt/html_tab.rb +32 -0
  67. data/plugins/application_swt/lib/application_swt/menu.rb +57 -21
  68. data/plugins/application_swt/lib/application_swt/menu/binding_translator.rb +39 -2
  69. data/plugins/application_swt/lib/application_swt/notebook.rb +5 -0
  70. data/plugins/application_swt/lib/application_swt/speedbar.rb +187 -0
  71. data/plugins/application_swt/lib/application_swt/swt_wrapper.rb +24 -1
  72. data/plugins/application_swt/lib/application_swt/window.rb +33 -3
  73. data/plugins/application_swt/plugin.rb +8 -0
  74. data/plugins/application_swt/spec/spec_helper.rb +1 -1
  75. data/plugins/auto_completer/features/auto_complete.feature +65 -0
  76. data/plugins/auto_completer/features/step_definitions/auto_complete_steps.rb +4 -0
  77. data/plugins/auto_completer/features/support/env.rb +4 -0
  78. data/plugins/auto_completer/lib/auto_completer.rb +99 -0
  79. data/plugins/auto_completer/lib/auto_completer/document_controller.rb +52 -0
  80. data/plugins/auto_completer/lib/auto_completer/word_iterator.rb +48 -0
  81. data/plugins/auto_completer/lib/auto_completer/word_list.rb +40 -0
  82. data/plugins/auto_completer/plugin.rb +10 -0
  83. data/plugins/auto_indenter/lib/auto_indenter.rb +1 -1
  84. data/plugins/auto_indenter/lib/auto_indenter/document_controller.rb +1 -1
  85. data/plugins/auto_indenter/plugin.rb +8 -0
  86. data/plugins/core/lib/core.rb +6 -30
  87. data/plugins/core/lib/core/gui.rb +7 -2
  88. data/plugins/core/lib/core/logger.rb +7 -4
  89. data/plugins/core/lib/core/plugin/storage.rb +15 -5
  90. data/plugins/core/plugin.rb +7 -0
  91. data/plugins/core/spec/core/storage_spec.rb +0 -9
  92. data/plugins/edit_view/features/cut_and_paste.feature +45 -0
  93. data/plugins/edit_view/features/step_definitions/editing_steps.rb +22 -0
  94. data/plugins/edit_view/features/step_definitions/key_steps.rb +1 -1
  95. data/plugins/edit_view/features/step_definitions/notebook_steps.rb +1 -1
  96. data/plugins/edit_view/features/step_definitions/tab_steps.rb +2 -0
  97. data/plugins/edit_view/features/step_definitions/window_steps.rb +1 -1
  98. data/plugins/edit_view/features/support/env.rb +2 -2
  99. data/plugins/edit_view/lib/edit_view.rb +24 -13
  100. data/plugins/edit_view/lib/edit_view/document.rb +233 -15
  101. data/plugins/edit_view/lib/edit_view/edit_tab.rb +2 -2
  102. data/plugins/edit_view/plugin.rb +9 -0
  103. data/plugins/edit_view/spec/spec_helper.rb +1 -1
  104. data/plugins/edit_view_swt/lib/edit_view_swt.rb +37 -8
  105. data/plugins/edit_view_swt/lib/edit_view_swt/document.rb +59 -24
  106. data/plugins/edit_view_swt/lib/edit_view_swt/word_movement.rb +66 -0
  107. data/plugins/edit_view_swt/plugin.rb +9 -0
  108. data/plugins/edit_view_swt/spec/edit_view_swt/word_movement_spec.rb +29 -0
  109. data/plugins/edit_view_swt/spec/spec_helper.rb +6 -0
  110. data/plugins/html_view/assets/blueprint/ie.css +35 -0
  111. data/plugins/html_view/assets/blueprint/print.css +29 -0
  112. data/plugins/html_view/assets/blueprint/screen.css +257 -0
  113. data/plugins/html_view/assets/blueprint/src/forms.css +65 -0
  114. data/plugins/html_view/assets/blueprint/src/grid.css +281 -0
  115. data/plugins/html_view/assets/blueprint/src/grid.png +0 -0
  116. data/plugins/html_view/assets/blueprint/src/ie.css +76 -0
  117. data/plugins/html_view/assets/blueprint/src/print.css +85 -0
  118. data/plugins/html_view/assets/blueprint/src/reset.css +38 -0
  119. data/plugins/html_view/assets/blueprint/src/typography.css +106 -0
  120. data/plugins/html_view/assets/jquery-1.4.min.js +151 -0
  121. data/plugins/html_view/assets/redcar.css +12 -0
  122. data/plugins/html_view/lib/html_controller.rb +5 -0
  123. data/plugins/html_view/lib/html_view.rb +47 -0
  124. data/plugins/html_view/lib/html_view/html_tab.rb +16 -0
  125. data/plugins/html_view/plugin.rb +12 -0
  126. data/plugins/my_plugin/lib/my_plugin.rb +55 -0
  127. data/plugins/my_plugin/plugin.rb +8 -0
  128. data/plugins/plugin_manager_ui/lib/plugin_manager_ui.rb +62 -0
  129. data/plugins/plugin_manager_ui/plugin.rb +12 -0
  130. data/plugins/plugin_manager_ui/views/index.html.erb +31 -0
  131. data/plugins/project/lib/project.rb +27 -13
  132. data/plugins/project/lib/project/find_file_dialog.rb +25 -19
  133. data/plugins/project/plugin.rb +8 -0
  134. data/plugins/project/spec/spec_helper.rb +1 -1
  135. data/plugins/redcar/plugin.rb +13 -0
  136. data/plugins/redcar/redcar.rb +249 -8
  137. data/plugins/repl/lib/repl.rb +22 -14
  138. data/plugins/repl/plugin.rb +8 -0
  139. data/plugins/repl/spec/spec_helper.rb +1 -1
  140. data/plugins/tree/plugin.rb +9 -0
  141. data/plugins/tree/spec/spec_helper.rb +1 -1
  142. data/plugins/tree_view_swt/plugin.rb +9 -0
  143. data/textmate/Bundles/Apache.tmbundle/Syntaxes/Apache.plist +544 -0
  144. data/textmate/Bundles/Apache.tmbundle/Syntaxes/mod_perl.tmLanguage +120 -0
  145. data/textmate/Bundles/Blogging.tmbundle/Syntaxes/Blog___HTML__.plist +88 -0
  146. data/textmate/Bundles/Blogging.tmbundle/Syntaxes/Blog___Markdown__.plist +89 -0
  147. data/textmate/Bundles/Blogging.tmbundle/Syntaxes/Blog___Text__.plist +74 -0
  148. data/textmate/Bundles/Blogging.tmbundle/Syntaxes/Blog___Textile__.plist +74 -0
  149. data/textmate/Bundles/Bundle Development.tmbundle/Syntaxes/LanguageGrammar.tmLanguage +1829 -0
  150. data/textmate/Bundles/C Sharp.tmbundle/Syntaxes/Build.tmLanguage +142 -0
  151. data/textmate/Bundles/C Sharp.tmbundle/Syntaxes/C__.tmLanguage +524 -0
  152. data/textmate/Bundles/C++ Qt.tmbundle/Syntaxes/Qt_C____.tmLanguage +62 -0
  153. data/textmate/Bundles/C++ Qt.tmbundle/Syntaxes/qmake_Project.tmLanguage +308 -0
  154. data/textmate/Bundles/C.tmbundle/Syntaxes/C.plist +90 -48
  155. data/textmate/Bundles/Clojure.tmbundle/Syntaxes/Clojure.tmLanguage +427 -0
  156. data/textmate/Bundles/Cucumber.tmbundle/Syntaxes/Cucumber_Plain_Text_Feature.tmLanguage +106 -13
  157. data/textmate/Bundles/Cucumber.tmbundle/Syntaxes/Cucumber_Steps.tmLanguage +177 -2
  158. data/textmate/Bundles/Cucumber.tmbundle/Syntaxes/plaintext_template.erb +109 -17
  159. data/textmate/Bundles/D.tmbundle/Syntaxes/D.tmLanguage +908 -0
  160. data/textmate/Bundles/Diff.tmbundle/Syntaxes/Diff.plist +229 -0
  161. data/textmate/Bundles/DokuWiki.tmbundle/Syntaxes/DokuWiki.tmLanguage +649 -0
  162. data/textmate/Bundles/F-Script.tmbundle/Syntaxes/F__Script.plist +219 -0
  163. data/textmate/Bundles/Haskell.tmbundle/Syntaxes/Haskell.plist +646 -0
  164. data/textmate/Bundles/Haskell.tmbundle/Syntaxes/Literate_Haskell.plist +90 -0
  165. data/textmate/Bundles/Io.tmbundle/Syntaxes/Io.plist +225 -0
  166. data/textmate/Bundles/JSON.tmbundle/Syntaxes/JSON.tmLanguage +285 -0
  167. data/textmate/Bundles/JavaScript Prototype & Script_aculo_us.tmbundle/Syntaxes/JavaScript____Prototype.tmLanguage +193 -0
  168. data/textmate/Bundles/JavaScript Prototype & Script_aculo_us.tmbundle/Syntaxes/JavaScript____Prototype_Bracketed.tmLanguage +394 -0
  169. data/textmate/Bundles/JavaScript jQuery.tmbundle/Syntaxes/jQuery___JavaScript__.tmLanguage +440 -0
  170. data/textmate/Bundles/JavaScript.tmbundle/Syntaxes/JavaScript.plist +712 -0
  171. data/textmate/Bundles/Latex.tmbundle/Syntaxes/Bibtex.plist +406 -0
  172. data/textmate/Bundles/Latex.tmbundle/Syntaxes/LaTeX.plist +1601 -0
  173. data/textmate/Bundles/Latex.tmbundle/Syntaxes/LaTeX_Beamer.plist +106 -0
  174. data/textmate/Bundles/Latex.tmbundle/Syntaxes/LaTeX_Log.plist +141 -0
  175. data/textmate/Bundles/Latex.tmbundle/Syntaxes/LaTeX_Memoir.tmLanguage +165 -0
  176. data/textmate/Bundles/Latex.tmbundle/Syntaxes/TeX.plist +246 -0
  177. data/textmate/Bundles/Latex.tmbundle/Syntaxes/TeX_Math.plist +132 -0
  178. data/textmate/Bundles/Lisp.tmbundle/Syntaxes/Lisp.plist +160 -0
  179. data/textmate/Bundles/Makefile.tmbundle/Syntaxes/Makefile.plist +103 -0
  180. data/textmate/Bundles/Markdown.tmbundle/Syntaxes/Markdown.plist +1192 -0
  181. data/textmate/Bundles/Markdown.tmbundle/Syntaxes/MultiMarkdown.tmLanguage +80 -0
  182. data/textmate/Bundles/PHP.tmbundle/Syntaxes/PHP.plist +3481 -0
  183. data/textmate/Bundles/Perl HTML-Template.tmbundle/Syntaxes/Perl_HTML__Template.tmLanguage +217 -0
  184. data/textmate/Bundles/Perl Template Toolkit.tmbundle/Syntaxes/HTML___Template_Toolkit__.tmLanguage +339 -0
  185. data/textmate/Bundles/Postscript.tmbundle/Syntaxes/Postscript.tmLanguage +321 -0
  186. data/textmate/Bundles/Processing.tmbundle/Syntaxes/Processing.plist +296 -0
  187. data/textmate/Bundles/Property List.tmbundle/Syntaxes/Property_List.tmLanguage +1650 -0
  188. data/textmate/Bundles/Python Django Templates.tmbundle/Syntaxes/HTML___Django__.tmLanguage +104 -0
  189. data/textmate/Bundles/Python Django.tmbundle/Syntaxes/Python_Django.tmLanguage +57 -0
  190. data/textmate/Bundles/Python.tmbundle/Syntaxes/Python.tmLanguage +3016 -0
  191. data/textmate/Bundles/Python.tmbundle/Syntaxes/Regular_Expressions___Python__.tmLanguage +299 -0
  192. data/textmate/Bundles/Rez.tmbundle/Syntaxes/Rez.plist +219 -0
  193. data/textmate/Bundles/Ruby Haml.tmbundle/Syntaxes/Ruby_Haml.tmLanguage +403 -0
  194. data/textmate/Bundles/Ruby RSpec.tmbundle/Syntaxes/RSpec.tmLanguage +142 -0
  195. data/textmate/Bundles/Ruby.tmbundle/Syntaxes/Ruby.plist +139 -49
  196. data/textmate/Bundles/SQL.tmbundle/Syntaxes/SQL.plist +705 -0
  197. data/textmate/Bundles/SSH-Config.tmbundle/Syntaxes/SSH__Config.tmLanguage +88 -0
  198. data/textmate/Bundles/Scala.tmbundle/Syntaxes/Scala.tmLanguage +609 -0
  199. data/textmate/Bundles/Scala.tmbundle/Syntaxes/Scala_Properties.tmLanguage +54 -0
  200. data/textmate/Bundles/ShellScript.tmbundle/Syntaxes/Shell__Unix__Generic.plist +1855 -0
  201. data/textmate/Bundles/Tabular.tmbundle/Syntaxes/CSV.tmLanguage +178 -0
  202. data/textmate/Bundles/Tabular.tmbundle/Syntaxes/TSV.tmLanguage +135 -0
  203. data/textmate/Bundles/TextMate.tmbundle/Syntaxes/Regular_Expressions___Oniguruma__.tmLanguage +295 -0
  204. data/textmate/Bundles/TextMate.tmbundle/Syntaxes/Release_Notes.tmLanguage +126 -0
  205. data/textmate/Bundles/Textile.tmbundle/Syntaxes/Textile.plist +490 -0
  206. data/textmate/Bundles/Thrift.tmbundle/Syntaxes/Thrift.tmLanguage +1024 -0
  207. data/textmate/Bundles/XML.tmbundle/Syntaxes/XML.plist +576 -0
  208. data/textmate/Bundles/XML.tmbundle/Syntaxes/XSL.plist +157 -0
  209. data/textmate/Bundles/YAML.tmbundle/Syntaxes/YAML.plist +466 -0
  210. data/textmate/Themes/Django.tmTheme +436 -0
  211. metadata +371 -325
  212. data/config/default.yaml +0 -15
  213. data/lib/freebase2/README.txt +0 -47
  214. data/lib/freebase2/bin/default.yaml +0 -15
  215. data/lib/freebase2/bin/install.rb +0 -42
  216. data/lib/freebase2/bin/run.rb +0 -48
  217. data/lib/freebase2/lib/freebase/configuration.rb +0 -535
  218. data/lib/freebase2/lib/freebase/core.rb +0 -197
  219. data/lib/freebase2/lib/freebase/databus.rb +0 -1128
  220. data/lib/freebase2/lib/freebase/freebase.rb +0 -60
  221. data/lib/freebase2/lib/freebase/logger.rb +0 -117
  222. data/lib/freebase2/lib/freebase/plugin.rb +0 -384
  223. data/lib/freebase2/lib/freebase/properties.rb +0 -130
  224. data/lib/freebase2/lib/freebase/readers.rb +0 -328
  225. data/lib/freebase2/notes +0 -61
  226. data/lib/freebase2/plugins/raa_webrick/httpd.rb +0 -125
  227. data/lib/freebase2/plugins/raa_webrick/plugin.yaml +0 -7
  228. data/lib/freebase2/plugins/raa_webrick/web_root/test.html +0 -5
  229. data/lib/freebase2/plugins/raa_webrick/webserver.yaml +0 -6
  230. data/lib/freebase2/plugins/raa_xmlrpc4r/plugin.xml +0 -8
  231. data/lib/freebase2/plugins/raa_xmlrpc4r/rpcd.rb +0 -54
  232. data/lib/freebase2/regress/README +0 -1
  233. data/lib/little_plugger/History.txt +0 -20
  234. data/lib/little_plugger/Rakefile +0 -34
  235. data/lib/little_plugger/lib/little-plugger.rb +0 -323
  236. data/lib/little_plugger/spec/little-plugger_spec.rb +0 -26
  237. data/lib/little_plugger/spec/spec_helper.rb +0 -16
  238. data/lib/logging/History.txt +0 -240
  239. data/lib/logging/Rakefile +0 -37
  240. data/lib/logging/data/bad_logging_1.rb +0 -13
  241. data/lib/logging/data/bad_logging_2.rb +0 -21
  242. data/lib/logging/data/logging.rb +0 -42
  243. data/lib/logging/data/logging.yaml +0 -63
  244. data/lib/logging/data/simple_logging.rb +0 -13
  245. data/lib/logging/examples/appenders.rb +0 -47
  246. data/lib/logging/examples/classes.rb +0 -41
  247. data/lib/logging/examples/consolidation.rb +0 -83
  248. data/lib/logging/examples/formatting.rb +0 -51
  249. data/lib/logging/examples/hierarchies.rb +0 -73
  250. data/lib/logging/examples/layouts.rb +0 -48
  251. data/lib/logging/examples/loggers.rb +0 -29
  252. data/lib/logging/examples/names.rb +0 -43
  253. data/lib/logging/examples/simple.rb +0 -17
  254. data/lib/logging/lib/logging.rb +0 -501
  255. data/lib/logging/lib/logging/appender.rb +0 -251
  256. data/lib/logging/lib/logging/appenders.rb +0 -131
  257. data/lib/logging/lib/logging/appenders/buffering.rb +0 -168
  258. data/lib/logging/lib/logging/appenders/console.rb +0 -60
  259. data/lib/logging/lib/logging/appenders/email.rb +0 -75
  260. data/lib/logging/lib/logging/appenders/file.rb +0 -58
  261. data/lib/logging/lib/logging/appenders/growl.rb +0 -197
  262. data/lib/logging/lib/logging/appenders/io.rb +0 -69
  263. data/lib/logging/lib/logging/appenders/rolling_file.rb +0 -293
  264. data/lib/logging/lib/logging/appenders/string_io.rb +0 -68
  265. data/lib/logging/lib/logging/appenders/syslog.rb +0 -194
  266. data/lib/logging/lib/logging/config/configurator.rb +0 -188
  267. data/lib/logging/lib/logging/config/yaml_configurator.rb +0 -191
  268. data/lib/logging/lib/logging/layout.rb +0 -117
  269. data/lib/logging/lib/logging/layouts.rb +0 -47
  270. data/lib/logging/lib/logging/layouts/basic.rb +0 -32
  271. data/lib/logging/lib/logging/layouts/parseable.rb +0 -211
  272. data/lib/logging/lib/logging/layouts/pattern.rb +0 -311
  273. data/lib/logging/lib/logging/log_event.rb +0 -45
  274. data/lib/logging/lib/logging/logger.rb +0 -503
  275. data/lib/logging/lib/logging/repository.rb +0 -232
  276. data/lib/logging/lib/logging/root_logger.rb +0 -61
  277. data/lib/logging/lib/logging/stats.rb +0 -278
  278. data/lib/logging/lib/logging/utils.rb +0 -153
  279. data/lib/logging/lib/spec/logging_helper.rb +0 -34
  280. data/lib/logging/test/appenders/test_buffered_io.rb +0 -176
  281. data/lib/logging/test/appenders/test_console.rb +0 -66
  282. data/lib/logging/test/appenders/test_email.rb +0 -170
  283. data/lib/logging/test/appenders/test_file.rb +0 -95
  284. data/lib/logging/test/appenders/test_growl.rb +0 -127
  285. data/lib/logging/test/appenders/test_io.rb +0 -129
  286. data/lib/logging/test/appenders/test_rolling_file.rb +0 -200
  287. data/lib/logging/test/appenders/test_syslog.rb +0 -194
  288. data/lib/logging/test/benchmark.rb +0 -86
  289. data/lib/logging/test/config/test_configurator.rb +0 -70
  290. data/lib/logging/test/config/test_yaml_configurator.rb +0 -40
  291. data/lib/logging/test/layouts/test_basic.rb +0 -42
  292. data/lib/logging/test/layouts/test_json.rb +0 -112
  293. data/lib/logging/test/layouts/test_pattern.rb +0 -198
  294. data/lib/logging/test/layouts/test_yaml.rb +0 -121
  295. data/lib/logging/test/setup.rb +0 -44
  296. data/lib/logging/test/test_appender.rb +0 -152
  297. data/lib/logging/test/test_consolidate.rb +0 -46
  298. data/lib/logging/test/test_layout.rb +0 -110
  299. data/lib/logging/test/test_log_event.rb +0 -80
  300. data/lib/logging/test/test_logger.rb +0 -699
  301. data/lib/logging/test/test_logging.rb +0 -267
  302. data/lib/logging/test/test_repository.rb +0 -158
  303. data/lib/logging/test/test_root_logger.rb +0 -81
  304. data/lib/logging/test/test_stats.rb +0 -274
  305. data/lib/logging/test/test_utils.rb +0 -116
  306. data/plugins/application/plugin.yaml +0 -11
  307. data/plugins/application_swt/plugin.yaml +0 -11
  308. data/plugins/auto_indenter/plugin.yaml +0 -12
  309. data/plugins/core/plugin.yaml +0 -7
  310. data/plugins/edit_view/plugin.yaml +0 -14
  311. data/plugins/edit_view_swt/plugin.yaml +0 -14
  312. data/plugins/project/plugin.yaml +0 -12
  313. data/plugins/redcar/plugin.yaml +0 -18
  314. data/plugins/repl/plugin.yaml +0 -12
  315. data/plugins/tree/plugin.yaml +0 -14
  316. data/plugins/tree_view_swt/plugin.yaml +0 -14
@@ -0,0 +1,3 @@
1
+
2
+ require File.join(File.dirname(__FILE__), "..", "lib", "plugin_manager")
3
+
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.1dev'
9
+ VERSION = '0.3.2dev'
8
10
  VERSION_MAJOR = 0
9
11
  VERSION_MINOR = 3
10
- VERSION_RELEASE = 1
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
- require 'redcar/installer'
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 FreeBASE plugin handler.
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
- ROOT
42
+ File.expand_path(File.join(File.dirname(__FILE__), "..", ".."))
74
43
  end
75
44
 
76
- def self.start
77
- @freebase_core = FreeBASE::Core.new(*freebase_core_args)
78
- @freebase_core.startup
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
- @freebase_core = FreeBASE::Core.new(*freebase_core_args)
83
- @freebase_core.load_plugins
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.require_files
87
- @freebase_core = FreeBASE::Core.new(*freebase_core_args)
88
- @freebase_core.require_files
73
+
74
+ def self.pump
75
+ Redcar.gui.start
89
76
  end
90
77
 
91
- def self.pump
92
- @freebase_core.bus["/system/ui/messagepump"].call()
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
- private
96
-
97
- def self.freebase_core_args
98
- ["properties.yaml", "config/default.yaml"]
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
- usage = Redcar::Usage.new
103
- usage.version_string
104
- usage.version_requested
105
- usage.help_requested
108
+ end
@@ -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 = Dir[File.dirname(__FILE__) + "/../jruby-complete-1.4.0.jar"].first
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
- Sensitivity.new(:open_tab, Redcar.app, false, [:focussed_window, :tab_focussed]) do |tab|
46
- if win = Redcar.app.focussed_window
47
- win.focussed_notebook.focussed_tab
48
- end
49
- end
50
- Sensitivity.new(:single_notebook, Redcar.app, true, [:focussed_window, :notebook_change]) do
51
- if win = Redcar.app.focussed_window
52
- win.notebooks.length == 1
53
- end
54
- end
55
- Sensitivity.new(:multiple_notebooks, Redcar.app, false, [:focussed_window, :notebook_change]) do
56
- if win = Redcar.app.focussed_window
57
- win.notebooks.length > 1
58
- end
59
- end
60
- Sensitivity.new(:other_notebook_has_tab, Redcar.app, false,
61
- [:focussed_window, :focussed_notebook, :notebook_change, :tab_closed]) do
62
- if win = Redcar.app.focussed_window and notebook = win.nonfocussed_notebook
63
- notebook.tabs.any?
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
- end
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?(Core.platform)
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
- @window_handlers[window] << h1 << h2 << h3 << h4 << h5 << h6 << h7 << h8
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
+