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
@@ -0,0 +1,20 @@
|
|
1
|
+
module Redcar
|
2
|
+
class ApplicationSWT
|
3
|
+
module ListenerHelpers
|
4
|
+
def ignore_within_self
|
5
|
+
name = __calling_method__
|
6
|
+
unless singly_hash[name]
|
7
|
+
singly_hash[name] = true
|
8
|
+
yield
|
9
|
+
singly_hash.delete(name)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def singly_hash
|
16
|
+
@singly_hash ||= {}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -23,6 +23,7 @@ module Swt
|
|
23
23
|
|
24
24
|
path = File.expand_path(File.dirname(__FILE__) + "/../../vendor/swt/" + Swt.jar_path)
|
25
25
|
if File.exist?(path + ".jar")
|
26
|
+
puts "loading #{Swt.jar_path}"
|
26
27
|
require path
|
27
28
|
else
|
28
29
|
puts "SWT jar file required: #{path}.jar"
|
@@ -41,6 +42,7 @@ module Swt
|
|
41
42
|
import org.eclipse.swt.widgets.DirectoryDialog
|
42
43
|
import org.eclipse.swt.widgets.FileDialog
|
43
44
|
import org.eclipse.swt.widgets.Label
|
45
|
+
import org.eclipse.swt.widgets.List
|
44
46
|
import org.eclipse.swt.widgets.Menu
|
45
47
|
import org.eclipse.swt.widgets.MenuItem
|
46
48
|
import org.eclipse.swt.widgets.Shell
|
@@ -61,6 +63,7 @@ module Swt
|
|
61
63
|
import org.eclipse.swt.layout.GridLayout
|
62
64
|
import org.eclipse.swt.layout.GridData
|
63
65
|
import org.eclipse.swt.layout.RowLayout
|
66
|
+
import org.eclipse.swt.layout.RowData
|
64
67
|
end
|
65
68
|
|
66
69
|
module Graphics
|
@@ -100,4 +103,12 @@ module JFace
|
|
100
103
|
import org.eclipse.jface.viewers.ILazyTreeContentProvider
|
101
104
|
import org.eclipse.jface.viewers.ILabelProvider
|
102
105
|
end
|
106
|
+
|
107
|
+
module Text
|
108
|
+
import org.eclipse.jface.text.TextViewerUndoManager
|
109
|
+
end
|
110
|
+
|
111
|
+
module Dialogs
|
112
|
+
import org.eclipse.jface.dialogs.Dialog
|
113
|
+
end
|
103
114
|
end
|
@@ -5,25 +5,23 @@ module Redcar
|
|
5
5
|
attr_reader :shell, :window, :shell_listener
|
6
6
|
|
7
7
|
class ShellListener
|
8
|
+
include ListenerHelpers
|
9
|
+
|
8
10
|
def initialize(controller)
|
9
11
|
@controller = controller
|
10
12
|
end
|
11
13
|
|
12
14
|
def shell_closed(e)
|
13
|
-
|
14
|
-
@in_close_operation = true
|
15
|
+
ignore_within_self do
|
15
16
|
e.doit = false
|
16
17
|
@controller.swt_event_closed
|
17
|
-
@in_close_operation = false
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
def shell_activated(e)
|
22
|
-
|
23
|
-
@in_activate_operation = true
|
22
|
+
ignore_within_self do
|
24
23
|
e.doit = false
|
25
24
|
@controller.swt_event_activated
|
26
|
-
@in_activate_operation = false
|
27
25
|
end
|
28
26
|
end
|
29
27
|
|
data/plugins/core/lib/core.rb
CHANGED
@@ -5,6 +5,7 @@ require "core/gui"
|
|
5
5
|
require "core/model"
|
6
6
|
require "core/observable"
|
7
7
|
require "core/plugin"
|
8
|
+
require "core/plugin/storage"
|
8
9
|
|
9
10
|
module Redcar
|
10
11
|
class Core
|
@@ -14,6 +15,9 @@ module Redcar
|
|
14
15
|
Core::Logger.init
|
15
16
|
end
|
16
17
|
|
18
|
+
# Platform symbol
|
19
|
+
#
|
20
|
+
# @return [:osx/:windows/:linux]
|
17
21
|
def self.platform
|
18
22
|
case Config::CONFIG["target_os"]
|
19
23
|
when /darwin/
|
@@ -24,6 +28,23 @@ module Redcar
|
|
24
28
|
:linux
|
25
29
|
end
|
26
30
|
end
|
31
|
+
|
32
|
+
# Platform specific ~/.redcar
|
33
|
+
#
|
34
|
+
# @return [String] expanded path
|
35
|
+
def self.user_dir
|
36
|
+
if platform == :windows
|
37
|
+
if ENV['USERPROFILE'].nil?
|
38
|
+
userdir = "C:/My Documents/.redcar/"
|
39
|
+
else
|
40
|
+
userdir = File.join(ENV['USERPROFILE'], "redcar")
|
41
|
+
end
|
42
|
+
else
|
43
|
+
userdir = File.join(ENV['HOME'], ".redcar") unless ENV['HOME'].nil?
|
44
|
+
end
|
45
|
+
File.expand_path(userdir)
|
46
|
+
end
|
47
|
+
|
27
48
|
end
|
28
49
|
end
|
29
50
|
|
@@ -71,7 +71,12 @@ module Redcar
|
|
71
71
|
#
|
72
72
|
# @param [Object] an instance of a Redcar model
|
73
73
|
def controller_for(model)
|
74
|
-
controller_class =
|
74
|
+
klass, controller_class = model.class, nil
|
75
|
+
while controller_class == nil and klass != Object
|
76
|
+
unless controller_class = @controllers[klass].first
|
77
|
+
klass = klass.superclass
|
78
|
+
end
|
79
|
+
end
|
75
80
|
raise "no controller for #{model.class}" unless controller_class
|
76
81
|
controller_class
|
77
82
|
end
|
@@ -99,8 +99,8 @@ module Redcar
|
|
99
99
|
private
|
100
100
|
|
101
101
|
def run_blocks(event_name, aspect, args)
|
102
|
-
blocks = events(event_name.to_s)[ASPECTS[aspect]]
|
103
|
-
blocks.each {
|
102
|
+
blocks = events(event_name.to_s)[ASPECTS[aspect]].clone
|
103
|
+
blocks.each {|b| b.call(*args) }
|
104
104
|
end
|
105
105
|
|
106
106
|
def events(event_name)
|
@@ -108,4 +108,8 @@ module Redcar
|
|
108
108
|
@events[event_name.to_s] ||= [[], []]
|
109
109
|
end
|
110
110
|
end
|
111
|
-
end
|
111
|
+
end
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
|
2
|
+
module Redcar
|
3
|
+
class Plugin
|
4
|
+
class Storage
|
5
|
+
|
6
|
+
extend Forwardable
|
7
|
+
|
8
|
+
def_delegators :@storage, :[], :[]=, :keys
|
9
|
+
|
10
|
+
def self.storage_dir
|
11
|
+
Core.user_dir
|
12
|
+
end
|
13
|
+
|
14
|
+
# Open a storage file or create it if it doesn't exist.
|
15
|
+
#
|
16
|
+
# @param [String] a (short) name, should be suitable for use as a filename
|
17
|
+
def initialize(name)
|
18
|
+
@name = name
|
19
|
+
@storage = {}
|
20
|
+
rollback
|
21
|
+
end
|
22
|
+
|
23
|
+
# Save the storage to disk.
|
24
|
+
def save
|
25
|
+
File.open(path, "w") { |f| YAML.dump(@storage, f) }
|
26
|
+
self
|
27
|
+
end
|
28
|
+
|
29
|
+
# Rollback the storage to the latest revision saved to disk or empty it if
|
30
|
+
# it hasn't been saved.
|
31
|
+
def rollback
|
32
|
+
if File.exists?(path)
|
33
|
+
@storage = YAML.load_file(path)
|
34
|
+
else
|
35
|
+
@storage = {}
|
36
|
+
end
|
37
|
+
self
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def path
|
43
|
+
File.join(Storage.storage_dir, @name + ".yaml")
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
|
2
|
+
require File.join(File.dirname(__FILE__), "..", "spec_helper")
|
3
|
+
|
4
|
+
describe Redcar::Plugin::Storage do
|
5
|
+
it "acts like a hash" do
|
6
|
+
storage = Redcar::Plugin::Storage.new('test')
|
7
|
+
storage[:some_key] = "some value"
|
8
|
+
storage[:some_key].should == "some value"
|
9
|
+
storage[:some_key] = "some other value"
|
10
|
+
storage[:some_key].should == "some other value"
|
11
|
+
end
|
12
|
+
|
13
|
+
it "rolls back to an empty hash if it hasn't been saved" do
|
14
|
+
storage = Redcar::Plugin::Storage.new('test')
|
15
|
+
storage[:some_key] = "some value"
|
16
|
+
storage[:some_key].should == "some value"
|
17
|
+
storage.rollback
|
18
|
+
storage[:some_key].should be_nil
|
19
|
+
end
|
20
|
+
|
21
|
+
it "saves to disk" do
|
22
|
+
storage = Redcar::Plugin::Storage.new('test_storage_saved')
|
23
|
+
storage[:some_key] = "some value"
|
24
|
+
storage.save
|
25
|
+
storage = Redcar::Plugin::Storage.new('test_storage_saved')
|
26
|
+
storage[:some_key].should == "some value"
|
27
|
+
|
28
|
+
FileUtils.rm_rf(storage.send(:path))
|
29
|
+
end
|
30
|
+
end
|
@@ -25,6 +25,10 @@ When /^I close the current notebook$/ do
|
|
25
25
|
Redcar::Top::CloseNotebookCommand.new.run
|
26
26
|
end
|
27
27
|
|
28
|
+
When /^I switch notebooks$/ do
|
29
|
+
Redcar::Top::SwitchNotebookCommand.new.run
|
30
|
+
end
|
31
|
+
|
28
32
|
When /^I focus on the edit_view in the tab in notebook (\d)$/ do |index|
|
29
33
|
index = index.to_i - 1
|
30
34
|
notebook = Redcar.app.windows.first.notebooks[index]
|
@@ -24,10 +24,25 @@ When /^I replace the contents with "([^\"]*)"$/ do |arg1|
|
|
24
24
|
tab.edit_view.document.text = arg1
|
25
25
|
end
|
26
26
|
|
27
|
-
|
27
|
+
When /I move (up|down) a tab/ do |type|
|
28
|
+
case type
|
29
|
+
when "down"
|
30
|
+
Redcar::Top::SwitchTabDownCommand.new.run
|
31
|
+
when "up"
|
32
|
+
Redcar::Top::SwitchTabUpCommand.new.run
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
Then /^there should be (one|\d+) (.*) tabs?$/ do |num, tab_type|
|
37
|
+
if num == "one"
|
38
|
+
num = 1
|
39
|
+
else
|
40
|
+
num = num.to_i
|
41
|
+
end
|
42
|
+
|
28
43
|
# in the model
|
29
44
|
tabs = Redcar.app.windows.first.notebooks.map {|nb| nb.tabs }.flatten
|
30
|
-
tabs.length.should ==
|
45
|
+
tabs.length.should == num
|
31
46
|
|
32
47
|
# in the GUI
|
33
48
|
case tab_type
|
@@ -36,7 +51,7 @@ Then /^there should be one (.*) tab$/ do |tab_type|
|
|
36
51
|
end
|
37
52
|
|
38
53
|
tabs = get_tabs
|
39
|
-
tabs.length.should ==
|
54
|
+
tabs.length.should == num
|
40
55
|
end
|
41
56
|
|
42
57
|
Then /^the edit tab should have the focus$/ do
|
@@ -60,7 +75,10 @@ Then /^the tab should have the keyboard focus$/ do
|
|
60
75
|
tab.controller.edit_view.has_focus?.should be_true
|
61
76
|
end
|
62
77
|
|
63
|
-
Then /^I should see "(.*)" in the edit tab$/ do |content|
|
64
|
-
|
65
|
-
|
78
|
+
Then /^I should (not )?see "(.*)" in the edit tab$/ do |bool, content|
|
79
|
+
bool = !bool
|
80
|
+
matcher = bool ? be_true : be_false
|
81
|
+
focussed_tab.edit_view.document.to_s.include?(content).should matcher
|
66
82
|
end
|
83
|
+
|
84
|
+
|
@@ -15,6 +15,10 @@ module SwtTabHelpers
|
|
15
15
|
tab = Redcar.app.windows.first.notebooks.map{|n| n.tabs}.flatten.detect{|t| t.controller.item == item1}
|
16
16
|
end
|
17
17
|
|
18
|
+
def focussed_tab
|
19
|
+
Redcar.app.windows.first.focussed_notebook.focussed_tab
|
20
|
+
end
|
21
|
+
|
18
22
|
def get_tabs
|
19
23
|
display = Redcar::ApplicationSWT.display
|
20
24
|
shell = display.get_shells.to_a.first
|
@@ -0,0 +1,55 @@
|
|
1
|
+
Feature: Switch and move tabs within a notebook
|
2
|
+
|
3
|
+
Scenario: Switch tab down
|
4
|
+
When I open a new edit tab
|
5
|
+
And I replace the contents with "Anne Boleyn"
|
6
|
+
And I open a new edit tab
|
7
|
+
And I replace the contents with "Elizabeth Woodville"
|
8
|
+
Then I should see "Elizabeth Woodville" in the edit tab
|
9
|
+
And I move down a tab
|
10
|
+
Then I should see "Anne Boleyn" in the edit tab
|
11
|
+
|
12
|
+
Scenario: Switch tab down too far
|
13
|
+
When I open a new edit tab
|
14
|
+
And I replace the contents with "Anne Boleyn"
|
15
|
+
And I open a new edit tab
|
16
|
+
And I replace the contents with "Elizabeth Woodville"
|
17
|
+
Then I should see "Elizabeth Woodville" in the edit tab
|
18
|
+
And I move down a tab
|
19
|
+
And I move down a tab
|
20
|
+
Then I should see "Anne Boleyn" in the edit tab
|
21
|
+
|
22
|
+
Scenario: Switch tab up
|
23
|
+
When I open a new edit tab
|
24
|
+
And I replace the contents with "Anne Boleyn"
|
25
|
+
And I open a new edit tab
|
26
|
+
And I replace the contents with "Elizabeth Woodville"
|
27
|
+
Then I should see "Elizabeth Woodville" in the edit tab
|
28
|
+
And I move down a tab
|
29
|
+
And I move up a tab
|
30
|
+
Then I should see "Elizabeth Woodville" in the edit tab
|
31
|
+
|
32
|
+
Scenario: Switch tab up too far
|
33
|
+
When I open a new edit tab
|
34
|
+
And I replace the contents with "Anne Boleyn"
|
35
|
+
And I open a new edit tab
|
36
|
+
And I replace the contents with "Elizabeth Woodville"
|
37
|
+
Then I should see "Elizabeth Woodville" in the edit tab
|
38
|
+
And I move up a tab
|
39
|
+
Then I should see "Elizabeth Woodville" in the edit tab
|
40
|
+
|
41
|
+
Scenario: Switch notebooks
|
42
|
+
When I open a new edit tab
|
43
|
+
And I replace the contents with "Anne Boleyn"
|
44
|
+
And I make a new notebook
|
45
|
+
When I open a new edit tab
|
46
|
+
And I replace the contents with "Scarlett"
|
47
|
+
And I move the tab to the other notebook
|
48
|
+
When I switch notebooks
|
49
|
+
Then I should see "Anne Boleyn" in the edit tab
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
Feature: Undo and Redo
|
2
|
+
|
3
|
+
Scenario: Commands are inactive for a new tab
|
4
|
+
When I open a new edit tab
|
5
|
+
Then the menu item "Edit|Undo" should be inactive
|
6
|
+
And the menu item "Edit|Redo" should be inactive
|
7
|
+
|
8
|
+
Scenario: Undo becomes active when I type something
|
9
|
+
When I open a new edit tab
|
10
|
+
And I replace the contents with "Bolzano"
|
11
|
+
Then the menu item "Edit|Undo" should be active
|
12
|
+
And the menu item "Edit|Redo" should be inactive
|
13
|
+
|
14
|
+
Scenario: Undo undoes typing
|
15
|
+
When I open a new edit tab
|
16
|
+
And I replace the contents with "Bolzano"
|
17
|
+
And I undo
|
18
|
+
Then I should not see "Bolzano" in the edit tab
|
19
|
+
|
20
|
+
Scenario: Undo undoes typing twice
|
21
|
+
When I open a new edit tab
|
22
|
+
And I replace the contents with "Bolzano"
|
23
|
+
And I replace the contents with "Weierstrass"
|
24
|
+
And I undo
|
25
|
+
Then I should not see "Weierstrass" in the edit tab
|
26
|
+
And I should see "Bolzano" in the edit tab
|
27
|
+
And I undo
|
28
|
+
Then I should not see "Weierstrass" in the edit tab
|
29
|
+
And I should not see "Bolzano" in the edit tab
|
30
|
+
|
31
|
+
Scenario: Undo becomes inactive and redo active when I undo everything
|
32
|
+
When I open a new edit tab
|
33
|
+
And I replace the contents with "Bolzano"
|
34
|
+
And I undo
|
35
|
+
Then the menu item "Edit|Undo" should be inactive
|
36
|
+
And the menu item "Edit|Redo" should be active
|
37
|
+
|
38
|
+
Scenario: Redo redoes typing
|
39
|
+
When I open a new edit tab
|
40
|
+
And I replace the contents with "Bolzano"
|
41
|
+
And I undo
|
42
|
+
And I redo
|
43
|
+
And I should see "Bolzano" in the edit tab
|
44
|
+
|
45
|
+
Scenario: Redo becomes inactive when I redo everything
|
46
|
+
When I open a new edit tab
|
47
|
+
And I replace the contents with "Bolzano"
|
48
|
+
And I undo
|
49
|
+
And I redo
|
50
|
+
Then the menu item "Edit|Undo" should be active
|
51
|
+
And the menu item "Edit|Redo" should be inactive
|
52
|
+
|