redcar 0.3.4.2 → 0.3.4.3

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/Rakefile CHANGED
@@ -75,7 +75,7 @@ end
75
75
 
76
76
  spec = Gem::Specification.new do |s|
77
77
  s.name = "redcar"
78
- s.version = "0.3.4.2"
78
+ s.version = "0.3.4.3"
79
79
  s.summary = "A JRuby text editor."
80
80
  s.author = "Daniel Lucraft"
81
81
  s.email = "dan@fluentradical.com"
@@ -220,7 +220,7 @@ module Redcar
220
220
  end
221
221
 
222
222
  Redcar.app.add_listener(:focussed) do
223
- @window_trees.values.each {|tree| tree.refresh}
223
+ window_trees.values.each {|tree| tree.refresh }
224
224
  end
225
225
  end
226
226
 
@@ -236,7 +236,7 @@ module Redcar
236
236
  end
237
237
 
238
238
  def self.set_tree(win, tree)
239
- @window_trees[win] = tree
239
+ window_trees[win] = tree
240
240
  win.treebook.add_tree(tree)
241
241
  end
242
242
 
@@ -0,0 +1,33 @@
1
+
2
+ module Redcar
3
+ class Debug
4
+ def self.menus
5
+ Menu::Builder.build do
6
+ sub_menu "Debug" do
7
+ sub_menu "Profile" do
8
+ item "Start", Debug::StartProfilingCommand
9
+ item "Stop", Debug::StopProfilingCommand
10
+ end
11
+ end
12
+ end
13
+ end
14
+
15
+ class StartProfilingCommand < Redcar::Command
16
+ def execute
17
+ require 'profiler'
18
+ Profiler__::start_profile
19
+ end
20
+ end
21
+
22
+ class StopProfilingCommand < Redcar::Command
23
+ def execute
24
+ str = StringIO.new
25
+ Profiler__::print_profile(str)
26
+ new_tab = Top::NewCommand.new.run
27
+ str.rewind
28
+ new_tab.document.text = str.read
29
+ new_tab.title= "Profile #{Time.now}"
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,8 @@
1
+
2
+ Plugin.define do
3
+ name "redcar_debug"
4
+ version "1.0"
5
+ file "lib", "redcar_debug"
6
+ object "Redcar::Debug"
7
+ dependencies "redcar", ">0"
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redcar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4.2
4
+ version: 0.3.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lucraft
@@ -700,6 +700,8 @@ files:
700
700
  - plugins/redcar/redcar.rb
701
701
  - plugins/redcar/spec/redcar/redcar_spec.rb
702
702
  - plugins/redcar/spec/spec_helper.rb
703
+ - plugins/redcar_debug/lib/redcar_debug.rb
704
+ - plugins/redcar_debug/plugin.rb
703
705
  - plugins/repl/lib/repl/internal_mirror.rb
704
706
  - plugins/repl/lib/repl.rb
705
707
  - plugins/repl/plugin.rb