|
| 1 | +namespace LanguageServer.Parameters |
| 2 | +{ |
| 3 | + /// <summery> |
| 4 | + /// A set of predefined code action kinds |
| 5 | + /// </summery> |
| 6 | + /// <seealso cref="LanguageServer.Parameters.General.CodeActionKindCapabilities.valueSet"/> |
| 7 | + /// <seealso cref="LanguageServer.Parameters.TextDocument.CodeActionContext.only"/> |
| 8 | + /// <seealso>Spec 3.8.0</seealso> |
| 9 | + public static class CodeActionKind |
| 10 | + { |
| 11 | + /// <summary> |
| 12 | + /// Base kind for quickfix actions: 'quickfix' |
| 13 | + /// </summary> |
| 14 | + /// <seealso>Spec 3.8.0</seealso> |
| 15 | + public const string QuickFix = "quickfix"; |
| 16 | + |
| 17 | + /// <summary> |
| 18 | + /// Base kind for refactoring actions: 'refactor' |
| 19 | + /// </summary> |
| 20 | + /// <seealso>Spec 3.8.0</seealso> |
| 21 | + public const string Refactor = "refactor"; |
| 22 | + |
| 23 | + /// <summary> |
| 24 | + /// Base kind for refactoring extraction actions: 'refactor.extract' |
| 25 | + /// </summary> |
| 26 | + /// <example> |
| 27 | + /// Example extract actions: |
| 28 | + /// <list type="bullet"> |
| 29 | + /// <item><description>Extract method</description></item> |
| 30 | + /// <item><description>Extract function</description></item> |
| 31 | + /// <item><description>Extract variable</description></item> |
| 32 | + /// <item><description>Extract interface from class</description></item> |
| 33 | + /// <item><description>...</description></item> |
| 34 | + /// </list> |
| 35 | + /// </example> |
| 36 | + /// <seealso>Spec 3.8.0</seealso> |
| 37 | + public const string RefactorExtract = "refactor.extract"; |
| 38 | + |
| 39 | + /// <summary> |
| 40 | + /// Base kind for refactoring inline actions: 'refactor.inline' |
| 41 | + /// </summary> |
| 42 | + /// <example> |
| 43 | + /// Example inline actions: |
| 44 | + /// <list type="bullet"> |
| 45 | + /// <item><description>Inline function</description></item> |
| 46 | + /// <item><description>Inline variable</description></item> |
| 47 | + /// <item><description>Inline constant</description></item> |
| 48 | + /// <item><description>...</description></item> |
| 49 | + /// </list> |
| 50 | + /// </example> |
| 51 | + /// <seealso>Spec 3.8.0</seealso> |
| 52 | + public const string RefactorInline = "refactor.inline"; |
| 53 | + |
| 54 | + /// <summary> |
| 55 | + /// Base kind for refactoring rewrite actions: 'refactor.rewrite' |
| 56 | + /// </summary> |
| 57 | + /// <example> |
| 58 | + /// Example rewrite actions: |
| 59 | + /// <list type="bullet"> |
| 60 | + /// <item><description>Convert JavaScript function to class</description></item> |
| 61 | + /// <item><description>Add or remove parameter</description></item> |
| 62 | + /// <item><description>Encapsulate field</description></item> |
| 63 | + /// <item><description>Make method static</description></item> |
| 64 | + /// <item><description>Move method to base class</description></item> |
| 65 | + /// <item><description>...</description></item> |
| 66 | + /// </list> |
| 67 | + /// </example> |
| 68 | + /// <seealso>Spec 3.8.0</seealso> |
| 69 | + public const string RefactorRewrite = "refactor.rewrite"; |
| 70 | + |
| 71 | + /// <summary> |
| 72 | + /// Base kind for source actions: 'source' |
| 73 | + /// </summary> |
| 74 | + /// <remarks> |
| 75 | + /// Source code actions apply to the entire file. |
| 76 | + /// </remarks> |
| 77 | + /// <seealso>Spec 3.8.0</seealso> |
| 78 | + public const string Source = "source"; |
| 79 | + |
| 80 | + /// <summary> |
| 81 | + /// Base kind for an organize imports source action: 'source.organizeImports' |
| 82 | + /// </summary> |
| 83 | + /// <seealso>Spec 3.8.0</seealso> |
| 84 | + public const string SourceOrganizeImports = "source.organizeImports"; |
| 85 | + } |
| 86 | +} |
0 commit comments