Skip to content

Commit

Permalink
Merge branch 'hotfix/v0.19.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
nixel2007 committed Sep 23, 2021
2 parents 3c21d18 + 00a4b01 commit 07d896a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 68 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ dependencies {
exclude("org.antlr", "antlr-runtime")
exclude("org.glassfish", "javax.json")
}
api("com.github.1c-syntax", "utils", "0.3.3")
api("com.github.1c-syntax", "utils", "0.3.4")
api("com.github.1c-syntax", "mdclasses", "0.9.2")

// JLanguageTool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public class BSLLanguageServer implements LanguageServer, ProtocolExtension {
private final BSLWorkspaceService workspaceService;
private final ServerContext context;
private final ServerInfo serverInfo;
private final DocumentSelector documentSelector;
private boolean shutdownWasCalled;

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

ServerCapabilities capabilities = new ServerCapabilities();
var capabilities = new ServerCapabilities();
capabilities.setTextDocumentSync(getTextDocumentSyncOptions());
capabilities.setDocumentRangeFormattingProvider(getDocumentRangeFormattingProvider());
capabilities.setDocumentFormattingProvider(getDocumentFormattingProvider());
Expand All @@ -100,7 +99,7 @@ public CompletableFuture<InitializeResult> initialize(InitializeParams params) {
capabilities.setSelectionRangeProvider(getSelectionRangeProvider());
capabilities.setColorProvider(getColorProvider());

InitializeResult result = new InitializeResult(capabilities, serverInfo);
var result = new InitializeResult(capabilities, serverInfo);

return CompletableFuture.completedFuture(result);
}
Expand Down Expand Up @@ -161,14 +160,14 @@ public WorkspaceService getWorkspaceService() {
}

private static TextDocumentSyncOptions getTextDocumentSyncOptions() {
TextDocumentSyncOptions textDocumentSync = new TextDocumentSyncOptions();
var textDocumentSync = new TextDocumentSyncOptions();

textDocumentSync.setOpenClose(Boolean.TRUE);
textDocumentSync.setChange(TextDocumentSyncKind.Full);
textDocumentSync.setWillSave(Boolean.FALSE);
textDocumentSync.setWillSaveWaitUntil(Boolean.FALSE);

SaveOptions save = new SaveOptions();
var save = new SaveOptions();
save.setIncludeText(Boolean.FALSE);

textDocumentSync.setSave(save);
Expand Down Expand Up @@ -198,10 +197,9 @@ private static DocumentSymbolOptions getDocumentSymbolProvider() {
return documentSymbolOptions;
}

private FoldingRangeProviderOptions getFoldingRangeProvider() {
private static FoldingRangeProviderOptions getFoldingRangeProvider() {
var foldingRangeProviderOptions = new FoldingRangeProviderOptions();
foldingRangeProviderOptions.setWorkDoneProgress(Boolean.FALSE);
foldingRangeProviderOptions.setDocumentSelector(documentSelector.asList());

return foldingRangeProviderOptions;
}
Expand Down Expand Up @@ -249,10 +247,9 @@ private static ReferenceOptions getReferencesProvider() {
return referenceOptions;
}

private CallHierarchyRegistrationOptions getCallHierarchyProvider() {
private static CallHierarchyRegistrationOptions getCallHierarchyProvider() {
var callHierarchyRegistrationOptions = new CallHierarchyRegistrationOptions();
callHierarchyRegistrationOptions.setWorkDoneProgress(Boolean.FALSE);
callHierarchyRegistrationOptions.setDocumentSelector(documentSelector.asList());
return callHierarchyRegistrationOptions;
}

Expand All @@ -262,17 +259,15 @@ private static WorkspaceSymbolOptions getWorkspaceProvider() {
return workspaceSymbolOptions;
}

private SelectionRangeRegistrationOptions getSelectionRangeProvider() {
private static SelectionRangeRegistrationOptions getSelectionRangeProvider() {
var selectionRangeRegistrationOptions = new SelectionRangeRegistrationOptions();
selectionRangeRegistrationOptions.setWorkDoneProgress(Boolean.FALSE);
selectionRangeRegistrationOptions.setDocumentSelector(documentSelector.asList());
return selectionRangeRegistrationOptions;
}

private ColorProviderOptions getColorProvider() {
private static ColorProviderOptions getColorProvider() {
var colorProviderOptions = new ColorProviderOptions();
colorProviderOptions.setWorkDoneProgress(Boolean.FALSE);
colorProviderOptions.setDocumentSelector(documentSelector.asList());
return colorProviderOptions;
}
}

This file was deleted.

0 comments on commit 07d896a

Please sign in to comment.