com.vaadin.copilot.ide.
Class CopilotIDEPlugin
IDE plugin support utility
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic CopilotIDEPlugin
Gets instance of CopilotIDEPlugin.
boolean
isActive()
Check if plugin is active based on existing properties file
void
Performs Redo for given files
void
refresh()
Sends request to synchronize project files with filesystem
static void
setProjectRoot
(Path projectRoot) Sets project root
void
Opens editor and places caret on given line and column
boolean
supports
(CopilotIDEPlugin.Commands command) Checks if given command is supported by plugin
void
Performs Undo for given files
static String
void
writeBase64File
(File file, String undoLabel, String content) Calls plugin writeBase64 file operation
void
Calls plugin write file operation
-
Method Details
-
getInstance
Gets instance of CopilotIDEPlugin. Project root must be set before.
Returns:
gets or create new instance of CopilotIDEPlugin
-
setProjectRoot
Sets project root
Parameters:
projectRoot
- project root path -
isActive
public boolean isActive()Check if plugin is active based on existing properties file
Returns:
true if active, false otherwise
-
getProperties
-
writeFile
Calls plugin write file operation
Parameters:
file
- file to be writtenundoLabel
- custom undo labelcontent
- file contentThrows:
IOException
- exception if command cannot be serialized -
writeBase64File
Calls plugin writeBase64 file operation
Parameters:
file
- file to be writtenundoLabel
- custom undo labelcontent
- file contents as base 64 encoded stringThrows:
IOException
- exception if command cannot be serialized -
undo
Performs Undo for given files
Parameters:
files
- list of files to perform undoThrows:
IOException
- thrown on exception -
redo
Performs Redo for given files
Parameters:
files
- list of files to perform redoThrows:
IOException
- thrown on exception -
showInIde
Opens editor and places caret on given line and column
Parameters:
line
- line number, use 0 as first linecolumn
- column number to put caret before, 0 as first columnThrows:
IOException
- thrown on exception -
refresh
Sends request to synchronize project files with filesystem
Throws:
IOException
- thrown on exception -
supports
Checks if given command is supported by plugin
Parameters:
command
- command to be checkedReturns:
true if supported, false otherwise
-
undoLabel
-