|
13 | 13 | * See the License for the specific language governing permissions and
|
14 | 14 | * limitations under the License.
|
15 | 15 | */
|
16 |
| -import { getRedHatService, TelemetryService } from '@redhat-developer/vscode-redhat-telemetry/lib'; |
17 | 16 | import { RedHatService } from '@redhat-developer/vscode-redhat-telemetry';
|
18 |
| -import { CodeAction as VSCodeAction, CodeActionKind, Command as VSCommand, commands, Diagnostic as VSDiagnostic, ExtensionContext, extensions, window, workspace, TextDocument, FileCreateEvent } from 'vscode'; |
| 17 | +import { getRedHatService, TelemetryService } from '@redhat-developer/vscode-redhat-telemetry/lib'; |
| 18 | +import { CodeActionKind, commands, ExtensionContext, extensions, FileCreateEvent, TextDocument, CodeAction as VSCodeAction, Command as VSCommand, Diagnostic as VSDiagnostic, window, workspace } from 'vscode'; |
19 | 19 | import { CancellationToken, CodeAction, CodeActionResolveRequest, Command, DidChangeConfigurationNotification, DocumentSelector, LanguageClientOptions, RequestType } from 'vscode-languageclient';
|
20 | 20 | import { LanguageClient } from 'vscode-languageclient/node';
|
21 | 21 | import { APPLY_CODE_ACTION_WITH_TELEMETRY } from './definitions/commands';
|
22 | 22 | import * as CommandKind from './definitions/lspCommandKind';
|
23 | 23 | import * as MicroProfileLS from './definitions/microProfileLSRequestNames';
|
| 24 | +import { JavaExtensionAPI } from './definitions/vscodeJavaApi'; |
24 | 25 | import { prepareExecutable } from './languageServer/javaServerStarter';
|
25 | 26 | import { collectMicroProfileJavaExtensions, handleExtensionChange, MicroProfileContribution } from './languageServer/plugin';
|
26 | 27 | import { resolveRequirements } from './languageServer/requirements';
|
27 | 28 | import { registerConfigurationUpdateCommand, registerOpenURICommand } from './lsp-commands';
|
28 | 29 | import { JAVA_EXTENSION_ID, waitForStandardMode } from './util/javaServerMode';
|
29 | 30 | import { sendCodeActionTelemetry } from './util/telemetry';
|
30 | 31 | import { getFilePathsFromWorkspace } from './util/workspaceUtils';
|
31 |
| -import { MicroProfilePropertiesChangeEvent, registerYamlSchemaSupport, YamlSchemaCache, getYamlSchemaCache } from './yaml/YamlSchema'; |
| 32 | +import { getYamlSchemaCache, MicroProfilePropertiesChangeEvent, registerYamlSchemaSupport, YamlSchemaCache } from './yaml/YamlSchema'; |
32 | 33 |
|
33 | 34 | let languageClient: LanguageClient;
|
34 | 35 |
|
35 |
| -// alias for vscode-java's ExtensionAPI |
36 |
| -export type JavaExtensionAPI = any; |
37 |
| - |
38 | 36 | export async function activate(context: ExtensionContext): Promise<void> {
|
39 | 37 | if (await isJavaProject()) {
|
40 | 38 | await doActivate(context);
|
@@ -296,7 +294,7 @@ async function connectToLS(context: ExtensionContext, api: JavaExtensionAPI, doc
|
296 | 294 | * Returns a json object with key 'microprofile' and a json object value that
|
297 | 295 | * holds all microprofile settings.
|
298 | 296 | */
|
299 |
| - function getVSCodeMicroProfileSettings(): { microprofile: any } { |
| 297 | + function getVSCodeMicroProfileSettings(): { microprofile } { |
300 | 298 | const defaultMicroProfileSettings = {};
|
301 | 299 | const configMicroProfile = workspace.getConfiguration().get('microprofile');
|
302 | 300 | const microprofileSettings = configMicroProfile ? configMicroProfile : defaultMicroProfileSettings;
|
|
0 commit comments