@@ -91,6 +91,8 @@ type WorkspaceClientCapabilitiesWorkspaceEdit struct {
91
91
92
92
// FailureHandling is the failure handling strategy of a client if applying the workspace edit
93
93
// fails.
94
+ //
95
+ // Mostly FailureHandlingKind.
94
96
FailureHandling string `json:"failureHandling,omitempty"`
95
97
96
98
// ResourceOperations is the resource operations the client supports. Clients should at least
@@ -112,6 +114,28 @@ type WorkspaceClientCapabilitiesWorkspaceEdit struct {
112
114
ChangeAnnotationSupport * WorkspaceClientCapabilitiesWorkspaceEditChangeAnnotationSupport `json:"changeAnnotationSupport,omitempty"`
113
115
}
114
116
117
+ // FailureHandlingKind is the kind of failure handling .
118
+ type FailureHandlingKind string
119
+
120
+ const (
121
+ // FailureHandlingKindAbort applying the workspace change is simply aborted if one of the changes provided
122
+ // fails. All operations executed before the failing operation stay executed.
123
+ FailureHandlingKindAbort FailureHandlingKind = "abort"
124
+
125
+ // FailureHandlingKindTransactional all operations are executed transactional. That means they either all
126
+ // succeed or no changes at all are applied to the workspace.
127
+ FailureHandlingKindTransactional FailureHandlingKind = "transactional"
128
+
129
+ // FailureHandlingKindTextOnlyTransactional if the workspace edit contains only textual file changes they are executed transactional.
130
+ // If resource changes (create, rename or delete file) are part of the change the failure
131
+ // handling strategy is abort.
132
+ FailureHandlingKindTextOnlyTransactional FailureHandlingKind = "textOnlyTransactional"
133
+
134
+ // FailureHandlingKindUndo the client tries to undo the operations already executed. But there is no
135
+ // guarantee that this is succeeding.
136
+ FailureHandlingKindUndo FailureHandlingKind = "undo"
137
+ )
138
+
115
139
// WorkspaceClientCapabilitiesWorkspaceEditChangeAnnotationSupport is the ChangeAnnotationSupport of WorkspaceClientCapabilitiesWorkspaceEdit.
116
140
//
117
141
// @since 3.16.0.
0 commit comments