Class: MateExample::ReplaceContents3

Inherits:
Jface::Action
  • Object
show all
Defined in:
lib/javamateview/example.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#windowObject

Returns the value of attribute window.



308
309
310
# File 'lib/javamateview/example.rb', line 308

def window
  @window
end

Instance Method Details

#runObject



310
311
312
313
314
315
316
# File 'lib/javamateview/example.rb', line 310

def run
  src = File.read("lib/example/jquery-142min.js")
  s = Time.now
  @window.mate_text.getMateDocument.set(src)
  puts "parse took #{Time.now - s}s"
  puts "num scopes: #{@window.mate_text.parser.root.count_descendants}"
end