redcar 0.3.0dev → 0.3.1dev
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +29 -3
- data/README.md +33 -0
- data/ROADMAP.md +23 -25
- data/Rakefile +58 -85
- data/bin/redcar +8 -2
- data/lib/freebase2/lib/freebase/readers.rb +8 -1
- data/lib/redcar.rb +22 -7
- data/lib/redcar/boot.rb +2 -5
- data/lib/redcar/{install.rb → installer.rb} +24 -22
- data/lib/redcar/ruby_extensions.rb +4 -0
- data/plugins/application/features/step_definitions/menu_steps.rb +12 -0
- data/plugins/application/features/step_definitions/tree_steps.rb +14 -2
- data/plugins/application/features/support/env.rb +4 -0
- data/plugins/application/lib/application.rb +48 -4
- data/plugins/application/lib/application/command.rb +4 -0
- data/plugins/application/lib/application/command/executor.rb +4 -1
- data/plugins/application/lib/application/dialogs/filter_list_dialog.rb +45 -0
- data/plugins/application/lib/application/menu.rb +17 -2
- data/plugins/application/lib/application/menu/builder.rb +18 -15
- data/plugins/application/lib/application/notebook.rb +28 -1
- data/plugins/application/lib/application/sensitivity.rb +10 -6
- data/plugins/application/lib/application/tab.rb +0 -1
- data/plugins/application/lib/application/treebook.rb +5 -0
- data/plugins/application/lib/application/window.rb +21 -1
- data/plugins/application/spec/application/menu/builder_spec.rb +0 -12
- data/plugins/application/spec/application/menu_spec.rb +14 -0
- data/plugins/application/spec/spec_helper.rb +2 -1
- data/plugins/application_swt/lib/application_swt.rb +9 -2
- data/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb +128 -0
- data/plugins/application_swt/lib/application_swt/dialogs/no_buttons_dialog.rb +24 -0
- data/plugins/application_swt/lib/application_swt/menu.rb +3 -1
- data/plugins/application_swt/lib/application_swt/notebook.rb +20 -31
- data/plugins/application_swt/lib/application_swt/swt/listener_helpers.rb +20 -0
- data/plugins/application_swt/lib/application_swt/swt_wrapper.rb +11 -0
- data/plugins/application_swt/lib/application_swt/tab.rb +2 -1
- data/plugins/application_swt/lib/application_swt/window.rb +4 -6
- data/plugins/application_swt/spec/spec_helper.rb +4 -1
- data/plugins/core/lib/core.rb +21 -0
- data/plugins/core/lib/core/gui.rb +6 -1
- data/plugins/core/lib/core/observable.rb +7 -3
- data/plugins/core/lib/core/plugin/storage.rb +48 -0
- data/plugins/core/spec/core/storage_spec.rb +30 -0
- data/plugins/edit_view/features/step_definitions/editing_steps.rb +7 -0
- data/plugins/edit_view/features/step_definitions/notebook_steps.rb +4 -0
- data/plugins/edit_view/features/step_definitions/tab_steps.rb +24 -6
- data/plugins/edit_view/features/support/env.rb +4 -0
- data/plugins/edit_view/features/switch_tabs.feature +55 -0
- data/plugins/edit_view/features/undo_and_redo.feature +52 -0
- data/plugins/edit_view/lib/edit_view.rb +22 -12
- data/plugins/edit_view/lib/edit_view/command.rb +6 -0
- data/plugins/edit_view/lib/edit_view/document.rb +69 -8
- data/plugins/edit_view/lib/edit_view/edit_tab.rb +2 -1
- data/plugins/edit_view/spec/spec_helper.rb +2 -1
- data/plugins/edit_view_swt/lib/edit_view_swt.rb +36 -7
- data/plugins/edit_view_swt/lib/edit_view_swt/document.rb +42 -7
- data/plugins/project/features/open_and_save_files.feature +9 -0
- data/plugins/project/features/refresh_directory_tree.feature +37 -0
- data/plugins/project/features/step_definitions/directory_steps.rb +5 -1
- data/plugins/project/features/step_definitions/file_steps.rb +17 -0
- data/plugins/project/lib/project.rb +91 -20
- data/plugins/project/lib/project/dir_mirror.rb +10 -1
- data/plugins/project/lib/project/file_mirror.rb +2 -0
- data/plugins/project/lib/project/find_file_dialog.rb +86 -0
- data/plugins/project/lib/project/project_command.rb +5 -0
- data/plugins/project/spec/spec_helper.rb +2 -1
- data/plugins/redcar/plugin.yaml +0 -2
- data/plugins/redcar/redcar.rb +181 -14
- data/plugins/repl/lib/repl.rb +16 -8
- data/plugins/repl/lib/repl/internal_mirror.rb +3 -1
- data/plugins/repl/plugin.yaml +2 -2
- data/plugins/repl/spec/spec_helper.rb +2 -1
- data/plugins/tree/lib/tree.rb +5 -0
- data/plugins/tree/spec/spec_helper.rb +2 -1
- data/plugins/tree_view_swt/lib/tree_view_swt.rb +16 -0
- data/textmate/Bundles/Cucumber.tmbundle/Syntaxes/Cucumber_Plain_Text_Feature.tmLanguage +186 -0
- data/textmate/Bundles/Cucumber.tmbundle/Syntaxes/Cucumber_Steps.tmLanguage +249 -0
- data/textmate/Bundles/Cucumber.tmbundle/Syntaxes/plaintext_template.erb +187 -0
- data/textmate/Bundles/Java.tmbundle/Syntaxes/Java.plist +1153 -0
- data/textmate/Bundles/Java.tmbundle/Syntaxes/JavaProperties.plist +70 -0
- data/textmate/Bundles/Java.tmbundle/Syntaxes/Java_Server_Pages___JSP__.tmLanguage +256 -0
- data/textmate/Bundles/Perl.tmbundle/Syntaxes/Perl.plist +3209 -0
- data/textmate/Bundles/RedcarRepl.tmbundle/Syntaxes/InternalRuby.plist +2 -0
- data/textmate/Bundles/Ruby on Rails.tmbundle/Syntaxes/HTML___Rails__.plist +92 -0
- data/textmate/Bundles/Ruby on Rails.tmbundle/Syntaxes/JavaScript___Rails__.tmLanguage +82 -0
- data/textmate/Bundles/Ruby on Rails.tmbundle/Syntaxes/RJS.tmLanguage +25 -0
- data/textmate/Bundles/Ruby on Rails.tmbundle/Syntaxes/Ruby_on_Rails.plist +288 -0
- data/textmate/Bundles/Ruby on Rails.tmbundle/Syntaxes/SQL___Rails__.plist +51 -0
- metadata +342 -651
- data/ext/extconf.rb +0 -18
- data/textmate/Bundles/C.tmbundle/Snippets/010_main_______main__.plist +0 -20
- data/textmate/Bundles/C.tmbundle/Snippets/030_for_int_loop___fori__.plist +0 -19
- data/textmate/Bundles/C.tmbundle/Snippets/Include_header_once_only_guard.plist +0 -28
- data/textmate/Bundles/C.tmbundle/Snippets/Typedef.tmSnippet +0 -16
- data/textmate/Bundles/C.tmbundle/Snippets/__1_begin_________1_end_______beginend__.plist +0 -16
- data/textmate/Bundles/C.tmbundle/Snippets/__endif.plist +0 -17
- data/textmate/Bundles/C.tmbundle/Snippets/__ifndef__________define__________endif.tmSnippet +0 -18
- data/textmate/Bundles/C.tmbundle/Snippets/__include________inc__.plist +0 -16
- data/textmate/Bundles/C.tmbundle/Snippets/__pragma_mark___mark__.plist +0 -21
- data/textmate/Bundles/C.tmbundle/Snippets/class______class__.plist +0 -24
- data/textmate/Bundles/C.tmbundle/Snippets/do___while_loop___do__.plist +0 -18
- data/textmate/Bundles/C.tmbundle/Snippets/fprintf_______.tmSnippet +0 -16
- data/textmate/Bundles/C.tmbundle/Snippets/if______if__.plist +0 -19
- data/textmate/Bundles/C.tmbundle/Snippets/namespace______namespace__.plist +0 -20
- data/textmate/Bundles/C.tmbundle/Snippets/next___include________Inc__.plist +0 -16
- data/textmate/Bundles/C.tmbundle/Snippets/printf______printf__.plist +0 -16
- data/textmate/Bundles/C.tmbundle/Snippets/read_file___readF__.plist +0 -23
- data/textmate/Bundles/C.tmbundle/Snippets/std____map___map__.plist +0 -16
- data/textmate/Bundles/C.tmbundle/Snippets/std____vector___v__.plist +0 -16
- data/textmate/Bundles/C.tmbundle/Snippets/struct.plist +0 -19
- data/textmate/Bundles/C.tmbundle/Snippets/template___typename________template__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/Fixed_Position_Bottom_100___wide_IE6.tmSnippet +0 -18
- data/textmate/Bundles/CSS.tmbundle/Snippets/__important_CSS_______.plist +0 -18
- data/textmate/Bundles/CSS.tmbundle/Snippets/background____color_image_repeat_attachment_position___background__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/background__attachment___scroll__fixed___background__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/background__color____color__hex___background__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/background__color____color__name___background__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/background__color____color__rgb___background__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/background__color____transparent___background__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/background__image____none___background__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/background__image____url___background__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/background__position____position___background__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/background__repeat____r__r__x__r__y__n__r___background__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border_____size_style_color___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__bottom___size_style_color___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__bottom__color___size_style_color___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__bottom__style___size_style_color___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__bottom__width___size_style_color___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__color___color___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__left___size_style_color___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__left__color___color___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__left__style___style___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__left__width___size___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__right___size_style_color___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__right__color___color___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__right__style___style___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__right__width___size___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__style___style___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__top___size_style_color___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__top__color___color___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__top__style___style___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__top__width___size___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/border__width___width___border__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/clear___value___clear__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/color____color__hex___color__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/color____color__name___color__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/color____color__rgb___color__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/cursor___type___cursor__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/cursor___url___cursor__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/direction___ltr__rtl___direction__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/display___block___display__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/display___common__types___display__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/display___inline___display__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/display___table__types___display__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/filter___AlphaImageLoader___for_IE_PNGs_____background__.plist +0 -19
- data/textmate/Bundles/CSS.tmbundle/Snippets/float___left__right__none___float__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/font_____style_variant_weight_size__line__height_font___family___font__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/font___size_font___font__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/font__family_____family___font__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/font__size___size___font__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/font__style_____normal__italic__oblique___font__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/font__variant_____normal__small__caps___font__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/font__weight___weight___font__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/letter__spacing_____length__em___letter__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/letter__spacing_____length__px___letter__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/list__style___type_position_image___list__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/list__style__image___url___list__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/list__style__position___pos___list__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/list__style__type___asian___list__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/list__style__type___marker__list__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/list__style__type___numeric___list__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/list__style__type___other___list__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/list__style__type___roman__alpha__greek___list__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/margin___T_R_B_L___margin__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/margin___V_H___margin__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/margin_____all___margin__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/margin__bottom___length___margin__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/margin__left___length___margin__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/margin__right___length___margin__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/margin__top___length___margin__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/marker__offset___auto___marker__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/marker__offset___length___marker__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/opacity_____for_Safari___FF_and_IE_____opacity__.plist +0 -18
- data/textmate/Bundles/CSS.tmbundle/Snippets/overflow___type___overflow__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/padding_____T_R_B_L___padding__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/padding_____V_H___padding__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/padding_____all___padding__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/padding__bottom___length___margin__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/padding__left___length___margin__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/padding__right___length___margin__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/padding__top___length___margin__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/position___type___position__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/properties_______________.plist +0 -19
- data/textmate/Bundles/CSS.tmbundle/Snippets/scrollbar.tmSnippet +0 -23
- data/textmate/Bundles/CSS.tmbundle/Snippets/selection.tmSnippet +0 -20
- data/textmate/Bundles/CSS.tmbundle/Snippets/text__align___left__center__right___txt__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/text__decoration___none__underline__overline__line__through__blink___text__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/text__indent___length___text__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/text__shadow___color__hex_x_y_blur___text__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/text__shadow___color__rgb_x_y_blur___text__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/text__shadow___none___text__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/text__transform___capitalize__upper__lower___text__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/text__transform___none___text__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/vertical__align___type___vertical__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/visibility___type___visibility__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/white__space____normal__pre__nowrap___white__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/word__spacing____length___word__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/word__spacing____normal___word__.plist +0 -16
- data/textmate/Bundles/CSS.tmbundle/Snippets/z__index___index___z__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Arrow___arrow__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Backspace___backspace__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Backtab___backtab__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Command___command__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Control___control__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Delete___delete__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/DocType_HTML_4_0_Strict.plist +0 -18
- data/textmate/Bundles/HTML.tmbundle/Snippets/DocType_XHTL_1_0_Frameset.plist +0 -18
- data/textmate/Bundles/HTML.tmbundle/Snippets/DocType_XHTML_1_0_Strict.plist +0 -18
- data/textmate/Bundles/HTML.tmbundle/Snippets/DocType_XHTML_1_0_Transitional.plist +0 -18
- data/textmate/Bundles/HTML.tmbundle/Snippets/DocType_XHTML_1_1.plist +0 -18
- data/textmate/Bundles/HTML.tmbundle/Snippets/Down___down__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Embed_QT_movie___movie__.plist +0 -26
- data/textmate/Bundles/HTML.tmbundle/Snippets/Emphasize.tmSnippet +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Enter___enter__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Escape___escape__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Fieldset.tmSnippet +0 -22
- data/textmate/Bundles/HTML.tmbundle/Snippets/HTML________4_0_Transitional___doctype__.plist +0 -18
- data/textmate/Bundles/HTML.tmbundle/Snippets/IE_Conditional_Comment___Internet_Explorer.tmSnippet +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/IE_Conditional_Comment___Internet_Explorer_5_0_only.tmSnippet +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/IE_Conditional_Comment___Internet_Explorer_5_5_only.tmSnippet +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/IE_Conditional_Comment___Internet_Explorer_5_x.tmSnippet +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/IE_Conditional_Comment___Internet_Explorer_6_and_below.tmSnippet +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/IE_Conditional_Comment___Internet_Explorer_6_only.tmSnippet +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/IE_Conditional_Comment___Internet_Explorer_7__.tmSnippet +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/IE_Conditional_Comment___NOT_Internet_Explorer.tmSnippet +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Input_with_Label.tmSnippet +0 -19
- data/textmate/Bundles/HTML.tmbundle/Snippets/Left___left__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Option.tmSnippet +0 -18
- data/textmate/Bundles/HTML.tmbundle/Snippets/Option___option__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Return___return__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Right___right__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Select_Box.tmSnippet +0 -22
- data/textmate/Bundles/HTML.tmbundle/Snippets/Shift___shift__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Smart_return__indent_for_tag_pairs.plist +0 -18
- data/textmate/Bundles/HTML.tmbundle/Snippets/Strong.tmSnippet +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Tab___tab__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Up___up__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Wrap_Selection_In_Tag.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/Wrap_in___________________.plist +0 -14
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML_____input__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML_____textarea__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___a_mailto_____.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___base__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___body__.plist +0 -18
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___br_____.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___div__.plist +0 -18
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___form__.plist +0 -20
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___h1__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___head__.plist +0 -20
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___link__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___meta__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___nbsp___NonBreakingSpace.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___script__.plist +0 -18
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___script_src_____.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___style__.plist +0 -18
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___table__.plist +0 -19
- data/textmate/Bundles/HTML.tmbundle/Snippets/XHTML___title__.plist +0 -16
- data/textmate/Bundles/HTML.tmbundle/Templates/HTML /342/200/223 4.0 Strict/index.html" +0 -15
- data/textmate/Bundles/HTML.tmbundle/Templates/HTML /342/200/223 4.0 Strict/info.plist" +0 -20
- data/textmate/Bundles/HTML.tmbundle/Templates/HTML /342/200/224 4.0 Transitional/index.html" +0 -15
- data/textmate/Bundles/HTML.tmbundle/Templates/HTML /342/200/224 4.0 Transitional/info.plist" +0 -20
- data/textmate/Bundles/HTML.tmbundle/Templates/XHTML /342/200/223 1.0 Frameset/index.html" +0 -16
- data/textmate/Bundles/HTML.tmbundle/Templates/XHTML /342/200/223 1.0 Frameset/info.plist" +0 -16
- data/textmate/Bundles/HTML.tmbundle/Templates/XHTML /342/200/223 1.0 Strict/index.html" +0 -16
- data/textmate/Bundles/HTML.tmbundle/Templates/XHTML /342/200/223 1.0 Strict/info.plist" +0 -16
- data/textmate/Bundles/HTML.tmbundle/Templates/XHTML /342/200/223 1.0 Transitional/index.html" +0 -16
- data/textmate/Bundles/HTML.tmbundle/Templates/XHTML /342/200/223 1.0 Transitional/info.plist" +0 -16
- data/textmate/Bundles/HTML.tmbundle/Templates/XHTML /342/200/223 1.1/index.html" +0 -15
- data/textmate/Bundles/HTML.tmbundle/Templates/XHTML /342/200/223 1.1/info.plist" +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/060_ruby_if_else.plist +0 -20
- data/textmate/Bundles/Ruby.tmbundle/Snippets/070_ruby_if.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/080_ruby_case.plist +0 -19
- data/textmate/Bundles/Ruby.tmbundle/Snippets/Add_____________Marker.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/Array_new__10________i____________Arr__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/Benchmark_bmbm_______do____end.tmSnippet +0 -19
- data/textmate/Bundles/Ruby.tmbundle/Snippets/Dir__________.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/Dir_glob___________do___file______end____Dir__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/File_foreach____________do___line______end____File__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/File_open________________file________.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/File_read__________.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/Hash_new______hash___key___hash__key_______________Has__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/Insert_ERb__s______________or_______________.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/Marshal_dump__obj___file______Md__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/Marshal_load__obj______Ml__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/PStore_new________.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/RDoc_documentation_block.tmSnippet +0 -20
- data/textmate/Bundles/Ruby.tmbundle/Snippets/Wrap_in_Begin________Rescue________End.plist +0 -23
- data/textmate/Bundles/Ruby.tmbundle/Snippets/YAML_dump_______file______Yd____.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/YAML_load__file______Yl____.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/__END__.tmSnippet +0 -17
- data/textmate/Bundles/Ruby.tmbundle/Snippets/______usr__local__bin__ruby___w.plist +0 -17
- data/textmate/Bundles/Ruby.tmbundle/Snippets/__yields___RDoc_comment.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/alias_method_______am__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/all________e____________all__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/any________e____________any__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/application_code_______app__.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert__________as__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_equal.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_in_delta__________asid__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_instance_of__________asio__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_kind_of__________asko__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_match__________asm__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_nil__________asn__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_no_match__________asnm__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_not_equal__________asne__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_not_nil__________asnn__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_not_same__________asns__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_nothing_raised___________________asnr__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_nothing_thrown_____________asnt__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_operator__________aso__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_raise___________________asr__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_respond_to__________asrt__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_same__________ass__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_send__________ass__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/assert_throws___________________ast__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/attr_accessor_______rw__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/attr_reader_______r__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/attr_writer_______w__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/class_______DelegateClass____initialize____end____class__.plist +0 -24
- data/textmate/Bundles/Ruby.tmbundle/Snippets/class_______ParentClass____initialize____end.plist +0 -22
- data/textmate/Bundles/Ruby.tmbundle/Snippets/class_______Struct____initialize____end.plist +0 -22
- data/textmate/Bundles/Ruby.tmbundle/Snippets/class_______Test____Unit____TestCase____end____tc__.plist +0 -24
- data/textmate/Bundles/Ruby.tmbundle/Snippets/class______self____end.tmSnippet +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/class____end____cla__.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/class____initialize____end.plist +0 -22
- data/textmate/Bundles/Ruby.tmbundle/Snippets/class____instance_methods____undef____initialize____end____class__.plist +0 -30
- data/textmate/Bundles/Ruby.tmbundle/Snippets/class_from_name________clafn__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/classify______e____________clas__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/collect______e____________col__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/deep_copy__________dee__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/def_delegator______defd__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/def_delegators______defds__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/def_end.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/def_method_missing____end____mm__.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/def_self____end____defs__.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/def_test_____end____t__.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/delete_if______e____________deli__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/detect______e____________det__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/directory____.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/do___obj______end___doo__.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/downto__0________n____________dow__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/each______e____________ea__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/each_byte______byte____________eab__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/each_char______chr____________eac____.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/each_cons____________group____________eac____.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/each_index______i____________eai__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/each_key______key____________eak__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/each_line______line____________eal__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/each_pair______name___val____________eap__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/each_slice______group____________eas__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/each_value______val____________eav__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/each_with_index______e___i____________eawi__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/elsif____.tmSnippet +0 -17
- data/textmate/Bundles/Ruby.tmbundle/Snippets/embed_string_variable.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/extend_Forwardable____Forw__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/fetch__name________key____________fet__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/fill__range________i____________fil__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/find______e____________fin__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/find_all______e____________fina__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/flatten_once____fla__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/flunk__________fl__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/grep____pattern__________match____________gre__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/gsub________________match____________gsu__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/hash_pair_______.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/hash_pointer.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/include_Comparable_______Comp__.plist +0 -20
- data/textmate/Bundles/Ruby.tmbundle/Snippets/include_Enumerable_______Enum__.plist +0 -20
- data/textmate/Bundles/Ruby.tmbundle/Snippets/inject__init________mem___var____________inj__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/lambda______args____________lam__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/loop_________.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/map______e____________map__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/map_with_index______e___i____________mapwi__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/max______a___b____________max__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/min______a___b____________min__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/module____ClassMethods____end.plist +0 -29
- data/textmate/Bundles/Ruby.tmbundle/Snippets/module____end.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/module____module_function____end.plist +0 -20
- data/textmate/Bundles/Ruby.tmbundle/Snippets/namespace______do____end.tmSnippet +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/open____path__or__url_______w_____do___doc______end___ope__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/open_yield_block_______.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/option_parse_____________optp__.plist +0 -43
- data/textmate/Bundles/Ruby.tmbundle/Snippets/partition______e____________par__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/path_from_here________.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/randomize____ran__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/reject______e____________rej__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/require___________req__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/require___tc____________ts__.plist +0 -20
- data/textmate/Bundles/Ruby.tmbundle/Snippets/require_gem_______.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/results_report_______________.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/reverse_each______e____________rea__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/scan________________match____________sca__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/select______e____________sel__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/singleton_class____.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/sort______a___b____________sor__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/sort_by______e____________sorb__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/step__2________e____________ste__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/sub________________match____________sub__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/task___task_name__________dependent_____tasks___do____end.tmSnippet +0 -19
- data/textmate/Bundles/Ruby.tmbundle/Snippets/times______n____________tim__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/transaction_________do____end.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/unix_filter______uni__.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/unless___unless__.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/until_____end.tmSnippet +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/untitled.plist +0 -19
- data/textmate/Bundles/Ruby.tmbundle/Snippets/upto__1_0__0_0________n____________upt__.plist +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/usage_if________usai__.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/usage_unless________usau__.plist +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/when.plist +0 -17
- data/textmate/Bundles/Ruby.tmbundle/Snippets/while_____end.tmSnippet +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/xmlread______.tmSnippet +0 -16
- data/textmate/Bundles/Ruby.tmbundle/Snippets/xpath_______________.tmSnippet +0 -18
- data/textmate/Bundles/Ruby.tmbundle/Snippets/zip__enums________row____________zip__.plist +0 -16
- data/textmate/Bundles/Source.tmbundle/Snippets/Continue_line_comment.plist +0 -35
- data/textmate/Bundles/Source.tmbundle/Snippets/Escaped_Quote_Pair_____________.plist +0 -14
- data/textmate/Bundles/Source.tmbundle/Snippets/Escaped_Single_Quote_Pair_____________.plist +0 -14
- data/textmate/Bundles/Source.tmbundle/Snippets/Frame_text.plist +0 -16
- data/textmate/Bundles/Source.tmbundle/Snippets/__n.plist +0 -16
- data/textmate/Bundles/Text.tmbundle/Snippets/010_Copyright.plist +0 -14
- data/textmate/Bundles/Text.tmbundle/Snippets/Conitnue_bullet.plist +0 -17
- data/textmate/Bundles/Text.tmbundle/Snippets/Conitnue_light_bullet.plist +0 -17
- data/textmate/Bundles/Text.tmbundle/Snippets/Conitnue_star_bullet.plist +0 -17
- data/textmate/Bundles/Text.tmbundle/Snippets/Insert_ISO_date.plist +0 -14
- data/textmate/Bundles/Text.tmbundle/Snippets/Lorem_ipsum.plist +0 -14
- data/textmate/Bundles/Text.tmbundle/Templates/Empty file/info.plist +0 -14
- data/textmate/Bundles/Text.tmbundle/Templates/From Clipboard/info.plist +0 -17
@@ -1,23 +1,63 @@
|
|
1
1
|
|
2
|
+
require "project/project_command"
|
2
3
|
require "project/file_mirror"
|
4
|
+
require "project/find_file_dialog"
|
3
5
|
require "project/dir_mirror"
|
4
6
|
require "project/dir_controller"
|
5
7
|
|
6
8
|
module Redcar
|
7
9
|
class Project
|
8
|
-
def self.
|
10
|
+
def self.load
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.start
|
14
|
+
@open_project_sensitivity =
|
15
|
+
Sensitivity.new(:open_project, Redcar.app, false, [:focussed_window]) do
|
16
|
+
if win = Redcar.app.focussed_window
|
17
|
+
win.treebook.trees.detect {|t| t.tree_mirror.is_a?(DirMirror) }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
class << self
|
23
|
+
attr_reader :open_project_sensitivity
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.window_trees
|
9
27
|
@window_trees ||= {}
|
10
|
-
|
11
|
-
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.open_tree(win, tree)
|
31
|
+
if window_trees[win]
|
32
|
+
old_tree = window_trees[win]
|
12
33
|
set_tree(win, tree)
|
13
34
|
win.treebook.remove_tree(old_tree)
|
14
35
|
else
|
15
36
|
set_tree(win, tree)
|
16
37
|
end
|
38
|
+
Project.open_project_sensitivity.recompute
|
17
39
|
end
|
18
40
|
|
19
41
|
def self.close_tree(win)
|
20
|
-
win.treebook.remove_tree(
|
42
|
+
win.treebook.remove_tree(window_trees[win])
|
43
|
+
Project.open_project_sensitivity.recompute
|
44
|
+
end
|
45
|
+
|
46
|
+
def self.refresh_tree(win)
|
47
|
+
if tree = window_trees[win]
|
48
|
+
tree.refresh
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.open_file_tab(path)
|
53
|
+
path = File.expand_path(path)
|
54
|
+
all_tabs = Redcar.app.windows.map {|win| win.notebooks}.flatten.map {|nb| nb.tabs }.flatten
|
55
|
+
all_tabs.find do |t|
|
56
|
+
t.is_a?(Redcar::EditTab) and
|
57
|
+
t.edit_view.document.mirror and
|
58
|
+
t.edit_view.document.mirror.is_a?(FileMirror) and
|
59
|
+
File.expand_path(t.edit_view.document.mirror.path) == path
|
60
|
+
end
|
21
61
|
end
|
22
62
|
|
23
63
|
private
|
@@ -37,14 +77,18 @@ module Redcar
|
|
37
77
|
end
|
38
78
|
|
39
79
|
def execute
|
40
|
-
tab = win.new_tab(Redcar::EditTab)
|
41
80
|
path = get_path
|
42
81
|
if path
|
43
|
-
|
44
|
-
|
45
|
-
|
82
|
+
if already_open_tab = Project.open_file_tab(path)
|
83
|
+
already_open_tab.focus
|
84
|
+
else
|
85
|
+
tab = win.new_tab(Redcar::EditTab)
|
86
|
+
mirror = FileMirror.new(path)
|
87
|
+
tab.edit_view.document.mirror = mirror
|
88
|
+
tab.edit_view.reset_undo
|
89
|
+
tab.focus
|
90
|
+
end
|
46
91
|
end
|
47
|
-
tab.focus
|
48
92
|
end
|
49
93
|
|
50
94
|
private
|
@@ -63,8 +107,11 @@ module Redcar
|
|
63
107
|
|
64
108
|
def execute
|
65
109
|
tab = win.focussed_notebook.focussed_tab
|
66
|
-
|
67
|
-
|
110
|
+
if tab.edit_view.document.mirror
|
111
|
+
tab.edit_view.document.save!
|
112
|
+
else
|
113
|
+
FileSaveAsCommand.new.run
|
114
|
+
end
|
68
115
|
end
|
69
116
|
end
|
70
117
|
|
@@ -72,7 +119,6 @@ module Redcar
|
|
72
119
|
key :osx => "Cmd+Shift+S",
|
73
120
|
:linux => "Ctrl+Shift+S",
|
74
121
|
:windows => "Ctrl+Shift+S"
|
75
|
-
|
76
122
|
|
77
123
|
def initialize(path = nil)
|
78
124
|
@path = path
|
@@ -81,12 +127,12 @@ module Redcar
|
|
81
127
|
def execute
|
82
128
|
tab = win.focussed_notebook.focussed_tab
|
83
129
|
path = get_path
|
84
|
-
puts "saving document as #{path}"
|
85
130
|
if path
|
86
131
|
contents = tab.edit_view.document.to_s
|
87
132
|
new_mirror = FileMirror.new(path)
|
88
133
|
new_mirror.commit(contents)
|
89
134
|
tab.edit_view.document.mirror = new_mirror
|
135
|
+
Project.refresh_tree(win)
|
90
136
|
end
|
91
137
|
end
|
92
138
|
|
@@ -103,28 +149,53 @@ module Redcar
|
|
103
149
|
key :osx => "Cmd+Shift+O",
|
104
150
|
:linux => "Ctrl+Shift+O",
|
105
151
|
:windows => "Ctrl+Shift+O"
|
106
|
-
|
152
|
+
|
153
|
+
def initialize(path=nil)
|
154
|
+
@path = path
|
155
|
+
end
|
156
|
+
|
107
157
|
def execute
|
108
|
-
|
109
|
-
|
110
|
-
|
158
|
+
if path = get_path
|
159
|
+
tree = Tree.new(Project::DirMirror.new(path),
|
160
|
+
Project::DirController.new)
|
161
|
+
Project.open_tree(win, tree)
|
162
|
+
end
|
111
163
|
end
|
112
164
|
|
113
165
|
private
|
114
166
|
|
115
167
|
def get_path
|
116
168
|
@path || begin
|
117
|
-
path = Application::Dialog.open_directory(win, :filter_path => File.expand_path("~"))
|
118
|
-
|
169
|
+
if path = Application::Dialog.open_directory(win, :filter_path => File.expand_path("~"))
|
170
|
+
File.expand_path(path)
|
171
|
+
end
|
119
172
|
end
|
120
173
|
end
|
121
174
|
end
|
122
175
|
|
123
|
-
class DirectoryCloseCommand <
|
176
|
+
class DirectoryCloseCommand < ProjectCommand
|
124
177
|
|
125
178
|
def execute
|
126
179
|
Project.close_tree(win)
|
127
180
|
end
|
128
181
|
end
|
182
|
+
|
183
|
+
class RefreshDirectoryCommand < ProjectCommand
|
184
|
+
|
185
|
+
def execute
|
186
|
+
Project.refresh_tree(win)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
class FindFileCommand < ProjectCommand
|
191
|
+
key :osx => "Cmd+T",
|
192
|
+
:linux => "Ctrl+T",
|
193
|
+
:windows => "Ctrl+T"
|
194
|
+
|
195
|
+
def execute
|
196
|
+
dialog = FindFileDialog.new
|
197
|
+
dialog.open
|
198
|
+
end
|
199
|
+
end
|
129
200
|
end
|
130
201
|
end
|
@@ -3,6 +3,7 @@ module Redcar
|
|
3
3
|
class Project
|
4
4
|
class DirMirror
|
5
5
|
include Redcar::Tree::Mirror
|
6
|
+
attr_reader :path
|
6
7
|
|
7
8
|
# @param [String] a path to a directory
|
8
9
|
def initialize(path)
|
@@ -32,7 +33,15 @@ module Redcar
|
|
32
33
|
|
33
34
|
class Node
|
34
35
|
def self.create_all_from_path(path)
|
35
|
-
Dir[path + "/*"].sort_by {|fn| fn.downcase }.map {|fn|
|
36
|
+
Dir[path + "/*"].sort_by {|fn| fn.downcase }.map {|fn| create_from_path(fn) }
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.create_from_path(path)
|
40
|
+
cache[path] ||= Node.new(path)
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.cache
|
44
|
+
@cache ||= {}
|
36
45
|
end
|
37
46
|
|
38
47
|
include Redcar::Tree::Mirror::NodeMirror
|
@@ -0,0 +1,86 @@
|
|
1
|
+
module Redcar
|
2
|
+
class Project
|
3
|
+
|
4
|
+
class FindFileDialog < FilterListDialog
|
5
|
+
MAX_ENTRIES = 20
|
6
|
+
|
7
|
+
def update_list(filter)
|
8
|
+
if filter.length < 2
|
9
|
+
[]
|
10
|
+
else
|
11
|
+
paths = find_files(filter, Redcar.app.focussed_window.treebook.trees.last.tree_mirror.path)
|
12
|
+
@last_list = paths
|
13
|
+
paths.map {|path| display_path(path) }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def selected(text, ix)
|
18
|
+
if @last_list
|
19
|
+
close
|
20
|
+
FileOpenCommand.new(@last_list[ix]).run
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def display_path(path)
|
27
|
+
path.split("/").last +
|
28
|
+
" (" +
|
29
|
+
path.split("/")[-3..-2].join("/") +
|
30
|
+
")"
|
31
|
+
end
|
32
|
+
|
33
|
+
def files(directories)
|
34
|
+
@files ||= begin
|
35
|
+
files = []
|
36
|
+
s = Time.now
|
37
|
+
directories.each do |dir|
|
38
|
+
files += Dir[File.expand_path(dir + "/**/*")]
|
39
|
+
end
|
40
|
+
took = Time.now - s
|
41
|
+
puts "find files #{directories.inspect} took #{took}s"
|
42
|
+
files
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def find_files(text, directories)
|
47
|
+
re = make_regex(text)
|
48
|
+
|
49
|
+
score_match_pairs = []
|
50
|
+
cutoff = 10000000
|
51
|
+
|
52
|
+
results = files(directories).each do |fn|
|
53
|
+
unless File.directory?(fn)
|
54
|
+
bit = fn.split("/")
|
55
|
+
if m = bit.last.match(re)
|
56
|
+
cs = []
|
57
|
+
diffs = 0
|
58
|
+
m.captures.each_with_index do |_, i|
|
59
|
+
cs << m.begin(i + 1)
|
60
|
+
if i > 0
|
61
|
+
diffs += cs[i] - cs[i-1]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
# lower score is better
|
65
|
+
score = (cs[0] + diffs)*100 + bit.last.length
|
66
|
+
if score < cutoff
|
67
|
+
score_match_pairs << [score, fn]
|
68
|
+
score_match_pairs.sort!
|
69
|
+
if score_match_pairs.length == MAX_ENTRIES
|
70
|
+
cutoff = score_match_pairs.last.first
|
71
|
+
score_match_pairs.pop
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
score_match_pairs.map {|a| a.last }
|
78
|
+
end
|
79
|
+
|
80
|
+
def make_regex(text)
|
81
|
+
re_src = "(" + text.split(//).map{|l| Regexp.escape(l) }.join(").*?(") + ")"
|
82
|
+
Regexp.new(re_src, :options => Regexp::IGNORECASE)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
data/plugins/redcar/plugin.yaml
CHANGED
data/plugins/redcar/redcar.rb
CHANGED
@@ -7,7 +7,6 @@ module Redcar
|
|
7
7
|
:windows => "Ctrl+N"
|
8
8
|
|
9
9
|
def execute
|
10
|
-
puts "new tab in #{win.inspect}"
|
11
10
|
tab = win.new_tab(Redcar::EditTab)
|
12
11
|
tab.title = "untitled"
|
13
12
|
tab.focus
|
@@ -16,6 +15,8 @@ module Redcar
|
|
16
15
|
end
|
17
16
|
|
18
17
|
class NewNotebookCommand < Command
|
18
|
+
sensitize :single_notebook
|
19
|
+
|
19
20
|
key :osx => "Cmd+Alt+N",
|
20
21
|
:linux => "Ctrl+Alt+N",
|
21
22
|
:windows => "Ctrl+Alt+N"
|
@@ -50,6 +51,7 @@ module Redcar
|
|
50
51
|
end
|
51
52
|
|
52
53
|
class RotateNotebooksCommand < Command
|
54
|
+
sensitize :multiple_notebooks
|
53
55
|
|
54
56
|
def execute
|
55
57
|
win.rotate_notebooks
|
@@ -57,6 +59,7 @@ module Redcar
|
|
57
59
|
end
|
58
60
|
|
59
61
|
class CloseNotebookCommand < Command
|
62
|
+
sensitize :multiple_notebooks
|
60
63
|
|
61
64
|
def execute
|
62
65
|
unless win.notebooks.length == 1
|
@@ -65,27 +68,40 @@ module Redcar
|
|
65
68
|
end
|
66
69
|
end
|
67
70
|
|
68
|
-
class
|
69
|
-
|
71
|
+
class SwitchNotebookCommand < Command
|
72
|
+
sensitize :multiple_notebooks, :other_notebook_has_tab
|
70
73
|
key :osx => "Cmd+Alt+O",
|
71
74
|
:linux => "Ctrl+Alt+O",
|
72
75
|
:windows => "Ctrl+Alt+O"
|
73
|
-
|
76
|
+
|
74
77
|
def execute
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
target_notebook.grab_tab_from(current_notebook, tab)
|
78
|
+
new_notebook = win.nonfocussed_notebook
|
79
|
+
if new_notebook.focussed_tab
|
80
|
+
new_notebook.focussed_tab.focus
|
79
81
|
end
|
80
82
|
end
|
81
83
|
end
|
84
|
+
|
85
|
+
class MoveTabToOtherNotebookCommand < Command
|
86
|
+
sensitize :multiple_notebooks, :open_tab
|
87
|
+
|
88
|
+
key :osx => "Cmd+Shift+Alt+O",
|
89
|
+
:linux => "Ctrl+Shift+Alt+O",
|
90
|
+
:windows => "Ctrl+Shift+Alt+O"
|
91
|
+
|
92
|
+
def execute
|
93
|
+
current_notebook = tab.notebook
|
94
|
+
target_notebook = win.notebooks.detect {|nb| nb != current_notebook}
|
95
|
+
target_notebook.grab_tab_from(current_notebook, tab)
|
96
|
+
tab.focus
|
97
|
+
end
|
98
|
+
end
|
82
99
|
|
83
100
|
class PrintContents < EditTabCommand
|
84
101
|
key "Cmd+P"
|
85
102
|
|
86
103
|
def execute
|
87
104
|
puts "printing contents"
|
88
|
-
tab = win.focussed_notebook.focussed_tab
|
89
105
|
p tab.edit_view.document.to_s
|
90
106
|
end
|
91
107
|
end
|
@@ -100,7 +116,6 @@ module Redcar
|
|
100
116
|
|
101
117
|
class PrintScopeTreeCommand < Command
|
102
118
|
def execute
|
103
|
-
tab = win.focussed_notebook.focussed_tab
|
104
119
|
puts tab.edit_view.controller.mate_text.parser.root.pretty(0)
|
105
120
|
end
|
106
121
|
end
|
@@ -124,6 +139,140 @@ module Redcar
|
|
124
139
|
end
|
125
140
|
end
|
126
141
|
|
142
|
+
class SwitchTabDownCommand < Command
|
143
|
+
key :osx => "Cmd+Shift+[",
|
144
|
+
:linux => "Ctrl+Shift+[",
|
145
|
+
:windows => "Ctrl+Shift+["
|
146
|
+
|
147
|
+
def execute
|
148
|
+
win.focussed_notebook.switch_down
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
class SwitchTabUpCommand < Command
|
153
|
+
key :osx => "Cmd+Shift+]",
|
154
|
+
:linux => "Ctrl+Shift+]",
|
155
|
+
:windows => "Ctrl+Shift+]"
|
156
|
+
|
157
|
+
def execute
|
158
|
+
win.focussed_notebook.switch_up
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
class UndoCommand < EditTabCommand
|
163
|
+
sensitize :undoable
|
164
|
+
|
165
|
+
key :osx => "Cmd+Z",
|
166
|
+
:linux => "Ctrl+Z",
|
167
|
+
:windows => "Ctrl+Z"
|
168
|
+
|
169
|
+
def execute
|
170
|
+
tab.edit_view.undo
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
class RedoCommand < EditTabCommand
|
175
|
+
sensitize :redoable
|
176
|
+
|
177
|
+
key :osx => "Cmd+Shift+Z",
|
178
|
+
:linux => "Ctrl+Shift+Z",
|
179
|
+
:windows => "Ctrl+Shift+Z"
|
180
|
+
|
181
|
+
def execute
|
182
|
+
tab.edit_view.redo
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
class MoveHomeCommand < EditTabCommand
|
187
|
+
key "Ctrl+A"
|
188
|
+
|
189
|
+
def execute
|
190
|
+
doc = tab.edit_view.document
|
191
|
+
line_ix = doc.line_at_offset(doc.cursor_offset)
|
192
|
+
doc.cursor_offset = doc.offset_at_line(line_ix)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
class MoveEndCommand < EditTabCommand
|
197
|
+
key "Ctrl+E"
|
198
|
+
|
199
|
+
def execute
|
200
|
+
doc = tab.edit_view.document
|
201
|
+
line_ix = doc.line_at_offset(doc.cursor_offset)
|
202
|
+
if line_ix == doc.line_count - 1
|
203
|
+
doc.cursor_offset = doc.length
|
204
|
+
else
|
205
|
+
doc.cursor_offset = doc.offset_at_line(line_ix + 1) - 1
|
206
|
+
end
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
class ChangeIndentCommand < EditTabCommand
|
211
|
+
def execute
|
212
|
+
doc = tab.edit_view.document
|
213
|
+
if doc.selection?
|
214
|
+
first_line_ix = doc.line_at_offset(doc.selection_range.begin)
|
215
|
+
last_line_ix = doc.line_at_offset(doc.selection_range.end)
|
216
|
+
if doc.selection_range.end == doc.offset_at_line(last_line_ix)
|
217
|
+
last_line_ix -= 1
|
218
|
+
end
|
219
|
+
first_line_ix.upto(last_line_ix) do |line_ix|
|
220
|
+
indent_line(doc, line_ix)
|
221
|
+
end
|
222
|
+
start_selection = doc.offset_at_line(first_line_ix)
|
223
|
+
if last_line_ix == doc.line_count - 1
|
224
|
+
end_selection = doc.length
|
225
|
+
else
|
226
|
+
end_selection = doc.offset_at_line(last_line_ix + 1)
|
227
|
+
end
|
228
|
+
doc.set_selection_range(start_selection, end_selection)
|
229
|
+
else
|
230
|
+
indent_line(doc, doc.cursor_line)
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
class DecreaseIndentCommand < ChangeIndentCommand
|
236
|
+
key :osx => "Cmd+[",
|
237
|
+
:linux => "Ctrl+[",
|
238
|
+
:windows => "Ctrl+["
|
239
|
+
|
240
|
+
def indent_line(doc, line_ix)
|
241
|
+
use_spaces = true
|
242
|
+
num_spaces = 2
|
243
|
+
line = doc.get_line(line_ix)
|
244
|
+
if line[0..0] == "\t"
|
245
|
+
line_start = doc.offset_at_line(line_ix)
|
246
|
+
to = line_start + 1
|
247
|
+
elsif line[0...num_spaces] == " "*num_spaces
|
248
|
+
line_start = doc.offset_at_line(line_ix)
|
249
|
+
to = line_start + num_spaces
|
250
|
+
end
|
251
|
+
doc.delete(line_start, to - line_start) unless line_start == to
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
class IncreaseIndentCommand < ChangeIndentCommand
|
256
|
+
key :osx => "Cmd+]",
|
257
|
+
:linux => "Ctrl+]",
|
258
|
+
:windows => "Ctrl+]"
|
259
|
+
|
260
|
+
def indent_line(doc, line_ix)
|
261
|
+
line = doc.get_line(line_ix)
|
262
|
+
whitespace_type = line[/^( |\t)/, 1] || " "
|
263
|
+
doc.insert(doc.offset_at_line(line_ix), whitespace_type)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
class StripWhitespaceCommand < Redcar::EditTabCommand
|
268
|
+
|
269
|
+
def execute
|
270
|
+
0.upto(doc.line_count - 1) do |line_ix|
|
271
|
+
doc.replace_line(line_ix) {|line| line.strip }
|
272
|
+
end
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
127
276
|
def self.start
|
128
277
|
Redcar.gui = ApplicationSWT.gui
|
129
278
|
Redcar.app.controller = ApplicationSWT.new(Redcar.app)
|
@@ -143,19 +292,37 @@ module Redcar
|
|
143
292
|
item "Close Window", CloseWindowCommand
|
144
293
|
item "Close Directory", Project::DirectoryCloseCommand
|
145
294
|
end
|
295
|
+
sub_menu "Edit" do
|
296
|
+
item "Undo", UndoCommand
|
297
|
+
item "Redo", RedoCommand
|
298
|
+
separator
|
299
|
+
item "Home", MoveHomeCommand
|
300
|
+
item "End", MoveEndCommand
|
301
|
+
separator
|
302
|
+
item "Increase Indent", IncreaseIndentCommand
|
303
|
+
item "Decrease Indent", DecreaseIndentCommand
|
304
|
+
separator
|
305
|
+
item "Strip Whitespace", StripWhitespaceCommand
|
306
|
+
end
|
307
|
+
sub_menu "Project" do
|
308
|
+
item "Find File", Project::FindFileCommand
|
309
|
+
end
|
146
310
|
sub_menu "Debug" do
|
147
311
|
item "Print Command History", PrintHistoryCommand
|
148
312
|
item "Print Contents", PrintContents
|
149
313
|
item "List Tabs", ListTabsCommand
|
150
314
|
item "Print Scope Tree", PrintScopeTreeCommand
|
151
|
-
|
152
|
-
item "Open", REPL::OpenInternalREPL
|
153
|
-
item "Execute", REPL::CommitREPL
|
154
|
-
end
|
315
|
+
item "Refresh Directory", Project::RefreshDirectoryCommand
|
155
316
|
end
|
156
317
|
sub_menu "View" do
|
157
318
|
item "Rotate Notebooks", RotateNotebooksCommand
|
158
319
|
item "Move Tab To Other Notebook", MoveTabToOtherNotebookCommand
|
320
|
+
item "Switch Notebooks", SwitchNotebookCommand
|
321
|
+
separator
|
322
|
+
item "Previous Tab", SwitchTabDownCommand
|
323
|
+
item "Next Tab", SwitchTabUpCommand
|
324
|
+
end
|
325
|
+
sub_menu "Plugins" do
|
159
326
|
end
|
160
327
|
sub_menu "Help" do
|
161
328
|
item "Website", PrintHistoryCommand
|