Interface IViewRender
- All Known Implementing Classes:
ViewRender
public interface IViewRender
Interface for rendering HTML-based views in the application.
This interface defines methods for dynamically building HTML content and reading resource files (e.g., JavaScript and CSS) from the plugin's bundle. Implementations of this interface are responsible for creating and managing the HTML views used in the application.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the HTML content for the view.getResourceContent
(String filename) Reads the content of a resource file located in the plugin's bundle.
-
Method Details
-
build
String build()Builds the HTML content for the view.This method dynamically includes JavaScript and CSS resources by reading their contents from the plugin's resources. The generated HTML contains a placeholder for chat interactions and user instructions.
- Returns:
- the complete HTML content as a
String
.
-
getResourceContent
Reads the content of a resource file located in the plugin's bundle.This method resolves the file path using the plugin's bundle, reads the file content line by line, and returns the content as a single string.
- Parameters:
filename
- the name of the file to read from theresources/views
directory.- Returns:
- the content of the file as a
String
, or an empty string if an error occurs.
-