redcar 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +41 -1
- data/README.md +1 -1
- data/Rakefile +5 -6
- data/lib/plugin_manager/lib/plugin_manager.rb +1 -2
- data/lib/redcar.rb +19 -14
- data/lib/redcar/installer.rb +21 -17
- data/lib/redcar/runner.rb +10 -7
- data/lib/redcar/usage.rb +1 -0
- data/lib/redcar_quick_start.rb +8 -12
- data/lib/regex_replace.rb +3 -3
- data/plugins/application/features/step_definitions/menu_steps.rb +10 -0
- data/plugins/application/features/step_definitions/speedbar_steps.rb +8 -2
- data/plugins/application/features/step_definitions/tree_steps.rb +48 -6
- data/plugins/application/features/step_definitions/window_steps.rb +9 -4
- data/plugins/application/features/support/env.rb +20 -1
- data/plugins/application/features/support/fake_event.rb +14 -0
- data/plugins/application/lib/application.rb +29 -12
- data/plugins/application/lib/application/dialogs/filter_list_dialog.rb +19 -0
- data/plugins/application/lib/application/speedbar.rb +23 -17
- data/plugins/application/lib/application/tab.rb +20 -15
- data/plugins/application/lib/application/treebook.rb +10 -7
- data/plugins/application/lib/application/window.rb +1 -1
- data/plugins/application/plugin.rb +1 -1
- data/plugins/application_swt/lib/application_swt/dialog_adapter.rb +4 -4
- data/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb +15 -4
- data/plugins/application_swt/lib/application_swt/icon.rb +3 -5
- data/plugins/application_swt/lib/application_swt/notebook/tab_drag_and_drop_listener.rb +4 -4
- data/plugins/application_swt/lib/application_swt/notebook/tab_transfer.rb +5 -5
- data/plugins/application_swt/lib/application_swt/speedbar.rb +34 -120
- data/plugins/application_swt/lib/application_swt/speedbar/button_item.rb +20 -0
- data/plugins/application_swt/lib/application_swt/speedbar/combo_item.rb +38 -0
- data/plugins/application_swt/lib/application_swt/speedbar/label_item.rb +15 -0
- data/plugins/application_swt/lib/application_swt/speedbar/slider_item.rb +32 -0
- data/plugins/application_swt/lib/application_swt/speedbar/text_box_item.rb +36 -0
- data/plugins/application_swt/lib/application_swt/speedbar/toggle_item.rb +29 -0
- data/plugins/application_swt/lib/application_swt/tab.rb +1 -3
- data/plugins/application_swt/lib/application_swt/toolbar.rb +19 -20
- data/plugins/application_swt/lib/application_swt/treebook.rb +24 -9
- data/plugins/application_swt/lib/application_swt/window.rb +110 -98
- data/plugins/application_swt/lib/swt/vtab_folder.rb +77 -32
- data/plugins/application_swt/lib/swt/vtab_item.rb +9 -0
- data/plugins/application_swt/lib/swt/vtab_label.rb +63 -23
- data/plugins/application_swt/plugin.rb +1 -1
- data/plugins/clipboard-viewer/lib/clipboard_viewer/clipboard_bar.rb +2 -2
- data/plugins/comment/features/line_comment.feature +116 -4
- data/plugins/comment/lib/comment.rb +18 -16
- data/plugins/connection_manager/lib/connection_manager/commands.rb +1 -1
- data/plugins/connection_manager/lib/connection_manager/private_key_store.rb +5 -3
- data/plugins/declarations/lib/declarations.rb +1 -1
- data/plugins/declarations/lib/declarations/parser.rb +68 -20
- data/plugins/document_search/features/replace.feature +18 -0
- data/plugins/document_search/lib/document_search.rb +37 -54
- data/plugins/document_search/lib/document_search/replace_all_command.rb +27 -0
- data/plugins/document_search/lib/document_search/replace_command.rb +38 -0
- data/plugins/document_search/lib/document_search/replace_next_command.rb +27 -0
- data/plugins/document_search/lib/document_search/search_and_replace.rb +17 -24
- data/plugins/edit_view/features/step_definitions/editing_steps.rb +4 -4
- data/plugins/edit_view/features/step_definitions/tab_steps.rb +9 -0
- data/plugins/edit_view/features/step_definitions/window_steps.rb +0 -12
- data/plugins/edit_view/lib/edit_view/document.rb +2 -0
- data/plugins/edit_view/lib/edit_view/document/command.rb +8 -8
- data/plugins/edit_view/lib/edit_view/edit_tab.rb +21 -7
- data/plugins/edit_view/lib/edit_view/select_font_dialog.rb +6 -0
- data/plugins/edit_view/lib/edit_view/select_theme_dialog.rb +6 -0
- data/plugins/edit_view_swt/lib/edit_view_swt.rb +92 -43
- data/plugins/edit_view_swt/lib/edit_view_swt/document.rb +17 -4
- data/plugins/find-in-project/lib/find_in_project.rb +1 -4
- data/plugins/find-in-project/lib/find_in_project/commands.rb +0 -14
- data/plugins/find-in-project/lib/find_in_project/controllers.rb +12 -0
- data/plugins/find-in-project/lib/find_in_project/views/index.html.erb +5 -0
- data/plugins/groovy/features/fixtures/test.groovy +0 -0
- data/plugins/groovy/features/step_definitions/groovy_steps.rb +27 -0
- data/plugins/groovy/features/support/env.rb +27 -0
- data/plugins/groovy/features/syntax_check_groovy.feature +72 -0
- data/plugins/groovy/lib/syntax_check/groovy.rb +76 -0
- data/plugins/groovy/plugin.rb +7 -0
- data/plugins/help/lib/help.rb +28 -4
- data/plugins/help/lib/help/help_tab.rb +11 -0
- data/plugins/help/lib/help/view_controller.rb +25 -0
- data/plugins/help/plugin.rb +2 -1
- data/plugins/{view_shortcuts → help}/views/default.css +0 -0
- data/plugins/{view_shortcuts → help}/views/index.html.erb +1 -1
- data/plugins/{view_shortcuts → help}/views/redcar_small_icon.png +0 -0
- data/plugins/html_view/features/browser_bar.feature +47 -0
- data/plugins/html_view/features/fixtures/other.html +1 -0
- data/plugins/html_view/features/fixtures/sample.html +1 -0
- data/plugins/html_view/features/step_definitions/html_view_steps.rb +45 -5
- data/plugins/html_view/features/support/env.rb +26 -0
- data/plugins/html_view/features/web_preview.feature +21 -0
- data/plugins/html_view/lib/html_controller.rb +5 -5
- data/plugins/html_view/lib/html_view.rb +62 -10
- data/plugins/{web_bookmarks/lib/web_bookmarks → html_view/lib/html_view}/browser_bar.rb +32 -20
- data/plugins/html_view/lib/html_view/commands.rb +64 -0
- data/plugins/{web_bookmarks/lib/web_bookmarks/view_controller.rb → html_view/lib/html_view/default_controller.rb} +7 -6
- data/plugins/html_view/lib/html_view/html_tab.rb +17 -6
- data/plugins/html_view/plugin.rb +3 -3
- data/plugins/{web_bookmarks → html_view}/views/index.html.erb +0 -0
- data/plugins/javascript/features/fixtures/test.js +0 -0
- data/plugins/javascript/features/support/env.rb +4 -0
- data/plugins/javascript/features/syntax_check_javascript.feature +27 -0
- data/plugins/javascript/lib/syntax_check/javascript.rb +52 -0
- data/plugins/javascript/plugin.rb +7 -0
- data/plugins/javascript/vendor/jslint.js +539 -0
- data/plugins/macros/lib/macros/commands.rb +3 -3
- data/plugins/open_default_app/lib/open_default_app.rb +29 -3
- data/plugins/open_default_app/plugin.rb +1 -1
- data/plugins/outline_view/features/outline_view.feature +79 -0
- data/plugins/outline_view/features/step_definitions/outline_steps.rb +45 -0
- data/plugins/outline_view/lib/outline_view.rb +1 -1
- data/plugins/outline_view/spec/fixtures/some_project/javascript.js +10 -0
- data/plugins/outline_view/spec/fixtures/some_project/nothing_to_see.rb +0 -0
- data/plugins/outline_view/spec/fixtures/some_project/one_lonely_class.rb +2 -0
- data/plugins/outline_view/spec/fixtures/some_project/similar_names.rb +18 -0
- data/plugins/outline_view/spec/fixtures/some_project/something_fancy.rb +736 -0
- data/plugins/outline_view/spec/fixtures/some_project/trailing_space.rb +5 -0
- data/plugins/outline_view_swt/lib/outline_view_swt.rb +17 -19
- data/plugins/pair_highlighter/lib/pair_highlighter/document_controller.rb +1 -4
- data/plugins/plugin_manager_ui/lib/plugin_manager_ui.rb +12 -3
- data/plugins/project/features/close_directory_tree.feature +27 -0
- data/plugins/project/features/highlight_focussed_tab.feature +45 -1
- data/plugins/project/features/open_and_save_files.feature +33 -0
- data/plugins/project/features/open_directory_tree.feature +37 -11
- data/plugins/project/features/step_definitions/directory_steps.rb +1 -1
- data/plugins/project/features/step_definitions/drb_steps.rb +40 -0
- data/plugins/project/features/support/env.rb +17 -0
- data/plugins/project/lib/project.rb +12 -2
- data/plugins/project/lib/project/commands.rb +101 -99
- data/plugins/project/lib/project/drb_service.rb +55 -65
- data/plugins/project/lib/project/manager.rb +29 -4
- data/plugins/project/lib/project/project_tree_controller.rb +24 -0
- data/plugins/project/lib/project/support/trash.rb +1 -0
- data/plugins/redcar/redcar.rb +100 -37
- data/plugins/redcar_debug/lib/redcar_debug.rb +3 -3
- data/plugins/repl/features/step_definitions/repl_steps.rb +3 -0
- data/plugins/repl/lib/repl.rb +4 -11
- data/plugins/repl/lib/repl/repl_tab.rb +26 -0
- data/plugins/ruby/features/fixtures/test.rb +0 -0
- data/plugins/ruby/features/support/env.rb +4 -0
- data/plugins/ruby/features/syntax_check_ruby.feature +25 -0
- data/plugins/runnables/features/command_tree.feature +28 -0
- data/plugins/runnables/lib/runnables.rb +1 -0
- data/plugins/runnables/lib/runnables/commands.rb +4 -4
- data/plugins/runnables/lib/runnables/output_processor.rb +5 -5
- data/plugins/runnables/lib/runnables/tree_mirror/tree_controller.rb +2 -7
- data/plugins/runnables/lib/runnables/tree_mirror/tree_mirror.rb +13 -8
- data/plugins/scm_git/lib/scm_git/change.rb +5 -5
- data/plugins/strip_trailing_spaces/features/fixtures/test.txt +3 -0
- data/plugins/strip_trailing_spaces/features/strip_trailing_spaces.feature +34 -0
- data/plugins/strip_trailing_spaces/lib/strip_trailing_spaces.rb +3 -38
- data/plugins/swt/lib/swt.rb +5 -13
- data/plugins/swt/lib/swt/full_swt.rb +15 -13
- data/plugins/syntax_check/features/step_definitions/syntax_check_steps.rb +7 -0
- data/plugins/syntax_check/lib/syntax_check.rb +21 -3
- data/plugins/syntax_check/lib/syntax_check/error.rb +4 -3
- data/plugins/task_manager/lib/task_manager.rb +1 -1
- data/plugins/textmate/vendor/redcar-bundles/Bundles/Ant.tmbundle/Preferences/Autocompletions.tmPreferences +345 -0
- data/plugins/textmate/vendor/redcar-bundles/Bundles/Ant.tmbundle/Preferences/Symbol List Target.tmPreferences +22 -0
- data/plugins/textmate/vendor/redcar-bundles/Bundles/Ant.tmbundle/Snippets/Doc Banner.tmSnippet +20 -0
- data/plugins/textmate/vendor/redcar-bundles/Bundles/Ant.tmbundle/Syntaxes/Ant.tmLanguage +247 -0
- data/plugins/textmate/vendor/redcar-bundles/Bundles/Ant.tmbundle/info.plist +55 -0
- data/plugins/textmate/vendor/redcar-bundles/Bundles/RedcarRepl.tmbundle/Syntaxes/GroovyRepl.plist +40 -0
- data/plugins/textmate/vendor/redcar-bundles/Bundles/RedcarRepl.tmbundle/info.plist +1 -1
- data/plugins/textmate/vendor/redcar-bundles/Bundles/Ruby Haml.tmbundle/Syntaxes/Ruby_Haml.tmLanguage +0 -1
- data/plugins/textmate/vendor/redcar-bundles/Bundles/Ruby Sass.tmbundle/Syntaxes/Ruby Sass.tmLanguage +626 -0
- data/plugins/textmate/vendor/redcar-bundles/Bundles/Ruby Sass.tmbundle/info.plist +16 -0
- data/plugins/todo_list/features/support/env.rb +8 -0
- data/plugins/todo_list/features/todo_list.feature +26 -0
- data/plugins/todo_list/lib/todo_list.rb +1 -0
- data/plugins/todo_list/lib/todo_list/file_parser.rb +23 -19
- data/plugins/todo_list/lib/todo_list/todo_controller.rb +60 -100
- data/plugins/todo_list/spec/fixtures/project/FIXME.file +3 -0
- data/plugins/todo_list/spec/fixtures/project/NOTE.ignored.file +1 -0
- data/plugins/todo_list/spec/fixtures/project/OPTIMIZE_colon.file +1 -0
- data/plugins/todo_list/spec/fixtures/project/XXX.ignored +1 -0
- data/plugins/todo_list/spec/fixtures/project/ignored_directory/TODO.file +2 -0
- data/plugins/todo_list/spec/fixtures/settings.rb +11 -0
- data/plugins/todo_list/spec/spec_helper.rb +6 -0
- data/plugins/todo_list/spec/todo_list/file_parser_spec.rb +35 -0
- data/plugins/tree/lib/tree.rb +1 -0
- data/plugins/tree/lib/tree/command.rb +5 -0
- data/plugins/web_bookmarks/features/bookmark.feature +37 -0
- data/plugins/web_bookmarks/features/fixtures/other.html +1 -0
- data/plugins/web_bookmarks/features/fixtures/sample.html +1 -0
- data/plugins/web_bookmarks/features/step_definitions/web_steps.rb +4 -0
- data/plugins/web_bookmarks/features/support/env.rb +26 -0
- data/plugins/web_bookmarks/lib/web_bookmarks.rb +0 -10
- data/plugins/web_bookmarks/lib/web_bookmarks/bookmark.rb +10 -1
- data/plugins/web_bookmarks/lib/web_bookmarks/commands.rb +1 -47
- data/plugins/web_bookmarks/lib/web_bookmarks/tree.rb +21 -14
- data/{plugins/application → share}/icons/close.png +0 -0
- data/{plugins/application → share}/icons/darwin-file.png +0 -0
- data/{plugins/application → share}/icons/darwin-folder.png +0 -0
- data/share/icons/open-source-flipped.png +0 -0
- data/{plugins/application/icons/redcar_icon_beta_dev.png → share/icons/redcar-icon-beta-dev.png} +0 -0
- data/{plugins/application/icons/redcar_icon_beta.png → share/icons/redcar-icon-beta.png} +0 -0
- data/{plugins/application → share}/icons/redcar-splash.png +0 -0
- metadata +90 -30
- data/lib/redcar/jvm_options_probe.rb +0 -33
- data/plugins/document_search/lib/document_search/replace.rb +0 -113
- data/plugins/document_search/lib/document_search/search.rb +0 -45
- data/plugins/outline_view_swt/lib/icons/alias.png +0 -0
- data/plugins/outline_view_swt/lib/icons/assignment.png +0 -0
- data/plugins/outline_view_swt/lib/icons/attribute.png +0 -0
- data/plugins/outline_view_swt/lib/icons/class.png +0 -0
- data/plugins/outline_view_swt/lib/icons/interface.png +0 -0
- data/plugins/outline_view_swt/lib/icons/method.png +0 -0
- data/plugins/strip_trailing_spaces/CHANGELOG +0 -12
- data/plugins/strip_trailing_spaces/README.md +0 -32
- data/plugins/view_shortcuts/lib/view_shortcuts.rb +0 -52
- data/plugins/view_shortcuts/plugin.rb +0 -11
@@ -1,33 +0,0 @@
|
|
1
|
-
require "open3"
|
2
|
-
|
3
|
-
class JvmOptionsProbe
|
4
|
-
|
5
|
-
def initialize
|
6
|
-
@d32 = @d64 = @client = false
|
7
|
-
|
8
|
-
if Redcar.platform == :windows
|
9
|
-
@help = `java -h`
|
10
|
-
@d32 = (@help == `java -d32`) ? true : false
|
11
|
-
@d64 = (@help == `java -d64`) ? true : false
|
12
|
-
@client = (@help == `java -client`) ? true : false
|
13
|
-
else
|
14
|
-
@help = Open3.popen3("java -h")[2].readlines
|
15
|
-
@d32 = (@help == Open3.popen3("java -d32")[2].readlines) ? true : false
|
16
|
-
@d64 = (@help == Open3.popen3("java -d64")[2].readlines) ? true : false
|
17
|
-
@client = (@help == Open3.popen3("java -client")[2].readlines) ? true : false
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def can_use_d32?
|
22
|
-
@d32
|
23
|
-
end
|
24
|
-
|
25
|
-
def can_use_d64?
|
26
|
-
@d64
|
27
|
-
end
|
28
|
-
|
29
|
-
def can_use_client?
|
30
|
-
@client
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
@@ -1,113 +0,0 @@
|
|
1
|
-
module DocumentSearch
|
2
|
-
class ReplaceNextCommand < Redcar::DocumentCommand
|
3
|
-
|
4
|
-
attr_reader :query, :replace, :search_method
|
5
|
-
|
6
|
-
def initialize(query, replace, search_method)
|
7
|
-
@query, @replace, @search_method = query, replace, search_method
|
8
|
-
end
|
9
|
-
|
10
|
-
def body
|
11
|
-
Search.method(search_method)
|
12
|
-
end
|
13
|
-
|
14
|
-
def execute
|
15
|
-
# The current selection is usually not used for the next replacement, unless
|
16
|
-
# it matches the query string, in which case we assume that the user meant replace it, too
|
17
|
-
offsets = [doc.cursor_offset, doc.selection_offset]
|
18
|
-
if query == doc.selected_text
|
19
|
-
latest_point = offsets.min
|
20
|
-
else
|
21
|
-
latest_point = offsets.max
|
22
|
-
end
|
23
|
-
|
24
|
-
# Get the current line and then get the line segment from the cursor to the end of the line
|
25
|
-
curr_line_number = doc.line_at_offset(latest_point)
|
26
|
-
cursor_line_offset = latest_point - doc.offset_at_line(curr_line_number)
|
27
|
-
curr_line = doc.get_line(curr_line_number)
|
28
|
-
line_seg = curr_line[cursor_line_offset..-1]
|
29
|
-
|
30
|
-
# Call the search method passed by the caller
|
31
|
-
new_line, startoff, endoff = body.call(line_seg, query, replace)
|
32
|
-
|
33
|
-
# The passed in method returns the string replacement or nil
|
34
|
-
if new_line
|
35
|
-
# Add the replacment to the end of the line, and then replace in the document
|
36
|
-
curr_line[cursor_line_offset..-1] = new_line
|
37
|
-
doc.replace_line(doc.cursor_line, curr_line.chomp)
|
38
|
-
line_offset = doc.offset_at_line(doc.cursor_line)
|
39
|
-
doc.set_selection_range(cursor_line_offset + line_offset + startoff, cursor_line_offset + line_offset + endoff)
|
40
|
-
return 1
|
41
|
-
end
|
42
|
-
|
43
|
-
#Look at the rest of the lines starting at the next line
|
44
|
-
start_line = doc.cursor_line
|
45
|
-
(start_line+1..doc.line_count-1).each do |i|
|
46
|
-
new_line, startoff, endoff = body.call(doc.get_line(i), query, replace)
|
47
|
-
if new_line
|
48
|
-
doc.replace_line(i, new_line.chomp)
|
49
|
-
line_offset = doc.offset_at_line(i)
|
50
|
-
doc.set_selection_range(line_offset + startoff, line_offset + endoff)
|
51
|
-
doc.ensure_visible(doc.offset_at_line(i))
|
52
|
-
return 1
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
#Look at the rest of the lines starting at the beginning
|
57
|
-
start_line = doc.cursor_line
|
58
|
-
(0..start_line-1).each do |i|
|
59
|
-
new_line, startoff, endoff = body.call(doc.get_line(i), query, replace)
|
60
|
-
|
61
|
-
if new_line
|
62
|
-
doc.replace_line(i, new_line.chomp)
|
63
|
-
line_offset = doc.offset_at_line(i)
|
64
|
-
doc.set_selection_range(line_offset + startoff, line_offset + endoff)
|
65
|
-
doc.ensure_visible(doc.offset_at_line(i))
|
66
|
-
return 1
|
67
|
-
end
|
68
|
-
end
|
69
|
-
0
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
class ReplaceAllCommand < Redcar::DocumentCommand
|
74
|
-
|
75
|
-
attr_reader :query, :replace, :search_method
|
76
|
-
|
77
|
-
# Replace All starts at the begnning of the doc and iterates over all of the lines.
|
78
|
-
def initialize(query, replace, search_method)
|
79
|
-
@query, @replace, @search_method = query, replace, search_method
|
80
|
-
end
|
81
|
-
|
82
|
-
def body
|
83
|
-
Search.method(search_method)
|
84
|
-
end
|
85
|
-
|
86
|
-
def execute
|
87
|
-
count = 0
|
88
|
-
last_match_line = nil
|
89
|
-
startoff = nil
|
90
|
-
endoff = nil
|
91
|
-
doc.compound do
|
92
|
-
(0..(doc.line_count-1)).each do |i|
|
93
|
-
begin
|
94
|
-
line, a, b = body.call(doc.get_line(i), query, replace)
|
95
|
-
if line
|
96
|
-
startoff = a
|
97
|
-
endoff = b
|
98
|
-
last_match_line = i
|
99
|
-
doc.replace_line(i, line.chomp)
|
100
|
-
count += 1
|
101
|
-
end
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
if last_match_line
|
106
|
-
line_offset = doc.offset_at_line(last_match_line)
|
107
|
-
doc.set_selection_range(line_offset + startoff, line_offset + endoff)
|
108
|
-
doc.ensure_visible(doc.offset_at_line(last_match_line))
|
109
|
-
end
|
110
|
-
count
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
module DocumentSearch
|
2
|
-
class Search
|
3
|
-
# An instance of a search type method: Regular expression
|
4
|
-
def self.regex_search_method(line, query, replace)
|
5
|
-
re = /#{query}/
|
6
|
-
if match_data = line.match(re)
|
7
|
-
new_text = match_data.to_s.sub(re, replace)
|
8
|
-
new_line = match_data.pre_match + new_text + match_data.post_match
|
9
|
-
|
10
|
-
startoff = match_data.pre_match.length
|
11
|
-
endoff = startoff + new_text.length
|
12
|
-
|
13
|
-
return new_line, startoff, endoff
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
# An instance of a search type method: Plain text search
|
18
|
-
def self.plain_search_method(line, query, replace)
|
19
|
-
if i = line.index(query)
|
20
|
-
startoff = i
|
21
|
-
endoff = i + query.length - 1
|
22
|
-
line[startoff..endoff] = replace
|
23
|
-
return line, startoff, startoff + replace.length
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
# An instance of a search type method: Glob text search
|
28
|
-
# Converts a glob pattern (* or ?) into a regex pattern
|
29
|
-
def self.glob_search_method(line, query, replace)
|
30
|
-
# convert the glob pattern to a regex pattern
|
31
|
-
new_query = ""
|
32
|
-
query.each_char do |c|
|
33
|
-
case c
|
34
|
-
when "*"
|
35
|
-
new_query << ".*"
|
36
|
-
when "?"
|
37
|
-
new_query << "."
|
38
|
-
else
|
39
|
-
new_query << Regexp.escape(c)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
regex_search_method(line, new_query, replace)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,12 +0,0 @@
|
|
1
|
-
* 0.3
|
2
|
-
- Use checkbox menu item to enable/disable plugin, this avoids
|
3
|
-
the SWT memory leak caused by app.refresh_menu! (stevenh512)
|
4
|
-
- Fixed jumping by stripping line-by-line instead of entire
|
5
|
-
file. (stevenh512)
|
6
|
-
|
7
|
-
* 0.2
|
8
|
-
- Can be enabled/disabled from the Plugins menu (stevenh512)
|
9
|
-
- Always add a newline at the end of a file. (timfel)
|
10
|
-
|
11
|
-
* 0.1
|
12
|
-
- Initial proof of concept (stevenh512)
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# Strip Trailing Spaces for Redcar
|
2
|
-
|
3
|
-
This is a very simple clone of Gedit's "Save without trailing space" plugin for Redcar.
|
4
|
-
|
5
|
-
This plugin is diabled by default. It can be easily enabled through Redcar's Plugins menu.
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
|
9
|
-
cd ~/.redcar/plugins
|
10
|
-
git clone git://github.com/stevenh512/redcar_strip_trailing_spaces.git strip_trailing_spaces
|
11
|
-
|
12
|
-
## License
|
13
|
-
|
14
|
-
Copyright (c) 2010 Steven Hancock
|
15
|
-
|
16
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
17
|
-
of this software and associated documentation files (the "Software"), to deal
|
18
|
-
in the Software without restriction, including without limitation the rights
|
19
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
20
|
-
copies of the Software, and to permit persons to whom the Software is
|
21
|
-
furnished to do so, subject to the following conditions:
|
22
|
-
|
23
|
-
The above copyright notice and this permission notice shall be included in
|
24
|
-
all copies or substantial portions of the Software.
|
25
|
-
|
26
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
27
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
28
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
29
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
30
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
31
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
32
|
-
THE SOFTWARE.
|
@@ -1,52 +0,0 @@
|
|
1
|
-
|
2
|
-
require 'erb'
|
3
|
-
require 'cgi'
|
4
|
-
|
5
|
-
module Redcar
|
6
|
-
class ViewShortcuts
|
7
|
-
def self.menus
|
8
|
-
Menu::Builder.build do
|
9
|
-
sub_menu "Help" do
|
10
|
-
item "Keyboard Shortcuts", :command => ViewShortcuts::ViewCommand, :priority => 30
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.toolbars
|
16
|
-
ToolBar::Builder.build do
|
17
|
-
item "Keyboard Shortcuts", :command => ViewShortcuts::ViewCommand, :icon => File.join(Redcar::ICONS_DIRECTORY, "keyboard.png"), :barname => :help
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
class ViewCommand < Redcar::Command
|
22
|
-
def execute
|
23
|
-
controller = Controller.new
|
24
|
-
tab = win.new_tab(HtmlTab)
|
25
|
-
tab.html_view.controller = controller
|
26
|
-
tab.focus
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
class Controller
|
31
|
-
include HtmlController
|
32
|
-
|
33
|
-
def title
|
34
|
-
"Shortcuts"
|
35
|
-
end
|
36
|
-
|
37
|
-
def clean_name(command)
|
38
|
-
name = command.to_s.sub("Command","")
|
39
|
-
idx = name.rindex("::")
|
40
|
-
unless idx.nil?
|
41
|
-
name = name[idx+2,name.length]
|
42
|
-
end
|
43
|
-
name = name.split(/(?=[A-Z])/).map{|w| w}.join(" ").sub("R E P L","REPL")
|
44
|
-
end
|
45
|
-
|
46
|
-
def index
|
47
|
-
rhtml = ERB.new(File.read(File.join(File.dirname(__FILE__), "..", "views", "index.html.erb")))
|
48
|
-
rhtml.result(binding)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|