Options
All
  • Public
  • Public/Protected
  • All
Menu

The plug-in should provide this interface in window.acrolinxPlugin. These functions are called by the AcrolinxSidebar.

Hierarchy

  • AcrolinxPlugin

Index

Methods

Optional log

onCheckResult

  • Notifies the AcrolinxPlugin that a check has finished. If a global check has been performed, that's a good time to clean up states belonging to previous checks.

    Parameters

    Returns void

onInitFinished

  • The sidebar has finished initialization. Now the sidebar is ready for checking.

    Parameters

    • finishResult: InitResult

      Can contain an error if the initialization failed.

    Returns void

Optional openDocumentInEditor

  • openDocumentInEditor(documentIdentifier: string): void | Promise<void>
  • A batch check has started and the user has clicked on a card. The AcrolinxPlugin is requested to open the corresponding document.

    Parameters

    • documentIdentifier: string

      Identifier of the document to open.

    Returns void | Promise<void>

Optional openLogFile

  • openLogFile(): void
  • This method should open the log file.

    Returns void

openWindow

replaceRanges

  • The integration should replace the matches belonging to the check of the checkId by its replacements.

    Note that in most cases you are able to reuse much of the implementation for selectRanges.

    Parameters

    • checkId: string

      The id of the check. You get the id as result of checkGlobal.

    • matchesWithReplacements: MatchWithReplacement[]

      The parts of the document, which should be replaced and its replacements.

    Returns void

Optional requestCheckForDocumentInBatch

  • requestCheckForDocumentInBatch(documentIdentifier: string): void
  • A batch check has started and the AcrolinxPlugin is requested to call AcrolinxSidebar.checkDocumentInBatch() for the document under check.

    Parameters

    • documentIdentifier: string

      Identifier of the document to be checked.

    Returns void

requestGlobalCheck

  • The check button has been pushed and the AcrolinxPlugin is requested to call AcrolinxSidebar.checkGlobal(). If the plugin supports checkSelection (InitParameters.supported.checkSelection), option "selection" will be set and contains a hint if the plugin should send the current selection when calling AcrolinxSidebar.checkGlobal(). Similarly if the plugin supports batchCheck (InitParameters.supported.supportsBatchChecks), option "batchCheck" will be set and the plugin should call AcrolinxSidebar.initBatchCheck().

    Parameters

    Returns void

requestInit

  • requestInit(): void
  • The sidebar has loaded and requests the AcrolinxPlugin to call acrolinxSidebar.init().

    Returns void

selectRanges

  • selectRanges(checkId: string, matches: Match[]): void
  • The integration should highlight and focus the matches belonging to the check of the checkId. For selecting ranges, different strategies can be applied. A short overview:

    1. Search: You just search for the content-attributes of the matches. The search can be improved by some fuzzy matching and adding some characters from before and after the match to the search string. pro: easy in a simple version, more or less stateless - con: fuzzy

    2. Mapping: At the time you call check, you keep the document content and create a one to one mapping between the document you checked and the document in your editor. This mapping needs to be kept up to date. Some editors provide interfaces to easily implement that. pro: up to 100% exact - con: can be difficult or impossible to implement, can be slow, requires a lot of memory

    3. Indexing: Before calling check, you scatter indices in the document, which can be kept in source as well as in the requested document. These indices reduce the search space later on, so that your search will be faster and more precise. pro: fast, up to 100% precise - con: invasive, changes the source document

    4. Combinations: You can combine all these methods to improve the positive aspects and reduce the negative aspects of each strategy.

    Note: Implementing this function will be one of your core tasks while developing an Acrolinx integration.

    Parameters

    • checkId: string

      The id of the check. You get the id as result of checkGlobal.

    • matches: Match[]

      The parts of the document which should be highlighted.

    Returns void

Optional showServerSelector

  • showServerSelector(): void

Legend

  • Object literal
  • Type alias
  • Interface
  • Method
  • Enumeration

Generated using TypeDoc