35 |
base_slot = plugin["/system/ui/components/Debugger"] |
base_slot = plugin["/system/ui/components/Debugger"] |
36 |
ComponentManager.new(plugin, base_slot, Debugger, 1) |
ComponentManager.new(plugin, base_slot, Debugger, 1) |
37 |
|
|
38 |
# Create the Debug menu item and associate a command with it |
# Create the Debug menu item and associate a command with it |
39 |
cmd_mgr = plugin['/system/ui/commands'].manager |
cmd_mgr = plugin['/system/ui/commands'].manager |
|
key_mgr = plugin['/system/ui/keys'].manager |
|
40 |
|
|
41 |
debugger = nil |
debugger = nil |
42 |
cmd = cmd_mgr.add("App/View/Debugger", "&Debugger") do |cmd_slot| |
session = nil |
43 |
|
cmd = cmd_mgr.add("App/Run/Debugger", "&Debugger") do |cmd_slot| |
44 |
unless session |
unless session |
45 |
debugger = cmd_slot["/system/ui/components/Debugger"].manager.add("debug") |
debugger = cmd_slot["/system/ui/components/Debugger"].manager.add("debug") |
46 |
session |
session = Debugger.new(plugin,slot) |
47 |
end |
end |
48 |
end |
end |
|
|
|
|
# Insert the debugger menu item in the run menu... |
|
|
viewmenu = plugin["/system/ui/components/MenuPane/View_menu"].manager |
|
|
viewmenu.add_command("App/View/Debugger") |
|
|
viewmenu.uncheck("App/View/Debugger") |
|
|
|
|
|
key_mgr.bind("/App/View/Debugger", :F10) |
|
|
|
|
49 |
|
|
|
=begin |
|
50 |
cmd.availability=false |
cmd.availability=false |
51 |
cmd.manage_availability do |command| |
cmd.manage_availability do |command| |
52 |
plugin['/system/ui/current'].subscribe do |event, slot| |
plugin['/system/ui/current'].subscribe do |event, slot| |
61 |
end |
end |
62 |
end |
end |
63 |
|
|
64 |
|
# Insert the debugger menu item in the run menu and bind it |
65 |
|
# to the F10 key |
66 |
|
runmenu = plugin["/system/ui/components/MenuPane/Run_menu"].manager |
67 |
|
runmenu.add_command("App/Run/Debugger") |
68 |
|
runmenu.uncheck("App/Run/Debugger") |
69 |
|
|
70 |
|
key_mgr = plugin['/system/ui/keys'].manager |
71 |
|
key_mgr.bind("/App/Run/Debugger", :F10) |
72 |
|
|
73 |
|
|
74 |
# the Debugger service instantiate a new debugger session (generally invoked |
# the Debugger service instantiate a new debugger session (generally invoked |
75 |
# from the Run menu) |
# from the Run menu) |
76 |
# Create the debugger session and attach it to the dockpane slot. |
# Create the debugger session and attach it to the dockpane slot. |
77 |
# This will make the debugger session UI appear in the Debugger dockpane |
# This will make the debugger session UI appear in the Debugger dockpane |
78 |
cmd_mgr.add("App/Services/Debugger", "Start Debug Session") do |cmd_slot| |
#cmd_mgr.add("App/Run/Debugger", "Start Debug Session") do |cmd_slot| |
79 |
|
# |
80 |
end |
#end |
81 |
=end |
|
82 |
|
|
83 |
# Now only is the plugin running |
# Now only is the plugin running |
84 |
plugin.transition(FreeBASE::RUNNING) |
plugin.transition(FreeBASE::RUNNING) |