Implementation of CodeActionKind enumeration from Language Server Protocol

DO NOT add new properties or methods to this class that are specific to Moonshine IDE or to a particular language. Create a subclass for new properties or create a utility function for methods.

See also:

Variables

@:value(cast "")@:enum@:implinlineread onlyEmpty:CodeActionKind = ""

Empty kind.

@:value(cast "quickfix")@:enum@:implinlineread onlyQuickFix:CodeActionKind = "quickfix"

Base kind for quickfix actions: 'quickfix'.

@:value(cast "refactor")@:enum@:implinlineread onlyRefactor:CodeActionKind = "refactor"

Base kind for refactoring actions: 'refactor'.

@:value(cast "refactor.extract")@:enum@:implinlineread onlyRefactorExtract:CodeActionKind = "refactor.extract"

Base kind for refactoring extraction actions: 'refactor.extract'.

Example extract actions:

  • Extract method
  • Extract function
  • Extract variable
  • Extract interface from class
  • ...

@:value(cast "refactor.inline")@:enum@:implinlineread onlyRefactorInline:CodeActionKind = "refactor.inline"

Base kind for refactoring inline actions: 'refactor.inline'.

Example inline actions:

  • Inline function
  • Inline variable
  • Inline constant
  • ...

@:value(cast "refactor.rewrite")@:enum@:implinlineread onlyRefactorRewrite:CodeActionKind = "refactor.rewrite"

Base kind for refactoring rewrite actions: 'refactor.rewrite'.

Example rewrite actions:

  • Convert JavaScript function to class
  • Add or remove parameter
  • Encapsulate field
  • Make method static
  • Move method to base class
  • ...

@:value(cast "source")@:enum@:implinlineread onlySource:CodeActionKind = "source"

Base kind for source actions: source.

Source code actions apply to the entire file.

@:value(cast "source.fixAll")@:enum@:implinlineread onlySourceFixAll:CodeActionKind = "source.fixAll"

Base kind for a 'fix all' source action: source.fixAll.

'Fix all' actions automatically fix errors that have a clear fix that do not require user input. They should not suppress errors or perform unsafe fixes such as generating new types or classes.

@:value(cast "source.organizeImports")@:enum@:implinlineread onlySourceOrganizeImports:CodeActionKind = "source.organizeImports"

Base kind for an organize imports source action: source.organizeImports.