Package com.vaadin.copilot.ide
Class CopilotIDEPlugin
java.lang.Object
com.vaadin.copilot.ide.CopilotIDEPlugin
IDE plugin support utility
-
Method Summary
Modifier and TypeMethodDescriptionstatic CopilotIDEPluginGets instance of CopilotIDEPlugin.booleanisActive()Check if plugin is active based on existing properties filevoidPerforms Redo for given filesvoidrefresh()Sends request to synchronize project files with filesystemstatic voidsetProjectRoot(Path projectRoot) Sets project rootvoidOpens editor and places caret on given line and columnvoidPerforms Undo for given filesstatic StringvoidCalls 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 content- Throws:
IOException- exception if command cannot be serialized
-
undo
Performs Undo for given files- Parameters:
files- list of files to perform undo- Throws:
IOException- thrown on exception
-
redo
Performs Redo for given files- Parameters:
files- list of files to perform redo- Throws:
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 column- Throws:
IOException- thrown on exception
-
refresh
Sends request to synchronize project files with filesystem- Throws:
IOException- thrown on exception
-
undoLabel
-