redcar-dev 0.12.19dev → 0.12.20dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +4 -36
- data/bin/redcar +6 -0
- data/lib/redcar.rb +2 -1
- data/lib/redcar_quick_start.rb +1 -1
- data/plugins/application/lib/application.rb +19 -1
- data/plugins/application/lib/application/commands/application_commands.rb +24 -0
- data/plugins/application/lib/application/updates.rb +44 -0
- data/plugins/application_swt/lib/application_swt.rb +6 -0
- data/plugins/application_swt/lib/swt/vtab_label.rb +2 -1
- data/plugins/declarations/lib/declarations.rb +1 -1
- data/plugins/declarations/lib/declarations/file.rb +1 -1
- data/plugins/declarations/lib/declarations/parser.rb +49 -10
- data/plugins/outline_view/features/project_outline.feature +23 -0
- data/plugins/outline_view/features/step_definitions/outline_steps.rb +8 -4
- data/plugins/outline_view/lib/outline_view.rb +41 -10
- data/plugins/outline_view/lib/outline_view/commands.rb +6 -0
- data/plugins/outline_view_swt/lib/outline_view_swt.rb +1 -1
- data/plugins/redcar/redcar.rb +8 -1
- data/plugins/tree_view_swt/lib/tree_view_swt.rb +1 -2
- metadata +49 -49
data/README.md
CHANGED
@@ -28,7 +28,9 @@ Some (current) limitations:
|
|
28
28
|
|
29
29
|
## INSTALLATION
|
30
30
|
|
31
|
-
|
31
|
+
$ gem install redcar
|
32
|
+
|
33
|
+
for more details, see [User Guide: Installation](https://github.com/redcar/redcar/wiki/Installation)
|
32
34
|
|
33
35
|
## USAGE
|
34
36
|
|
@@ -43,41 +45,7 @@ To see full usage details.
|
|
43
45
|
* Irc at #redcar on irc.freenode.net
|
44
46
|
* Mailing list at http://groups.google.com/group/redcar-editor
|
45
47
|
|
46
|
-
## TESTS
|
47
|
-
|
48
|
-
NB. Redcar features are known to work with Cucumber 0.9.2, and known NOT to work with Cucumber < 0.9
|
49
|
-
|
50
|
-
To run the tests you need JRuby installed. You also need rspec and cucumber installed as JRuby gems. See jruby.org for this, or install with rvm.
|
51
|
-
|
52
|
-
To install the necessary gems:
|
53
|
-
|
54
|
-
$ jruby -S bundle install
|
55
|
-
|
56
|
-
To run all specs and all features:
|
57
|
-
|
58
|
-
$ jruby -S rake
|
59
|
-
|
60
|
-
### Specs
|
61
|
-
|
62
|
-
To run all specs:
|
63
|
-
|
64
|
-
$ rspec plugins/*/spec/
|
65
|
-
|
66
|
-
### Features
|
67
|
-
|
68
|
-
On OSX:
|
69
|
-
|
70
|
-
$ jruby -J-XstartOnFirstThread swt_cucumber plugins/#{plugin_name}/features
|
71
|
-
|
72
|
-
On Linux/Windows:
|
73
|
-
|
74
|
-
$ jruby -J-XstartOnFirstThread swt_cucumber plugins/#{plugin_name}/features
|
75
|
-
|
76
|
-
To just run all features:
|
77
|
-
|
78
|
-
$ rake cucumber
|
79
|
-
|
80
48
|
## LICENSE
|
81
49
|
|
82
|
-
Redcar is copyright 2007-
|
50
|
+
Redcar is copyright 2007-2012 Daniel Lucraft and contributors.
|
83
51
|
It is licensed under the GPLv2. See the included LICENSE file for details.
|
data/bin/redcar
CHANGED
@@ -27,3 +27,9 @@ Redcar.spin_up
|
|
27
27
|
Redcar.load_threaded
|
28
28
|
Redcar.show_splash
|
29
29
|
Redcar.pump
|
30
|
+
|
31
|
+
# enforce a GC run to help with a clean exit.
|
32
|
+
# When mixing SWT and Swing this is necessary.
|
33
|
+
mem_bean = java.lang.management.ManagementFactory.getMemoryMXBean()
|
34
|
+
mem_bean.gc
|
35
|
+
|
data/lib/redcar.rb
CHANGED
@@ -12,6 +12,7 @@ require 'regex_replace'
|
|
12
12
|
require 'forwardable'
|
13
13
|
require 'uri'
|
14
14
|
require 'fileutils'
|
15
|
+
require 'net/http'
|
15
16
|
|
16
17
|
require 'rubygems'
|
17
18
|
require "bundler/setup"
|
@@ -58,7 +59,7 @@ end
|
|
58
59
|
#
|
59
60
|
# and so on.
|
60
61
|
module Redcar
|
61
|
-
VERSION = '0.12.
|
62
|
+
VERSION = '0.12.20dev' # also change in the gemspec!
|
62
63
|
VERSION_MAJOR = 0
|
63
64
|
VERSION_MINOR = 12
|
64
65
|
VERSION_RELEASE = 0
|
data/lib/redcar_quick_start.rb
CHANGED
@@ -34,6 +34,7 @@ require 'application/tree/command'
|
|
34
34
|
require 'application/tree/controller'
|
35
35
|
require 'application/tree/mirror'
|
36
36
|
require 'application/treebook'
|
37
|
+
require 'application/updates'
|
37
38
|
require 'application/window'
|
38
39
|
|
39
40
|
require 'application/commands/application_commands'
|
@@ -106,7 +107,10 @@ module Redcar
|
|
106
107
|
notebook.tabs.any?
|
107
108
|
end
|
108
109
|
end,
|
109
|
-
Sensitivity.new(:always_disabled, Redcar.app, false,[])
|
110
|
+
Sensitivity.new(:always_disabled, Redcar.app, false, []) { false },
|
111
|
+
Sensitivity.new(:update_available, Redcar.app, false, [:update_available]) do
|
112
|
+
Application::Updates.update_available?
|
113
|
+
end
|
110
114
|
]
|
111
115
|
end
|
112
116
|
|
@@ -123,6 +127,10 @@ module Redcar
|
|
123
127
|
@task_queue = TaskQueue.new
|
124
128
|
@show_toolbar = !!Application.storage['show_toolbar']
|
125
129
|
end
|
130
|
+
|
131
|
+
def self.instance_id
|
132
|
+
Application.storage["instance_id"]
|
133
|
+
end
|
126
134
|
|
127
135
|
def events
|
128
136
|
@event_spewer
|
@@ -191,6 +199,8 @@ module Redcar
|
|
191
199
|
storage = Plugin::Storage.new('application_plugin')
|
192
200
|
storage.set_default('stay_resident_after_last_window_closed', false)
|
193
201
|
storage.set_default('show_toolbar', true)
|
202
|
+
storage.set_default('instance_id', java.util.UUID.randomUUID.to_s)
|
203
|
+
storage.set_default('should_check_for_updates', true)
|
194
204
|
storage
|
195
205
|
end
|
196
206
|
end
|
@@ -341,6 +351,14 @@ module Redcar
|
|
341
351
|
@application_focus = true
|
342
352
|
notify_listeners(:focussed, self)
|
343
353
|
end
|
354
|
+
Thread.new do
|
355
|
+
Application::Updates.check_for_new_version
|
356
|
+
if Application::Updates.update_available?
|
357
|
+
Redcar.update_gui do
|
358
|
+
notify_listeners(:update_available, self)
|
359
|
+
end
|
360
|
+
end
|
361
|
+
end
|
344
362
|
end
|
345
363
|
|
346
364
|
def has_focus?
|
@@ -17,5 +17,29 @@ module Redcar
|
|
17
17
|
Redcar.app.refresh_toolbar!
|
18
18
|
end
|
19
19
|
end
|
20
|
+
|
21
|
+
class ToggleCheckForUpdatesCommand < Command
|
22
|
+
def execute
|
23
|
+
Application::Updates.toggle_checking_for_updates
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
class OpenUpdateCommand < Command
|
28
|
+
sensitize :update_available
|
29
|
+
|
30
|
+
def execute
|
31
|
+
new_tab = Top::OpenNewEditTabCommand.new.run
|
32
|
+
new_tab.document.text = <<-TXT
|
33
|
+
Latest version is #{Application::Updates.latest_version}, you have #{Redcar::VERSION}.
|
34
|
+
|
35
|
+
Upgrade with:
|
36
|
+
|
37
|
+
gem install redcar
|
38
|
+
TXT
|
39
|
+
new_tab.edit_view.reset_undo
|
40
|
+
new_tab.document.set_modified(false)
|
41
|
+
new_tab.title= 'Update'
|
42
|
+
end
|
43
|
+
end
|
20
44
|
end
|
21
45
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Redcar
|
2
|
+
class Application
|
3
|
+
class Updates
|
4
|
+
|
5
|
+
UPDATE_CHECK_INTERVAL = 24*60*60
|
6
|
+
|
7
|
+
def self.check_for_new_version
|
8
|
+
return unless check_for_updates?
|
9
|
+
|
10
|
+
previous_check = Application.storage["last_checked_for_new_version"]
|
11
|
+
if !previous_check or previous_check < Time.now - UPDATE_CHECK_INTERVAL
|
12
|
+
Redcar.log.info("latest version is: #{latest_version}")
|
13
|
+
if newer_version?
|
14
|
+
Redcar.log.info("newer version available")
|
15
|
+
@update_available = true
|
16
|
+
end
|
17
|
+
Application.storage["last_checked_for_new_version"] = Time.now
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.check_for_updates?
|
22
|
+
Application.storage["should_check_for_updates"]
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.toggle_checking_for_updates
|
26
|
+
Application.storage["should_check_for_updates"] = !check_for_updates?
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.update_available?
|
30
|
+
@update_available
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.latest_version
|
34
|
+
@latest_version ||= Net::HTTP.get(URI.parse("http://s3.amazonaws.com/redcar2/current_version.txt?instance_id=#{Application.instance_id}")).strip
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.newer_version?
|
38
|
+
latest_version_bits = latest_version.split(".").map(&:to_i)
|
39
|
+
[latest_version_bits, [Redcar::VERSION_MAJOR, Redcar::VERSION_MINOR, Redcar::VERSION_RELEASE]].sort.last == latest_version_bits
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -63,12 +63,18 @@ module Redcar
|
|
63
63
|
Gradient.new(Redcar::ApplicationSWT.storage['tree_background'])
|
64
64
|
end
|
65
65
|
|
66
|
+
def self.tree_font_size
|
67
|
+
Redcar::ApplicationSWT.storage['tree_font_size']
|
68
|
+
end
|
69
|
+
|
66
70
|
def self.storage
|
67
71
|
@storage ||= begin
|
68
72
|
storage = Plugin::Storage.new('application_swt')
|
69
73
|
storage.set_default('selected_tab_background', {0 => "#FEFEFE", 100 => "#EEEEEE"})
|
70
74
|
storage.set_default('unselected_tab_background', {0 => "#E5E5E5", 100 => "#D0D0D0"})
|
71
75
|
storage.set_default('tree_background', "#FFFFFF")
|
76
|
+
font_size_offset = Redcar.platform == :osx ? 4 : 2
|
77
|
+
storage.set_default('tree_font_size', Redcar::EditView.font_size - font_size_offset)
|
72
78
|
storage
|
73
79
|
end
|
74
80
|
end
|
@@ -101,7 +101,8 @@ module Swt
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def mouseUp(e)
|
104
|
-
if
|
104
|
+
# Close tab if close button is clicked, or tab is middle-clicked
|
105
|
+
if (show_close && close_icon.bounds.contains(e.x - ICON_PADDING, e.y - ICON_PADDING)) || e.button == 2
|
105
106
|
@tab.parent.remove_item(@tab)
|
106
107
|
else
|
107
108
|
activate if e.button == 1
|
@@ -98,7 +98,7 @@ module Redcar
|
|
98
98
|
def execute
|
99
99
|
project = Project::Manager.focussed_project
|
100
100
|
tags_path = Declarations.file_path(project)
|
101
|
-
FileUtils.rm tags_path
|
101
|
+
FileUtils.rm tags_path if ::File.exists? tags_path
|
102
102
|
ProjectRefresh.new(project).execute
|
103
103
|
end
|
104
104
|
end
|
@@ -9,7 +9,7 @@ module Redcar
|
|
9
9
|
capture: 1
|
10
10
|
type: id
|
11
11
|
kind: interface
|
12
|
-
- regex: "^\\s*((public|private|protected|)\\s+|)(static\\s+|)(([\\.\\w]+|)[A-Z]\\w*(<\\w+>|)|void|int|boolean|byte|short|long|char|float|def)\\s+(\\w+\\s*\\((.*)\\))"
|
12
|
+
- regex: "^\\s*((public|private|protected|)\\s+|)(static\\s+|)(([\\.\\w]+|)[A-Z]\\w*(<\\w+>|)|void|int|boolean|byte|short|long|char|float|def)\\s+(\\w+\\s*\\((.*)\\))?"
|
13
13
|
capture: 7
|
14
14
|
type: id
|
15
15
|
kind: method
|
@@ -36,7 +36,7 @@ module Redcar
|
|
36
36
|
capture: 1
|
37
37
|
type: id
|
38
38
|
kind: interface
|
39
|
-
- regex: "^\\s*((public|private|protected|)\\s+|)(static\\s+|)(([\\.\\w]+|)[A-Z]\\w*(<\\w+>|)|void|int|boolean|byte|short|long|char|float)\\s+(\\w+\\s*\\((.*)\\))"
|
39
|
+
- regex: "^\\s*((public|private|protected|)\\s+|)(static\\s+|)(([\\.\\w]+|)[A-Z]\\w*(<\\w+>|)|void|int|boolean|byte|short|long|char|float)\\s+(\\w+\\s*\\((.*)\\))?"
|
40
40
|
capture: 7
|
41
41
|
type: id
|
42
42
|
kind: method
|
@@ -55,7 +55,7 @@ module Redcar
|
|
55
55
|
capture: 2
|
56
56
|
type: id
|
57
57
|
kind: class
|
58
|
-
- regex: "^[^#]*def (self\\.)?(\\w+[?!=]?)(\\(.*\\))?(\\s
|
58
|
+
- regex: "^[^#]*def (self\\.)?(\\w+[?!=]?)(\\(.*\\))?(\\s|\\;|\\z|\\b)"
|
59
59
|
capture: 2
|
60
60
|
type: id
|
61
61
|
kind: method
|
@@ -103,16 +103,56 @@ module Redcar
|
|
103
103
|
kind: method
|
104
104
|
YAML
|
105
105
|
|
106
|
+
CUKE_YAML=<<-YAML
|
107
|
+
- regex: "Feature:\\s*(.*)"
|
108
|
+
capture: 1
|
109
|
+
type: id
|
110
|
+
kind: class
|
111
|
+
- regex: "Scenario:\\s*(.*)"
|
112
|
+
capture: 1
|
113
|
+
type: id
|
114
|
+
kind: method
|
115
|
+
- regex: "(When|Then|And)\\s*\\/\\^?(.*?)\\$?\\/\\s*do"
|
116
|
+
capture: 2
|
117
|
+
type: id
|
118
|
+
kind: closure
|
119
|
+
YAML
|
120
|
+
|
121
|
+
SPEC_YAML=<<-YAML
|
122
|
+
- regex: "describe\\s*\\"(.*?)\\"\\s*do"
|
123
|
+
capture: 1
|
124
|
+
type: id
|
125
|
+
kind: method
|
126
|
+
- regex: "it\\s*\\"(.*?)\\"\\s*do"
|
127
|
+
capture: 1
|
128
|
+
type: id
|
129
|
+
kind: closure
|
130
|
+
YAML
|
131
|
+
|
106
132
|
class Declarations
|
107
133
|
class Parser
|
108
134
|
DEFINITIONS = {
|
109
|
-
|
110
|
-
|
111
|
-
/\.
|
112
|
-
/\.
|
113
|
-
/\.
|
135
|
+
/_steps\.rb$/ => YAML.load(CUKE_YAML) + YAML.load(RUBY_YAML),
|
136
|
+
/_spec\.rb$/ => YAML.load(RUBY_YAML) + YAML.load(SPEC_YAML),
|
137
|
+
/\.rb$/ => YAML.load(RUBY_YAML),
|
138
|
+
/\.java$/ => YAML.load(JAVA_YAML),
|
139
|
+
/\.groovy$/ => YAML.load(GROOVY_YAML),
|
140
|
+
/\.php$/ => YAML.load(PHP_YAML),
|
141
|
+
/\.js$/ => YAML.load(JS_YAML),
|
142
|
+
/\.feature$/ => YAML.load(CUKE_YAML)
|
114
143
|
}
|
115
144
|
|
145
|
+
def self.definitions
|
146
|
+
@definitions = nil
|
147
|
+
@definitions ||= begin
|
148
|
+
definitions = DEFINITIONS.clone
|
149
|
+
Redcar.plugin_manager.objects_implementing(:declaration_definitions).each do
|
150
|
+
definitions.merge(object.declaration_definitions)
|
151
|
+
end
|
152
|
+
definitions
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
116
156
|
attr_reader :tags
|
117
157
|
|
118
158
|
def initialize
|
@@ -126,7 +166,7 @@ module Redcar
|
|
126
166
|
end
|
127
167
|
|
128
168
|
def decls_for_file(path)
|
129
|
-
|
169
|
+
Parser.definitions.each do |fn_re, decls|
|
130
170
|
if path =~ fn_re
|
131
171
|
return decls
|
132
172
|
end
|
@@ -179,7 +219,6 @@ module Redcar
|
|
179
219
|
def file(path)
|
180
220
|
::File.read(path)
|
181
221
|
end
|
182
|
-
|
183
222
|
end
|
184
223
|
end
|
185
224
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Feature: Project-wide Outline View
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given I will choose "plugins/outline_view/spec/fixtures/some_project" from the "open_directory" dialog
|
5
|
+
When I open a directory
|
6
|
+
|
7
|
+
Scenario: Outline View shows all available declarations
|
8
|
+
When I run the command Redcar::OutlineView::OpenProjectOutlineViewCommand
|
9
|
+
Then there should be an outline view open
|
10
|
+
And the outline view should have some entries
|
11
|
+
And I should see "IAmAllAlone" at 0 with the "class" icon in the outline view
|
12
|
+
And I should see "trailing_space" at 1 with the "method" icon in the outline view
|
13
|
+
|
14
|
+
Scenario: Narrow results using the filter
|
15
|
+
When I run the command Redcar::OutlineView::OpenProjectOutlineViewCommand
|
16
|
+
Then there should be an outline view open
|
17
|
+
When I set the outline filter to "selected"
|
18
|
+
And I wait 2 seconds
|
19
|
+
Then the outline view should have 2 entries
|
20
|
+
And I should see "selection_range_changed" at 0 with the "method" icon in the outline view
|
21
|
+
And I should see "selected_text" at 1 with the "method" icon in the outline view
|
22
|
+
And I select the outline view
|
23
|
+
Then the selected text should be " def selection_range_changed(start_offset, end_offset)\n"
|
@@ -38,10 +38,14 @@ When /^I select the outline view$/ do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
Then /^the outline view should have (no|\d+) entr(?:y|ies)$/ do |num|
|
42
|
-
Swt.sync_exec do
|
43
|
-
|
44
|
-
|
41
|
+
Then /^the outline view should have (no|some|\d+) entr(?:y|ies)$/ do |num|
|
42
|
+
Swt.sync_exec do
|
43
|
+
if num == "some"
|
44
|
+
outline_view_items.length.should > 0
|
45
|
+
else
|
46
|
+
num = (num == "no" ? 0 : num.to_i)
|
47
|
+
outline_view_items.length.should == num
|
48
|
+
end
|
45
49
|
end
|
46
50
|
end
|
47
51
|
|
@@ -7,6 +7,7 @@ module Redcar
|
|
7
7
|
Menu::Builder.build do
|
8
8
|
sub_menu "View" do
|
9
9
|
item "Current Document Outline", :command => OutlineView::OpenOutlineViewCommand, :priority => :first
|
10
|
+
item "Project Outline", :command => OutlineView::OpenProjectOutlineViewCommand, :priority => :first
|
10
11
|
end
|
11
12
|
end
|
12
13
|
end
|
@@ -14,9 +15,11 @@ module Redcar
|
|
14
15
|
def self.keymaps
|
15
16
|
linwin = Keymap.build("main", [:linux, :windows]) do
|
16
17
|
link "Ctrl+I", OutlineView::OpenOutlineViewCommand
|
18
|
+
link "Ctrl+Shift+I", OutlineView::OpenProjectOutlineViewCommand
|
17
19
|
end
|
18
20
|
osx = Keymap.build("main", [:osx]) do
|
19
21
|
link "Cmd+I", OutlineView::OpenOutlineViewCommand
|
22
|
+
link "Cmd+Shift+I", OutlineView::OpenProjectOutlineViewCommand
|
20
23
|
end
|
21
24
|
[linwin, osx]
|
22
25
|
end
|
@@ -37,30 +40,58 @@ module Redcar
|
|
37
40
|
def close
|
38
41
|
super
|
39
42
|
end
|
40
|
-
|
43
|
+
|
44
|
+
def paths_map
|
45
|
+
@paths_map ||= {}
|
46
|
+
end
|
47
|
+
|
48
|
+
def get_paths
|
49
|
+
[@document.path]
|
50
|
+
end
|
51
|
+
|
41
52
|
def update_list(filter)
|
42
|
-
|
43
|
-
file.
|
53
|
+
paths = get_paths
|
54
|
+
file = Declarations::File.new(paths.first)
|
55
|
+
file.add_tags_for_paths(paths)
|
44
56
|
re = make_regex(filter)
|
45
57
|
@last_list.clear
|
46
58
|
result = {}
|
47
|
-
file.tags.each do |name,
|
59
|
+
file.tags.each do |name, path, match|
|
48
60
|
if name =~ re
|
49
61
|
@last_list[match] = name
|
50
|
-
|
62
|
+
paths_map[match] = path
|
63
|
+
result[match] = {:name => name, :kind => Declarations.match_kind(path, match)}
|
51
64
|
end
|
52
65
|
end
|
53
66
|
result
|
54
67
|
end
|
55
|
-
|
68
|
+
|
56
69
|
def selected(match, closing=true)
|
57
70
|
if @last_list
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
71
|
+
if path = paths_map[match] and File.exists? path
|
72
|
+
close if closing
|
73
|
+
Redcar::Project::Manager.open_file(path)
|
74
|
+
Redcar.app.navigation_history.save(@document) if @document
|
75
|
+
DocumentSearch::FindNextRegex.new(Regexp.new(Regexp.quote(match)), true).run_in_focussed_tab_edit_view
|
76
|
+
Redcar.app.navigation_history.save(@document) if @document
|
77
|
+
end
|
62
78
|
end
|
63
79
|
end
|
64
80
|
end
|
81
|
+
|
82
|
+
class ProjectOutlineViewDialog < OutlineViewDialog
|
83
|
+
def initialize(project)
|
84
|
+
@project = project
|
85
|
+
if tab = Redcar.app.focussed_notebook_tab and tab.is_a? Redcar::EditTab
|
86
|
+
@document = tab.edit_view.document
|
87
|
+
end
|
88
|
+
self.controller = Redcar::OutlineViewSWT.new(self)
|
89
|
+
@last_list = {}
|
90
|
+
end
|
91
|
+
|
92
|
+
def get_paths
|
93
|
+
@project.all_files
|
94
|
+
end
|
95
|
+
end
|
65
96
|
end
|
66
97
|
end
|
@@ -21,7 +21,7 @@ module Redcar
|
|
21
21
|
composite = Swt::Widgets::Composite.new(parent, Swt::SWT::NONE)
|
22
22
|
layout = Swt::Layout::RowLayout.new(Swt::SWT::VERTICAL)
|
23
23
|
composite.setLayout(layout)
|
24
|
-
@text = Swt::Widgets::Text.new(composite, Swt::SWT::SINGLE | Swt::SWT::LEFT | Swt::SWT::ICON_CANCEL)
|
24
|
+
@text = Swt::Widgets::Text.new(composite, Swt::SWT::SINGLE | Swt::SWT::LEFT | Swt::SWT::ICON_CANCEL | Swt::SWT::SEARCH)
|
25
25
|
@text.set_layout_data(Swt::Layout::RowData.new(400, 20))
|
26
26
|
@list = Swt::Widgets::Table.new(composite, Swt::SWT::V_SCROLL | Swt::SWT::H_SCROLL | Swt::SWT::MULTI)
|
27
27
|
@list.set_layout_data(Swt::Layout::RowData.new(400, 200))
|
data/plugins/redcar/redcar.rb
CHANGED
@@ -999,6 +999,11 @@ Redcar.environment: #{Redcar.environment}
|
|
999
999
|
group(:priority => :last) do
|
1000
1000
|
item "About", AboutCommand
|
1001
1001
|
item "New In This Version", ChangelogCommand
|
1002
|
+
separator
|
1003
|
+
item "Check for Updates", :command => Application::ToggleCheckForUpdatesCommand,
|
1004
|
+
:type => :check,
|
1005
|
+
:active => Application::Updates.check_for_updates?
|
1006
|
+
item "Update Available", Application::OpenUpdateCommand
|
1002
1007
|
end
|
1003
1008
|
end
|
1004
1009
|
end
|
@@ -1054,12 +1059,14 @@ Redcar.environment: #{Redcar.environment}
|
|
1054
1059
|
Redcar.log.info("startup milestone: project open #{Time.now - Redcar.process_start_time}")
|
1055
1060
|
win.show if win and !args.include?("--no-window")
|
1056
1061
|
end
|
1057
|
-
Redcar.load_useful_libraries
|
1058
1062
|
Redcar.log.info("startup milestone: complete: #{Time.now - Redcar.process_start_time}")
|
1059
1063
|
if args.include?("--compute-textmate-cache-and-quit")
|
1060
1064
|
Redcar::Textmate.all_bundles
|
1061
1065
|
exit
|
1062
1066
|
end
|
1067
|
+
Thread.new do
|
1068
|
+
Application.check_for_new_version
|
1069
|
+
end
|
1063
1070
|
rescue => e
|
1064
1071
|
Redcar.log.error("error in startup: #{e.inspect}")
|
1065
1072
|
e.backtrace.each do |line|
|
@@ -17,11 +17,10 @@ module Redcar
|
|
17
17
|
@composite, @model = composite, model
|
18
18
|
color = ApplicationSWT.tree_background.swt_colors.first
|
19
19
|
font_data = @composite.font.font_data.first
|
20
|
-
font_size = Redcar.platform == :osx ? 14 : 12
|
21
20
|
font = Swt::Graphics::Font.new(
|
22
21
|
ApplicationSWT.display,
|
23
22
|
font_data.name,
|
24
|
-
|
23
|
+
ApplicationSWT.tree_font_size,
|
25
24
|
Swt::SWT::NORMAL)
|
26
25
|
@composite.background = color
|
27
26
|
tree_style = Swt::SWT::MULTI | Swt::SWT::H_SCROLL | Swt::SWT::V_SCROLL
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redcar-dev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.20dev
|
5
5
|
prerelease: 7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
13
|
-
default_executable:
|
12
|
+
date: 2011-12-28 00:00:00.000000000Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: ffi
|
17
|
-
requirement: &
|
16
|
+
requirement: &70276952256600 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
18
|
requirements:
|
20
19
|
- - =
|
@@ -22,10 +21,10 @@ dependencies:
|
|
22
21
|
version: 1.0.10
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
24
|
+
version_requirements: *70276952256600
|
26
25
|
- !ruby/object:Gem::Dependency
|
27
26
|
name: git
|
28
|
-
requirement: &
|
27
|
+
requirement: &70276952239680 !ruby/object:Gem::Requirement
|
29
28
|
none: false
|
30
29
|
requirements:
|
31
30
|
- - ! '>='
|
@@ -33,10 +32,10 @@ dependencies:
|
|
33
32
|
version: '0'
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: *
|
35
|
+
version_requirements: *70276952239680
|
37
36
|
- !ruby/object:Gem::Dependency
|
38
37
|
name: json
|
39
|
-
requirement: &
|
38
|
+
requirement: &70276952235000 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
40
|
requirements:
|
42
41
|
- - ! '>='
|
@@ -44,10 +43,10 @@ dependencies:
|
|
44
43
|
version: '0'
|
45
44
|
type: :runtime
|
46
45
|
prerelease: false
|
47
|
-
version_requirements: *
|
46
|
+
version_requirements: *70276952235000
|
48
47
|
- !ruby/object:Gem::Dependency
|
49
48
|
name: spoon
|
50
|
-
requirement: &
|
49
|
+
requirement: &70276952232600 !ruby/object:Gem::Requirement
|
51
50
|
none: false
|
52
51
|
requirements:
|
53
52
|
- - ! '>='
|
@@ -55,10 +54,10 @@ dependencies:
|
|
55
54
|
version: '0'
|
56
55
|
type: :runtime
|
57
56
|
prerelease: false
|
58
|
-
version_requirements: *
|
57
|
+
version_requirements: *70276952232600
|
59
58
|
- !ruby/object:Gem::Dependency
|
60
59
|
name: lucene
|
61
|
-
requirement: &
|
60
|
+
requirement: &70276952228960 !ruby/object:Gem::Requirement
|
62
61
|
none: false
|
63
62
|
requirements:
|
64
63
|
- - ~>
|
@@ -66,10 +65,10 @@ dependencies:
|
|
66
65
|
version: 0.5.0.beta.1
|
67
66
|
type: :runtime
|
68
67
|
prerelease: false
|
69
|
-
version_requirements: *
|
68
|
+
version_requirements: *70276952228960
|
70
69
|
- !ruby/object:Gem::Dependency
|
71
70
|
name: net-ssh
|
72
|
-
requirement: &
|
71
|
+
requirement: &70276952225780 !ruby/object:Gem::Requirement
|
73
72
|
none: false
|
74
73
|
requirements:
|
75
74
|
- - ! '>='
|
@@ -77,10 +76,10 @@ dependencies:
|
|
77
76
|
version: '0'
|
78
77
|
type: :runtime
|
79
78
|
prerelease: false
|
80
|
-
version_requirements: *
|
79
|
+
version_requirements: *70276952225780
|
81
80
|
- !ruby/object:Gem::Dependency
|
82
81
|
name: net-sftp
|
83
|
-
requirement: &
|
82
|
+
requirement: &70276952222080 !ruby/object:Gem::Requirement
|
84
83
|
none: false
|
85
84
|
requirements:
|
86
85
|
- - ! '>='
|
@@ -88,10 +87,10 @@ dependencies:
|
|
88
87
|
version: '0'
|
89
88
|
type: :runtime
|
90
89
|
prerelease: false
|
91
|
-
version_requirements: *
|
90
|
+
version_requirements: *70276952222080
|
92
91
|
- !ruby/object:Gem::Dependency
|
93
92
|
name: net-ftp-list
|
94
|
-
requirement: &
|
93
|
+
requirement: &70276952213220 !ruby/object:Gem::Requirement
|
95
94
|
none: false
|
96
95
|
requirements:
|
97
96
|
- - ! '>='
|
@@ -99,10 +98,10 @@ dependencies:
|
|
99
98
|
version: '0'
|
100
99
|
type: :runtime
|
101
100
|
prerelease: false
|
102
|
-
version_requirements: *
|
101
|
+
version_requirements: *70276952213220
|
103
102
|
- !ruby/object:Gem::Dependency
|
104
103
|
name: jruby-openssl
|
105
|
-
requirement: &
|
104
|
+
requirement: &70276952209620 !ruby/object:Gem::Requirement
|
106
105
|
none: false
|
107
106
|
requirements:
|
108
107
|
- - ! '>='
|
@@ -110,10 +109,10 @@ dependencies:
|
|
110
109
|
version: '0'
|
111
110
|
type: :runtime
|
112
111
|
prerelease: false
|
113
|
-
version_requirements: *
|
112
|
+
version_requirements: *70276952209620
|
114
113
|
- !ruby/object:Gem::Dependency
|
115
114
|
name: ruby-blockcache
|
116
|
-
requirement: &
|
115
|
+
requirement: &70276952205340 !ruby/object:Gem::Requirement
|
117
116
|
none: false
|
118
117
|
requirements:
|
119
118
|
- - ! '>='
|
@@ -121,10 +120,10 @@ dependencies:
|
|
121
120
|
version: '0'
|
122
121
|
type: :runtime
|
123
122
|
prerelease: false
|
124
|
-
version_requirements: *
|
123
|
+
version_requirements: *70276952205340
|
125
124
|
- !ruby/object:Gem::Dependency
|
126
125
|
name: bouncy-castle-java
|
127
|
-
requirement: &
|
126
|
+
requirement: &70276952203300 !ruby/object:Gem::Requirement
|
128
127
|
none: false
|
129
128
|
requirements:
|
130
129
|
- - ! '>='
|
@@ -132,10 +131,10 @@ dependencies:
|
|
132
131
|
version: '0'
|
133
132
|
type: :runtime
|
134
133
|
prerelease: false
|
135
|
-
version_requirements: *
|
134
|
+
version_requirements: *70276952203300
|
136
135
|
- !ruby/object:Gem::Dependency
|
137
136
|
name: swt
|
138
|
-
requirement: &
|
137
|
+
requirement: &70276952200560 !ruby/object:Gem::Requirement
|
139
138
|
none: false
|
140
139
|
requirements:
|
141
140
|
- - ! '>='
|
@@ -143,10 +142,10 @@ dependencies:
|
|
143
142
|
version: '0'
|
144
143
|
type: :runtime
|
145
144
|
prerelease: false
|
146
|
-
version_requirements: *
|
145
|
+
version_requirements: *70276952200560
|
147
146
|
- !ruby/object:Gem::Dependency
|
148
147
|
name: plugin_manager
|
149
|
-
requirement: &
|
148
|
+
requirement: &70276952194200 !ruby/object:Gem::Requirement
|
150
149
|
none: false
|
151
150
|
requirements:
|
152
151
|
- - ! '>='
|
@@ -154,10 +153,10 @@ dependencies:
|
|
154
153
|
version: '0'
|
155
154
|
type: :runtime
|
156
155
|
prerelease: false
|
157
|
-
version_requirements: *
|
156
|
+
version_requirements: *70276952194200
|
158
157
|
- !ruby/object:Gem::Dependency
|
159
158
|
name: redcar-icons
|
160
|
-
requirement: &
|
159
|
+
requirement: &70276952187080 !ruby/object:Gem::Requirement
|
161
160
|
none: false
|
162
161
|
requirements:
|
163
162
|
- - ! '>='
|
@@ -165,10 +164,10 @@ dependencies:
|
|
165
164
|
version: '0'
|
166
165
|
type: :runtime
|
167
166
|
prerelease: false
|
168
|
-
version_requirements: *
|
167
|
+
version_requirements: *70276952187080
|
169
168
|
- !ruby/object:Gem::Dependency
|
170
169
|
name: redcar-jruby
|
171
|
-
requirement: &
|
170
|
+
requirement: &70276952184080 !ruby/object:Gem::Requirement
|
172
171
|
none: false
|
173
172
|
requirements:
|
174
173
|
- - ! '>='
|
@@ -176,10 +175,10 @@ dependencies:
|
|
176
175
|
version: '0'
|
177
176
|
type: :runtime
|
178
177
|
prerelease: false
|
179
|
-
version_requirements: *
|
178
|
+
version_requirements: *70276952184080
|
180
179
|
- !ruby/object:Gem::Dependency
|
181
180
|
name: redcar-svnkit
|
182
|
-
requirement: &
|
181
|
+
requirement: &70276952176800 !ruby/object:Gem::Requirement
|
183
182
|
none: false
|
184
183
|
requirements:
|
185
184
|
- - ! '>='
|
@@ -187,10 +186,10 @@ dependencies:
|
|
187
186
|
version: '0'
|
188
187
|
type: :runtime
|
189
188
|
prerelease: false
|
190
|
-
version_requirements: *
|
189
|
+
version_requirements: *70276952176800
|
191
190
|
- !ruby/object:Gem::Dependency
|
192
191
|
name: redcar-bundles
|
193
|
-
requirement: &
|
192
|
+
requirement: &70276952173440 !ruby/object:Gem::Requirement
|
194
193
|
none: false
|
195
194
|
requirements:
|
196
195
|
- - ! '>='
|
@@ -198,10 +197,10 @@ dependencies:
|
|
198
197
|
version: '0'
|
199
198
|
type: :runtime
|
200
199
|
prerelease: false
|
201
|
-
version_requirements: *
|
200
|
+
version_requirements: *70276952173440
|
202
201
|
- !ruby/object:Gem::Dependency
|
203
202
|
name: redcar-javamateview
|
204
|
-
requirement: &
|
203
|
+
requirement: &70276952171240 !ruby/object:Gem::Requirement
|
205
204
|
none: false
|
206
205
|
requirements:
|
207
206
|
- - ! '>='
|
@@ -209,21 +208,21 @@ dependencies:
|
|
209
208
|
version: '0'
|
210
209
|
type: :runtime
|
211
210
|
prerelease: false
|
212
|
-
version_requirements: *
|
211
|
+
version_requirements: *70276952171240
|
213
212
|
- !ruby/object:Gem::Dependency
|
214
213
|
name: cucumber
|
215
|
-
requirement: &
|
214
|
+
requirement: &70276952164620 !ruby/object:Gem::Requirement
|
216
215
|
none: false
|
217
216
|
requirements:
|
218
|
-
- -
|
217
|
+
- - =
|
219
218
|
- !ruby/object:Gem::Version
|
220
|
-
version:
|
219
|
+
version: 1.1.2
|
221
220
|
type: :development
|
222
221
|
prerelease: false
|
223
|
-
version_requirements: *
|
222
|
+
version_requirements: *70276952164620
|
224
223
|
- !ruby/object:Gem::Dependency
|
225
224
|
name: rspec
|
226
|
-
requirement: &
|
225
|
+
requirement: &70276952162840 !ruby/object:Gem::Requirement
|
227
226
|
none: false
|
228
227
|
requirements:
|
229
228
|
- - ! '>='
|
@@ -231,10 +230,10 @@ dependencies:
|
|
231
230
|
version: '0'
|
232
231
|
type: :development
|
233
232
|
prerelease: false
|
234
|
-
version_requirements: *
|
233
|
+
version_requirements: *70276952162840
|
235
234
|
- !ruby/object:Gem::Dependency
|
236
235
|
name: watchr
|
237
|
-
requirement: &
|
236
|
+
requirement: &70276952160840 !ruby/object:Gem::Requirement
|
238
237
|
none: false
|
239
238
|
requirements:
|
240
239
|
- - ! '>='
|
@@ -242,7 +241,7 @@ dependencies:
|
|
242
241
|
version: '0'
|
243
242
|
type: :development
|
244
243
|
prerelease: false
|
245
|
-
version_requirements: *
|
244
|
+
version_requirements: *70276952160840
|
246
245
|
description: ''
|
247
246
|
email:
|
248
247
|
- dan@fluentradical.com
|
@@ -321,6 +320,7 @@ files:
|
|
321
320
|
- plugins/application/lib/application/tree/mirror.rb
|
322
321
|
- plugins/application/lib/application/tree.rb
|
323
322
|
- plugins/application/lib/application/treebook.rb
|
323
|
+
- plugins/application/lib/application/updates.rb
|
324
324
|
- plugins/application/lib/application/window.rb
|
325
325
|
- plugins/application/lib/application.rb
|
326
326
|
- plugins/application/plugin.rb
|
@@ -630,6 +630,7 @@ files:
|
|
630
630
|
- plugins/open_default_app/plugin.rb
|
631
631
|
- plugins/open_default_app/screenshot.png
|
632
632
|
- plugins/outline_view/features/outline_view.feature
|
633
|
+
- plugins/outline_view/features/project_outline.feature
|
633
634
|
- plugins/outline_view/features/step_definitions/outline_steps.rb
|
634
635
|
- plugins/outline_view/lib/outline_view/commands.rb
|
635
636
|
- plugins/outline_view/lib/outline_view.rb
|
@@ -911,7 +912,6 @@ files:
|
|
911
912
|
- plugins/web_bookmarks/plugin.rb
|
912
913
|
- plugins/web_bookmarks/Screenshot.png
|
913
914
|
- Gemfile
|
914
|
-
has_rdoc: true
|
915
915
|
homepage: http://github.com/danlucraft/redcar
|
916
916
|
licenses: []
|
917
917
|
post_install_message:
|
@@ -932,7 +932,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
932
932
|
version: 1.3.1
|
933
933
|
requirements: []
|
934
934
|
rubyforge_project:
|
935
|
-
rubygems_version: 1.
|
935
|
+
rubygems_version: 1.8.10
|
936
936
|
signing_key:
|
937
937
|
specification_version: 3
|
938
938
|
summary: A pure Ruby text editor
|