Sha256: a317c70c6fdcea9a319c9f50ad54dc85bd225c5506134ec0cb6f3af15f73d9a4

Contents?: true

Size: 799 Bytes

Versions: 6

Compression:

Stored size: 799 Bytes

Contents

require 'buby/burp_extender/context_menu_item'

# @api private
class BurpExtender
  # @api private
  class ContextMenu < Java::JavaxSwing::JMenu
    attr_accessor :burp, :invocation
    def initialize burp_extender, invocation
      @burp = burp_extender
      @invocation = invocation
      super 'Buby'

      if @burp.frame
        self.add(ContextMenuItem.new('Move console to tab', @burp, @invocation) do |event|
          burp = event.source.burp
          invocation = event.source.invocation
          burp.move_to_tab
        end)
      else
        self.add(ContextMenuItem.new('Move console to window', @burp, @invocation) do |event|
          burp = event.source.burp
          invocation = event.source.invocation
          burp.move_to_window
        end)

      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
buby-1.6.0-java lib/buby/burp_extender/context_menu.rb
buby-1.5.2-java lib/buby/burp_extender/context_menu.rb
buby-1.5.1-java lib/buby/burp_extender/context_menu.rb
buby-1.5.0-java lib/buby/burp_extender/context_menu.rb
buby-1.5.0.pre4-java lib/buby/burp_extender/context_menu.rb
buby-1.5.0.pre3-java lib/buby/burp_extender/context_menu.rb