Package com.vaadin.copilot.ide
Class IdeHandler
java.lang.Object
com.vaadin.copilot.CopilotCommand
com.vaadin.copilot.ide.IdeHandler
-
Field Summary
Fields inherited from class com.vaadin.copilot.CopilotCommand
currentSession, KEY_CANCEL_REQ_ID, KEY_REQ_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleConnect(com.vaadin.base.devserver.DevToolsInterface devToolsInterface) Called when a new browser (tab) connects to the server.booleanhandleMessage(String command, tools.jackson.databind.JsonNode data, com.vaadin.base.devserver.DevToolsInterface devToolsInterface) Called whenever there is a message from the browser.Methods inherited from class com.vaadin.copilot.CopilotCommand
canBeParallelCommand, getProjectFileManager, getVaadinContext, getVaadinSession
-
Constructor Details
-
IdeHandler
-
-
Method Details
-
handleConnect
public void handleConnect(com.vaadin.base.devserver.DevToolsInterface devToolsInterface) Description copied from class:CopilotCommandCalled when a new browser (tab) connects to the server. Override to add logic that should run on every connect.- Overrides:
handleConnectin classCopilotCommand- Parameters:
devToolsInterface- the devtools interface for the new connection
-
handleMessage
public boolean handleMessage(String command, tools.jackson.databind.JsonNode data, com.vaadin.base.devserver.DevToolsInterface devToolsInterface) Description copied from class:CopilotCommandCalled whenever there is a message from the browser. Implementations should check if the command is for them, handle it and return true if the command was handled.- Specified by:
handleMessagein classCopilotCommand- Parameters:
command- the command to handledata- the data for the commanddevToolsInterface- the devtools interface for the connection- Returns:
- true if the command was handled, false otherwise
-