Class IDE
java.lang.Object
uno.anahata.ai.nb.tools.IDE
Provides tools for interacting with the NetBeans IDE, such as reading logs and scanning for project alerts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReads the NetBeans IDE's log file (messages.log) with optional filtering and pagination.static ProjectDiagnosticsgetProjectAlerts(String projectId) Performs a live scan of a specific project to find all high-level project problems and Java source file errors/warnings.
-
Constructor Details
-
IDE
public IDE()
-
-
Method Details
-
getLogs
public static String getLogs(String grepPattern, int startIndex, int pageSize, int maxLineLength) throws Exception Reads the NetBeans IDE's log file (messages.log) with optional filtering and pagination.- Parameters:
grepPattern- A regex pattern to filter log lines.startIndex- The starting line number (0-based) for pagination.pageSize- The number of lines to return.maxLineLength- The maximum length of each line.- Returns:
- a string containing the processed log content.
- Throws:
Exception- if an error occurs.
-
getProjectAlerts
Performs a live scan of a specific project to find all high-level project problems and Java source file errors/warnings.- Parameters:
projectId- The ID of the project to scan.- Returns:
- a ProjectDiagnostics object containing the found alerts.
- Throws:
Exception- if an error occurs.
-
