11// Copyright (c) Microsoft Corporation. All rights reserved.
22// Licensed under the MIT license.
33
4- import * as compareVersions from "compare-versions" ;
54import { debug , InlineValue , InlineValueContext , InlineValueEvaluatableExpression , InlineValuesProvider , InlineValueText , InlineValueVariableLookup ,
6- Range , TextDocument , version } from "vscode" ;
5+ Range , TextDocument } from "vscode" ;
76import { instrumentOperation , instrumentOperationStep , sendInfo } from "vscode-extension-telemetry-wrapper" ;
87import * as CodeConverter from "vscode-languageclient/lib/codeConverter" ;
98import * as ProtocolConverter from "vscode-languageclient/lib/protocolConverter" ;
109import { InlineKind , InlineVariable , resolveInlineVariables } from "./languageServerPlugin" ;
1110
12- // In VS Code 1.55.0, viewport doesn't change while scrolling the editor and it's fixed in 1.56.0.
13- // So dynamically enable viewport support based on the user's VS Code version.
14- const isViewPortSupported = compareVersions ( version . replace ( / - i n s i d e r $ / i, "" ) , "1.56.0" ) >= 0 ;
15-
1611const protoConverter : ProtocolConverter . Converter = ProtocolConverter . createConverter ( ) ;
1712const codeConverter : CodeConverter . Converter = CodeConverter . createConverter ( ) ;
1813
@@ -23,7 +18,7 @@ export class JavaInlineValuesProvider implements InlineValuesProvider {
2318 const resolveInlineVariablesStep = instrumentOperationStep ( operationId , "resolveInlineVariables" , async ( ) => {
2419 return < InlineVariable [ ] > ( await resolveInlineVariables ( {
2520 uri : document . uri . toString ( ) ,
26- viewPort : isViewPortSupported ? codeConverter . asRange ( viewPort ) : undefined ,
21+ viewPort : codeConverter . asRange ( viewPort ) ,
2722 stoppedLocation : codeConverter . asRange ( context . stoppedLocation ) ,
2823 } ) ) ;
2924 } ) ;
0 commit comments