Class: BurpExtender::ContextMenu Private

Inherits:
Java::JavaxSwing::JMenu
  • Object
show all
Defined in:
lib/buby/burp_extender/context_menu.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(burp_extender, invocation) ⇒ ContextMenu

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ContextMenu.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/buby/burp_extender/context_menu.rb', line 8

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

Instance Attribute Details

#burpObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
# File 'lib/buby/burp_extender/context_menu.rb', line 7

def burp
  @burp
end

#invocationObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
# File 'lib/buby/burp_extender/context_menu.rb', line 7

def invocation
  @invocation
end