Method: Buby::MessageEditorTab#isEnabled

Defined in:
lib/buby/message_editor_tab.rb

#isEnabled(content, isRequest = true) ⇒ Boolean

Deprecated.

This will become a raw version/proxied version pair like ContextMenuFactory#createMenuItems in 2.0.

The hosting editor will invoke this method before it displays a new HTTP message, so that the custom tab can indicate whether it should be enabled for that message.

Parameters:

  • content (Array<byte>)

    The message that is about to be displayed.

  • isRequest (Boolean) (defaults to: true)

    Indicates whether the message is a request or a response.

Returns:

  • (Boolean)

    The method should return true if the custom tab is able to handle the specified message, and so will be displayed within the editor. Otherwise, the tab will be hidden while this message is displayed.

Raises:

  • (NotImplementedError)


58
59
60
61
# File 'lib/buby/message_editor_tab.rb', line 58

def isEnabled(content, isRequest = true)
  content = String.from_java_bytes content
  raise NotImplementedError
end