Class NetBeansTopComponents

java.lang.Object
uno.anahata.asi.nb.tools.ide.NetBeansTopComponents

public final class NetBeansTopComponents extends Object
Static utility for gathering information about open TopComponents (windows) in NetBeans.

This utility provides a comprehensive snapshot of the IDE's windowing state, including metadata about open editors, explorer views, and output windows. It extracts detailed information such as project ownership, active node selections, and current memory footprint.

Author:
anahata
  • Constructor Details

    • NetBeansTopComponents

      public NetBeansTopComponents()
  • Method Details

    • getMarkdownReport

      public static String getMarkdownReport() throws Exception
      Gathers information about all open TopComponents and returns a Markdown table report. This method performs a single EDT run to ensure consistency and performance.
      Returns:
      A Markdown table string.
      Throws:
      Exception - if gathering fails.
    • listTopComponents

      public static List<TopComponentInfo> listTopComponents() throws Exception
      Gathers raw info objects for the @AgiTool method.
      Returns:
      A list of TopComponentInfo.
      Throws:
      Exception - if gathering fails.
    • escape

      private static String escape(String s)
      Escapes Markdown pipe characters and newlines for safe inclusion in tables.
      Parameters:
      s - The string to escape.
      Returns:
      The escaped string.