summaryrefslogtreecommitdiff
path: root/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h')
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h88
1 files changed, 42 insertions, 46 deletions
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h
index 23549ecbcc..7d0021914f 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/lsp/extention/jdtls/getRefactorEdit.h
@@ -3,8 +3,6 @@
#include "LibLsp/JsonRpc/RequestInMessage.h"
#include "LibLsp/JsonRpc/lsResponseMessage.h"
-
-
#include <string>
#include <vector>
#include "WorkspaceSymbolParams.h"
@@ -12,66 +10,64 @@
#include "LibLsp/lsp/textDocument/code_action.h"
#include "LibLsp/lsp/lsFormattingOptions.h"
-namespace
-RefactorProposalUtility
+namespace RefactorProposalUtility
{
- extern const char* APPLY_REFACTORING_COMMAND_ID;
- extern const char* EXTRACT_VARIABLE_ALL_OCCURRENCE_COMMAND;
- extern const char* EXTRACT_VARIABLE_COMMAND;
- extern const char* EXTRACT_CONSTANT_COMMAND;
- extern const char* EXTRACT_METHOD_COMMAND;
- extern const char* EXTRACT_FIELD_COMMAND;
- extern const char* CONVERT_VARIABLE_TO_FIELD_COMMAND;
- extern const char* MOVE_FILE_COMMAND;
- extern const char* MOVE_INSTANCE_METHOD_COMMAND;
- extern const char* MOVE_STATIC_MEMBER_COMMAND;
- extern const char* MOVE_TYPE_COMMAND;
-};
-
-
-struct RenamePosition {
- lsDocumentUri uri;
- int offset = 0;
- int length = 0;
- void swap(RenamePosition& arg) noexcept
- {
- uri.swap(arg.uri);
- std::swap(offset, arg.offset);
- std::swap(length, arg.length);
- }
+extern char const* APPLY_REFACTORING_COMMAND_ID;
+extern char const* EXTRACT_VARIABLE_ALL_OCCURRENCE_COMMAND;
+extern char const* EXTRACT_VARIABLE_COMMAND;
+extern char const* EXTRACT_CONSTANT_COMMAND;
+extern char const* EXTRACT_METHOD_COMMAND;
+extern char const* EXTRACT_FIELD_COMMAND;
+extern char const* CONVERT_VARIABLE_TO_FIELD_COMMAND;
+extern char const* MOVE_FILE_COMMAND;
+extern char const* MOVE_INSTANCE_METHOD_COMMAND;
+extern char const* MOVE_STATIC_MEMBER_COMMAND;
+extern char const* MOVE_TYPE_COMMAND;
+}; // namespace RefactorProposalUtility
+
+struct RenamePosition
+{
+ lsDocumentUri uri;
+ int offset = 0;
+ int length = 0;
+ void swap(RenamePosition& arg) noexcept
+ {
+ uri.swap(arg.uri);
+ std::swap(offset, arg.offset);
+ std::swap(length, arg.length);
+ }
};
MAKE_REFLECT_STRUCT(RenamePosition, uri, offset, length);
struct GetRefactorEditParams
{
- std::string command;
- std::vector<lsp::Any> commandArguments;
- lsCodeActionParams context;
- optional<lsFormattingOptions> options;
- MAKE_SWAP_METHOD(GetRefactorEditParams, command, context, options);
+ std::string command;
+ std::vector<lsp::Any> commandArguments;
+ lsCodeActionParams context;
+ optional<lsFormattingOptions> options;
+ MAKE_SWAP_METHOD(GetRefactorEditParams, command, context, options);
};
MAKE_REFLECT_STRUCT(GetRefactorEditParams, command, context, options);
-
-
-
-struct RefactorWorkspaceEdit {
- /**
+struct RefactorWorkspaceEdit
+{
+ /**
* The workspace edit this code action performs.
*/
- lsWorkspaceEdit edit;
- /**
+ lsWorkspaceEdit edit;
+ /**
* A command this code action executes. If a code action provides a edit and a
* command, first the edit is executed and then the command.
*/
- optional<std::string> errorMessage;
+ optional<std::string> errorMessage;
- optional < lsCommandWithAny > command;
+ optional<lsCommandWithAny> command;
- MAKE_SWAP_METHOD(RefactorWorkspaceEdit, edit, command, errorMessage)
+ MAKE_SWAP_METHOD(RefactorWorkspaceEdit, edit, command, errorMessage)
};
-MAKE_REFLECT_STRUCT(RefactorWorkspaceEdit,edit,command,errorMessage)
-
-DEFINE_REQUEST_RESPONSE_TYPE(java_getRefactorEdit, GetRefactorEditParams, RefactorWorkspaceEdit, "java/getRefactorEdit");
+MAKE_REFLECT_STRUCT(RefactorWorkspaceEdit, edit, command, errorMessage)
+DEFINE_REQUEST_RESPONSE_TYPE(
+ java_getRefactorEdit, GetRefactorEditParams, RefactorWorkspaceEdit, "java/getRefactorEdit"
+);