Class EditorContentReader

java.lang.Object
com.developer.nefarious.zjoule.plugin.chat.utils.EditorContentReader

public abstract class EditorContentReader extends Object
Utility class for reading content and metadata from the active editor in the Eclipse IDE. This class provides methods to retrieve the active editor's file name and its content.
  • Method Details

    • getActiveEditorFileName

      public static String getActiveEditorFileName()
      Retrieves the name of the file currently open in the active editor.
      Returns:
      the name of the active editor's file, or null if no editor is active or the file cannot be determined.
    • readActiveEditorContent

      public static String readActiveEditorContent()
      Reads and returns the content of the file currently open in the active editor.
      Returns:
      the content of the active editor's file as a String, or null if no editor is active or the file cannot be read.