@sourceacademy/autocomplete
    Preparing search index...

    Class BaseAutoCompleteWebPluginAbstract

    Implements

    • IPlugin
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    id: string = WEB_PLUGIN_ID

    The id of the plugin.

    channelAttach: string[] = ...

    Methods

    • The autocomplete method should return a list of autocomplete suggestions based on the provided code and cursor position. The call is forwarded from the web plugin to the runner plugin, which processes the request and sends back the autocomplete suggestions.

      Parameters

      • code: string

        The current code in the editor.

      • row: number

        The current row of the cursor in the editor (1-indexed).

      • column: number

        The current column of the cursor in the editor (1-indexed).

      • callback: (suggestions: AutoCompleteResponse) => void

        The callback function to handle the autocomplete suggestions received from the runner plugin.

      Returns void

    • The loadMode method is called when the web plugin receives the syntax highlighting data from the runner plugin. This method should be implemented to load the syntax highlighting mode based on the received data, enabling the web plugin to perform syntax highlighting of code in the editor.

      Parameters

      Returns void