31 |
|
|
32 |
def EditPane.start(plugin) |
def EditPane.start(plugin) |
33 |
base_slot = plugin["/system/ui/components/EditPane"] |
base_slot = plugin["/system/ui/components/EditPane"] |
34 |
|
|
35 |
plugin['actions/all_breakpoints'].set_proc do |
cmd_mgr = plugin["/system/ui/commands"].manager |
36 |
result = {} |
|
37 |
plugin['properties/breakpoints'].each_slot do |slot| |
cmd_mgr.add("EditPane/GetAllBreakpoints", "Get All Breakpoints") do |cmd_slot| |
38 |
file = slot.data |
result = {} |
39 |
lines = slot['lines'].data |
plugin['properties/breakpoints'].each_slot do |slot| |
40 |
result[file] = lines |
file = slot.data |
41 |
end |
lines = slot['lines'].data |
42 |
result |
result[file] = lines |
43 |
end |
end |
44 |
|
result |
45 |
plugin['actions/clear_breakpoints'].set_proc do |
end |
46 |
plugin.properties.prune('breakpoints') |
|
47 |
end |
cmd_mgr.add("EditPane/ClearAllBreakpoints", "&Clear All Breakpoints") do |cmd_slot| |
48 |
|
plugin.properties.prune('breakpoints') |
49 |
plugin['actions/breakpoints_for_file'].set_proc do |file| |
end |
50 |
|
|
51 |
|
cmd_mgr.add("EditPane/GetBreakpointsForFile", "Get File Breakpoints") do |cmd_slot, file| |
52 |
slot = nil |
slot = nil |
53 |
plugin['properties/breakpoints'].each_slot do |bp_slot| |
plugin['properties/breakpoints'].each_slot do |bp_slot| |
54 |
if bp_slot.data == file |
if bp_slot.data == file |
55 |
slot = bp_slot |
slot = bp_slot |
56 |
break |
break |
59 |
lines = slot['lines'].data unless slot.nil? |
lines = slot['lines'].data unless slot.nil? |
60 |
end |
end |
61 |
|
|
62 |
plugin['actions/find_file'].set_proc do |file| |
cmd_mgr.add("EditPane/FindFile", "Find EditPane Slot for File") do |cmd_slot, file| |
63 |
slot = nil |
slot = nil |
64 |
plugin['/system/ui/components/EditPane'].each_slot do |ep_slot| |
plugin['/system/ui/components/EditPane'].each_slot do |ep_slot| |
65 |
if ep_slot.data == file |
if ep_slot.data == file |
66 |
slot = ep_slot |
slot = ep_slot |
67 |
break |
break |
70 |
slot |
slot |
71 |
end |
end |
72 |
|
|
73 |
|
|
74 |
ComponentManager.new(plugin, base_slot, EditPane) |
ComponentManager.new(plugin, base_slot, EditPane) |
75 |
plugin.transition(FreeBASE::RUNNING) |
plugin.transition(FreeBASE::RUNNING) |
76 |
end |
end |