Class IDE

java.lang.Object
uno.anahata.ai.nb.tools.IDE

public class IDE extends Object
Provides tools for interacting with the NetBeans IDE, such as reading logs and scanning for project alerts.
  • 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

      public static ProjectDiagnostics getProjectAlerts(String projectId) throws Exception
      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.