Skip to content

Commit 07d896a

Browse files
committed
Merge branch 'hotfix/v0.19.1'
2 parents 3c21d18 + 00a4b01 commit 07d896a

File tree

3 files changed

+9
-68
lines changed

3 files changed

+9
-68
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ dependencies {
7171
exclude("org.antlr", "antlr-runtime")
7272
exclude("org.glassfish", "javax.json")
7373
}
74-
api("com.github.1c-syntax", "utils", "0.3.3")
74+
api("com.github.1c-syntax", "utils", "0.3.4")
7575
api("com.github.1c-syntax", "mdclasses", "0.9.2")
7676

7777
// JLanguageTool

src/main/java/com/github/_1c_syntax/bsl/languageserver/BSLLanguageServer.java

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ public class BSLLanguageServer implements LanguageServer, ProtocolExtension {
7474
private final BSLWorkspaceService workspaceService;
7575
private final ServerContext context;
7676
private final ServerInfo serverInfo;
77-
private final DocumentSelector documentSelector;
7877
private boolean shutdownWasCalled;
7978

8079
@Override
@@ -83,7 +82,7 @@ public CompletableFuture<InitializeResult> initialize(InitializeParams params) {
8382
setConfigurationRoot(params);
8483
CompletableFuture.runAsync(context::populateContext);
8584

86-
ServerCapabilities capabilities = new ServerCapabilities();
85+
var capabilities = new ServerCapabilities();
8786
capabilities.setTextDocumentSync(getTextDocumentSyncOptions());
8887
capabilities.setDocumentRangeFormattingProvider(getDocumentRangeFormattingProvider());
8988
capabilities.setDocumentFormattingProvider(getDocumentFormattingProvider());
@@ -100,7 +99,7 @@ public CompletableFuture<InitializeResult> initialize(InitializeParams params) {
10099
capabilities.setSelectionRangeProvider(getSelectionRangeProvider());
101100
capabilities.setColorProvider(getColorProvider());
102101

103-
InitializeResult result = new InitializeResult(capabilities, serverInfo);
102+
var result = new InitializeResult(capabilities, serverInfo);
104103

105104
return CompletableFuture.completedFuture(result);
106105
}
@@ -161,14 +160,14 @@ public WorkspaceService getWorkspaceService() {
161160
}
162161

163162
private static TextDocumentSyncOptions getTextDocumentSyncOptions() {
164-
TextDocumentSyncOptions textDocumentSync = new TextDocumentSyncOptions();
163+
var textDocumentSync = new TextDocumentSyncOptions();
165164

166165
textDocumentSync.setOpenClose(Boolean.TRUE);
167166
textDocumentSync.setChange(TextDocumentSyncKind.Full);
168167
textDocumentSync.setWillSave(Boolean.FALSE);
169168
textDocumentSync.setWillSaveWaitUntil(Boolean.FALSE);
170169

171-
SaveOptions save = new SaveOptions();
170+
var save = new SaveOptions();
172171
save.setIncludeText(Boolean.FALSE);
173172

174173
textDocumentSync.setSave(save);
@@ -198,10 +197,9 @@ private static DocumentSymbolOptions getDocumentSymbolProvider() {
198197
return documentSymbolOptions;
199198
}
200199

201-
private FoldingRangeProviderOptions getFoldingRangeProvider() {
200+
private static FoldingRangeProviderOptions getFoldingRangeProvider() {
202201
var foldingRangeProviderOptions = new FoldingRangeProviderOptions();
203202
foldingRangeProviderOptions.setWorkDoneProgress(Boolean.FALSE);
204-
foldingRangeProviderOptions.setDocumentSelector(documentSelector.asList());
205203

206204
return foldingRangeProviderOptions;
207205
}
@@ -249,10 +247,9 @@ private static ReferenceOptions getReferencesProvider() {
249247
return referenceOptions;
250248
}
251249

252-
private CallHierarchyRegistrationOptions getCallHierarchyProvider() {
250+
private static CallHierarchyRegistrationOptions getCallHierarchyProvider() {
253251
var callHierarchyRegistrationOptions = new CallHierarchyRegistrationOptions();
254252
callHierarchyRegistrationOptions.setWorkDoneProgress(Boolean.FALSE);
255-
callHierarchyRegistrationOptions.setDocumentSelector(documentSelector.asList());
256253
return callHierarchyRegistrationOptions;
257254
}
258255

@@ -262,17 +259,15 @@ private static WorkspaceSymbolOptions getWorkspaceProvider() {
262259
return workspaceSymbolOptions;
263260
}
264261

265-
private SelectionRangeRegistrationOptions getSelectionRangeProvider() {
262+
private static SelectionRangeRegistrationOptions getSelectionRangeProvider() {
266263
var selectionRangeRegistrationOptions = new SelectionRangeRegistrationOptions();
267264
selectionRangeRegistrationOptions.setWorkDoneProgress(Boolean.FALSE);
268-
selectionRangeRegistrationOptions.setDocumentSelector(documentSelector.asList());
269265
return selectionRangeRegistrationOptions;
270266
}
271267

272-
private ColorProviderOptions getColorProvider() {
268+
private static ColorProviderOptions getColorProvider() {
273269
var colorProviderOptions = new ColorProviderOptions();
274270
colorProviderOptions.setWorkDoneProgress(Boolean.FALSE);
275-
colorProviderOptions.setDocumentSelector(documentSelector.asList());
276271
return colorProviderOptions;
277272
}
278273
}

src/main/java/com/github/_1c_syntax/bsl/languageserver/DocumentSelector.java

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)