show source better
still wip
This commit is contained in:
parent
4c342d064d
commit
509aff9552
@ -25,7 +25,7 @@ class DebugServer < Opal::Server
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
run Opal::Server.new { |s|
|
run Opal::Sprockets::Server.new { |s|
|
||||||
s.main = 'debugger.js.rb'
|
s.main = 'debugger.js.rb'
|
||||||
s.append_path 'lib'
|
s.append_path 'lib'
|
||||||
s.append_path 'assets'
|
s.append_path 'assets'
|
||||||
|
@ -36,7 +36,8 @@ class InstructionView < ListView
|
|||||||
|
|
||||||
def instruction_text
|
def instruction_text
|
||||||
return "" unless @interpreter.instruction
|
return "" unless @interpreter.instruction
|
||||||
@interpreter.instruction.to_s
|
text = @interpreter.instruction.to_s
|
||||||
|
text.split("(").first
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -45,7 +45,7 @@ class ObjectView < ListView
|
|||||||
end
|
end
|
||||||
|
|
||||||
def content_elements
|
def content_elements
|
||||||
fields = [ConstantView.new("li" , "----------------------------------")]
|
fields = [ConstantView.new("li" , "---------------------------------")]
|
||||||
object = @object
|
object = @object
|
||||||
if object and ! object.is_a?(String)
|
if object and ! object.is_a?(String)
|
||||||
object.get_instance_variables.each do |variable|
|
object.get_instance_variables.each do |variable|
|
||||||
|
@ -20,13 +20,13 @@ class SourceView < ElementView
|
|||||||
update_method
|
update_method
|
||||||
case i.source
|
case i.source
|
||||||
when Mom::Instruction
|
when Mom::Instruction
|
||||||
id = i.source.object_id.to_s(16)
|
@ticker.text = i.source.class.name
|
||||||
if e = @text.at_css("#i#{id}")
|
# if e = @text.at_css("#i#{id}")
|
||||||
if (old = @text.at_css(".fade_in"))
|
# if (old = @text.at_css(".fade_in"))
|
||||||
old.remove_class("fade_in")
|
# old.remove_class("fade_in")
|
||||||
end
|
# end
|
||||||
e.add_class "fade_in"
|
# e.add_class "fade_in"
|
||||||
end
|
# end
|
||||||
when String
|
when String
|
||||||
@ticker.text = i.source
|
@ticker.text = i.source
|
||||||
when Risc::Instruction
|
when Risc::Instruction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user