| 1 |
#pragma once |
| 2 |
#include "LibLsp/lsp/method_type.h" |
| 3 |
#include "LibLsp/JsonRpc/RequestInMessage.h" |
| 4 |
#include "LibLsp/JsonRpc/lsResponseMessage.h" |
| 5 |
#include "LibLsp/lsp/lsTextDocumentIdentifier.h" |
| 6 |
#include "LibLsp/lsp/CodeActionParams.h" |
| 7 |
|
| 8 |
namespace QuickAssistProcessor |
| 9 |
{ |
| 10 |
|
| 11 |
extern char const* SPLIT_JOIN_VARIABLE_DECLARATION_ID; //$NON-NLS-1$ |
| 12 |
extern char const* CONVERT_FOR_LOOP_ID; // ;// "org.eclipse.jdt.ls.correction.convertForLoop.assist"; //$NON-NLS-1$ |
| 13 |
extern char const* ASSIGN_TO_LOCAL_ID; // "org.eclipse.jdt.ls.correction.assignToLocal.assist"; //$NON-NLS-1$ |
| 14 |
extern char const* ASSIGN_TO_FIELD_ID; // "org.eclipse.jdt.ls.correction.assignToField.assist"; //$NON-NLS-1$ |
| 15 |
extern char const* ASSIGN_PARAM_TO_FIELD_ID; // "org.eclipse.jdt.ls.correction.assignParamToField.assist"; //$NON-NLS-1$ |
| 16 |
extern char const* |
| 17 |
ASSIGN_ALL_PARAMS_TO_NEW_FIELDS_ID; // "org.eclipse.jdt.ls.correction.assignAllParamsToNewFields.assist"; //$NON-NLS-1$ |
| 18 |
extern char const* ADD_BLOCK_ID; // "org.eclipse.jdt.ls.correction.addBlock.assist"; //$NON-NLS-1$ |
| 19 |
extern char const* EXTRACT_LOCAL_ID; // "org.eclipse.jdt.ls.correction.extractLocal.assist"; //$NON-NLS-1$ |
| 20 |
extern char const* |
| 21 |
EXTRACT_LOCAL_NOT_REPLACE_ID; // "org.eclipse.jdt.ls.correction.extractLocalNotReplaceOccurrences.assist"; //$NON-NLS-1$ |
| 22 |
extern char const* EXTRACT_CONSTANT_ID; // "org.eclipse.jdt.ls.correction.extractConstant.assist"; //$NON-NLS-1$ |
| 23 |
extern char const* INLINE_LOCAL_ID; // "org.eclipse.jdt.ls.correction.inlineLocal.assist"; //$NON-NLS-1$ |
| 24 |
extern char const* |
| 25 |
CONVERT_LOCAL_TO_FIELD_ID; // "org.eclipse.jdt.ls.correction.convertLocalToField.assist"; //$NON-NLS-1$ |
| 26 |
extern char const* |
| 27 |
CONVERT_ANONYMOUS_TO_LOCAL_ID; // "org.eclipse.jdt.ls.correction.convertAnonymousToLocal.assist"; //$NON-NLS-1$ |
| 28 |
extern char const* |
| 29 |
CONVERT_TO_STRING_BUFFER_ID; // "org.eclipse.jdt.ls.correction.convertToStringBuffer.assist"; //$NON-NLS-1$ |
| 30 |
extern char const* |
| 31 |
CONVERT_TO_MESSAGE_FORMAT_ID; // "org.eclipse.jdt.ls.correction.convertToMessageFormat.assist"; //$NON-NLS-1$; |
| 32 |
extern char const* |
| 33 |
EXTRACT_METHOD_INPLACE_ID; // "org.eclipse.jdt.ls.correction.extractMethodInplace.assist"; //$NON-NLS-1$; |
| 34 |
|
| 35 |
extern char const* CONVERT_ANONYMOUS_CLASS_TO_NESTED_COMMAND; // "convertAnonymousClassToNestedCommand"; |
| 36 |
}; // namespace QuickAssistProcessor |
| 37 |
/** |
| 38 |
* The code action request is sent from the client to the server to compute |
| 39 |
* commands for a given text document and range. These commands are |
| 40 |
* typically code fixes to either fix problems or to beautify/refactor code. |
| 41 |
* |
| 42 |
* Registration Options: TextDocumentRegistrationOptions |
| 43 |
*/ |
| 44 |
|
| 45 |
DEFINE_REQUEST_RESPONSE_TYPE( |
| 46 |
td_codeAction, lsCodeActionParams, std::vector<lsCommandWithAny>, "textDocument/codeAction" |
| 47 |
); |